|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Number sink and making a clock |
Date: | Tue, 6 Sep 2016 22:06:49 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi Santos, you're not actually describing your problem all that well, but
there's the central question: Are you using a throttle block, or is your flow graph rate-limited by a hardware device (e.g. a USRP or HackRF or Audio sink)? ===Not using throttle or rate-limiting hardware=== GNU Radio just works as fast as it can. The sampling rate you
configure in your signal source has nothing to do with how fast
that signal is generated – it just says "ok, generate a signal
with period f_signal/f_sample samples". This is DSP – everything
is measured in sample durations, and there's no "real world time"
involved in any of these calculations. Hence, your number sink will just show the value of an incredibly fast changing signal at the time it updated its display. Not very useful ===Using throttle or other rate-limiting blocks=== You might be under the wrong impression that if you use throttle
e.g. with 1kHz throttle rate, you'll actually get one sample every
1ms. That's not the case – GNU Radio generally works on sample chunks,
ie. the signal source fills its output buffer as fast as it can,
GNU Radio wakes up the downstream block, and hands it everything
there is in that buffer. So assume, that, for example, the block
that limits your rate (throttle, hardware interface) gets handed
8192 samples at once. It will now take the time it needs to
process these 8192 samples – for example, with a throttle set to
freq=1k, it will copy these 8192 samples from in- to output, and
simply sleep for 8.192s! In other words, your number sink does see
1000 samples per second _on average_, but in much, much greater
chunks than 1 sample at a time. Hence, for really low rates, where your eye is faster than the number of sample packets per second that are generated, your number sink simply gets an update very seldom, and when it gets it, it's going to be a lot of samples at once.
Best regards, Marcus On 06.09.2016 21:17, Santos Campos
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |