Thursday, July 11, 2019

Re: [Discuss-gnuradio] ninput_items size problem

Hey again,

I have digged some more.  This is how the connection is . OFDM MOD ->
RATIONAL_RESAMPLER -> MY_BLOCK

Everytime, 64 items remains inside of rational_resampler block. When my
block is called by scheduler, i have logged the below. I am waiting 1950
sized input for consuming. But resampler sends output up to 1886 = 1950
- 64. This is always same, i  have tried for different sized tagged
streams. It always sends up to "packet_len" - 64.

ninput_items[0]: 0, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1024, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1024, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1024, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1024, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1024, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1886, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1886, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1886, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 1886, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096
ninput_items[0]: 2910, nitems_read[0]: 0, nitems_written(0): 0,
noutput_items: 4096

Input Port 0 - Tag 0 -> Key: packet_len, Value: 1950, Offset: 0 (NOW, i
can consume input, because i have more than 1950 items)
ninput_items[0]: 1886, nitems_read[0]: 1950, nitems_written(0): 1950,
noutput_items: 4096
ninput_items[0]: 1886, nitems_read[0]: 1950, nitems_written(0): 1950,
noutput_items: 4096

On the above, we can see that, in second tagged packet
rational_resampler directly outputs size of 1950. I have consumed 1950
of input, but still 1886 output remained in the input buffer of my
block. This causes that i always send one packet late.
Why rational_resampler behaves like this? Please, help.
Best regards.

On 10.07.2019 19:15, Ramazan Çetin wrote:
> Hello folk,
>
> We made some progress. This short ninput_items size problem results
> from "rational_resampler". Rational_resampler is used as interpolator
> by 2. So, lets say, there is a tagged packet on input of
> rational_resampler with length of 975. We expect that,
> rational_resampler should put a packet to the output with size of
> 1950. But, it outputs partially like length of 1024 or 1536 etc. So,
> next block cannot produce its output. Because it needs entire packet
> with length of 1950.
>
> Can we set min noutput_items for rational_resampler and does this
> solve the problem? Or, do you know what the problem is about
> rational_resampler?
>
> Best regards.
>
> On 9.07.2019 20:53, Ramazan Çetin wrote:
>> Hello,
>>
>> We have a variable input payload from TAP interface. This payload is
>> modulated in OFDM block. Then, it passed through our custom "rtag"
>> block. This block behaves like FIFO. It puts first input to its
>> output. The problem is that our input is tagged with "packet_len"
>> which is 1950. But, out "ninput_items" size is lower than 1950.
>> Because of this problem, we have to wait until new packet arrives to
>> fill the input buffer to 1950.
>>
>> How can we increase ninput_items size in our custom block?
>>
>> The code and the log output is attached.
>>
>> Best regards.
>>
>>

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment