Hi Jons,

TL;DR: If you configure the packet size of your (TX) streamer by specifying the 
SPP parameter of your stream_args, inside of your RFNoC block you can assume 
that every time tlast is asserted, have received a full packet consisting of 32 
samples.\
\
\
Technically you can make your packets whatever size you like, especially if you 
are not interfacing with any other data processing RFNoC blocks.\
\
Some blocks have special requirements on the packet size, for example the fft 
block. This block takes the full packet and then processes it as a whole, 
similar to how it seems your custom block is operating. If you are doing using 
an FFT size of 1024, the fft block expects every packet to consist of exactly 
1024 (sc16) samples.

In RFNoC, you can specify the size of the TX or RX streamer packet sample 
payload by specifying the SPP(Samples Per Packet) parameter in the stream_args.\
See <https://uhd.readthedocs.io/en/latest/page_stream.html#stream_intro> 
example code on a basic way to do that.

When it comes to the FPGA side and tlast, it gets slightly more complicated:

RFNoC blocks communicate with each other using CHDR packets, that are 
transmitted over the CHDR data bus connections between them. 

The width of this bus is determined by the \`CHDR_W\` parameter of the bit file 
variant you are using your block in. A packet is split into data words of width 
\`CHDR_W\` and then forwarded one word per clock cycle of the data clock 
\`chdr_clk\`. 

This means that if you are using a \`CHDR_W\` of 64 as used in the 200MHz BW 
variant bitfile, the “SPP=32” packet you have sent from the host will be 
resized, and tlast will be asserted after 1 CHDR header word + 16 payload Data 
words each containing two samples (equivalent to “NIPC=2” with your sample 
width of sc16 being “ITEM_W=32”).\
\
I’m not as familiar with gnuradio but i am assuming that if you are setting the 
spp for your streamer your block should be fine.

The size of the return packet is you depends on what the output of your custom 
RFNoC block is, and whenever you assert tlast inside of your block.\
\
By the way, I am assuming there is a typo in your processing chain:\
\
GNU Radio block A --> TX streamer --> custom RFNoC block --> **RX** streamer \
\--> GNU Radio block B\
\
Regards,\
Niels
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to