|
From: | Mostafa Alizadeh |
Subject: | Re: [Discuss-gnuradio] how to manage time! |
Date: | Fri, 9 May 2014 10:44:06 +0430 |
hi Mostafa,
a fixed item rate just happens coincidentally when using actual hardware. In digital signal processing you really usually don't care, as long as latency constraints are met. typically, you can't even do that at all, because GNU Radio blocks tend to process samples en block.
maybe tell us a little bit why you want to have a physical item rate, things would clear up a bit:-)
greetings,
Marcus--On May 8, 2014 9:37:32 PM CEST, Mostafa Alizadeh <address@hidden> wrote:Hi Marcus,I did know about the Throttle block and which doesn't do anything with data just control its passing. My question is how to generate a bit stream(I say bit and we could simply call it item), say random, with specific sample rate just as audio source do! I had a glimpse at the source code of portaudio_source.cc in gnuradio files but I didn't find out it easy to understand. :(any idea?best,On Thu, May 8, 2014 at 10:03 PM, Marcus Müller <address@hidden> wrote:
Hi Mostafa,
I'm not really sure I understand your question:
there is different "times" in DSP:
1. the times relative to the "information theoretical world", which
increases with 1/f_sample per sample
2. the time relative to the computing machine, which just runs along
while the computer is busy computing
Throttle is *explicitely* just a throttle block. For a *purely
simulating* flowgraph, you can use it to *limit CPU usage*. it has no
other purpose. It is a very very rough mapping of the first time to the
second one. It really has no data effect. I emphasisize this, because
that mistake is made so often: it does not change the samples at all. it
just limits the speed they are processed with.
I think your question is "I want to have a sample stream that contains
1000 bits of information for each second worth of samples". So you have
to calculate how many samples you have per bit at your specified
sampling rate and use that.
Since you write "I saw the trottle block but I don't know what it does",
I think you can learn interesting things by working through the
Tutorials on
http://gnuradio.org/redmine/projects/gnuradio/wiki/Tutorials from top to
bottom. This will clear up a lot of things!
Greetings,
Marcus
> *Or saying in general, how could I manage timing for passing data between
On 08.05.2014 19:24, Mostafa Alizadeh wrote:
> Hello everybody,
> I want to have a block of, for example, bit generator, which generates 1000
> bps. How could I manage the time in a thread (or equivalently in a block)??
> blocks!?*
>> _______________________________________________
> I saw the "Throttle" block of gnuradio in c++ but I didn't how it works!!
>
> best,
>
>
>
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Sent from my Android device with K-9 Mail. Please excuse my brevity.
[Prev in Thread] | Current Thread | [Next in Thread] |