discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Question on number of input items per work call


From: Ernest Fardin
Subject: Re: [Discuss-gnuradio] Question on number of input items per work call
Date: Thu, 16 Nov 2017 18:12:27 +1100

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).

Inline image 1

Regards,

Ernest

On Thu, Nov 16, 2017 at 1:56 PM, Anil Kumar Yerrapragada <address@hidden> wrote:

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
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]