discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] ninput_items size problem


From: Ramazan Çetin
Subject: Re: [Discuss-gnuradio] ninput_items size problem
Date: Fri, 12 Jul 2019 13:47:54 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Hello Rear,

Thank you for response. I could resolve the partial samples problem. I give custom taps to Rational_resampler as "[1.0]". This time, it gave full output without any partial data. However, this causes multiple images in spectrum due to interpolation. I used a low pass filter after rational_resampler. This solved filtering issue. I have attached picture of my FG.

I can send full tagged packets with this configuration. But, this causes me getting letter "D". After getting couple of letter "D", RX LED of USRP turns off. RX functionality of USRP crashes. When i searched that means "Dropped Network Packet". But i cannot understand how my changes caused that problem.

Do you have any idea?

Regards.

On 12.07.2019 10:52, rear1019 wrote:
On Wed, 10 Jul 2019 at 19:15:41 +0300, Ramazan Çetin wrote:
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?
That’s not a problem with rational_resampler, that’s how GNU Radio
works. ninput_items and noutput_items depend on various factors and are
not deterministic. A minimum ninput_items can be forced indirectly by
using set_min_noutput_items() inside the block which requires a minimum
ninput_items. I don’t know whether calling this function in the upstream
block (in rational_resampler, as suggested by you) will work.

You do call set_min_noutput_items() in your code, however, the argument
is too small; increase it to 1950. Note that generally you must take the
implementation of forecast() into account: You use gr::block as base
class and you don’t overwrite forecast(). The default implementation [1]
assumes a 1:1 rate of input to output items. With gr::sync_interpolator
e.g. you must use set_min_noutput_items(minimum ninput_items times
interpolation factor).

[1] 
https://github.com/gnuradio/gnuradio/blob/maint-3.7/gnuradio-runtime/lib/block.cc#L115

Attachment: ofdm_custom_rtag.png
Description: PNG image


reply via email to

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