Hi all
I am experimenting with my own python block. I started by simply interrogating each variable to see their types and shapes.
I connected a vector source that just generates increasing numbers (0, 1, 2, 3, 4, 5 and so on upto a big number).
I noticed that the length of (input_items[0]) seems to oscillate between 4096 and 4095 in successive work calls. I also noticed that in each work call, a NEW set of samples appear. (attached file)
Here are my questions:
If I were just doing something really simple like squaring each element, in each work call I'd just square every element in the vector input_items[0]. No problem.
Suppose I need to do an FFT. (I know it can be done with stream to vector followed by FFT) But suppose I wanted to make it work with streams.
In each work call, I'd divide the input_items[0] vector into chunks of size = FFT size and take the FFT of each chunk. Again no problem. Since 4096 will divide perfectly by a power of 2 FFT size.
But what about the case when I have 4095? If I do FFT = 512, I will get 7 chunks of 512 and I will be left over with 511. Would I have to save those 511 elements and use them in the next work call when input_items[0] gets new elements?
Thanks
Anil
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Read the mailing list of the GNU project right here! The information here is regarding the GNU radio project for USRP radios.
Wednesday, November 15, 2017
Re: [Discuss-gnuradio] Question on number of input items per work call
Hi Anil,
You can fix the buffer size using the Min Output Buffer parameter (under the Advanced tab in your block, assuming you're using GRC).
Regards,
Ernest
On Thu, Nov 16, 2017 at 1:56 PM, Anil Kumar Yerrapragada <yanilkumar2710@gmail.com> wrote:
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment