[USRP-users] Trouble understanding o_tdata

Jason Matusiak jason at gardettoengineering.com
Tue Jul 7 08:45:50 EDT 2015

In my endless pursuit to understand the inner workings of RFNoC, I am
still having issues creating my dummy block that halves the incoming
signal.  I can create a new FPGA bitfile and GRC script and get
everything to run, but I am having trouble getting it to function as I
would expect.

If I make a script that is:
 RFNOC: Radio -> RFNoC: FIFO -> QT GUI Freq Sink

I can see noise and then when I turn on my exterior tone and broadcast
it at 101MHz, see it pop up on my freq sink.

I then modify my GRC script to add in my new block so that the stream
looks like:
 RFNOC: Radio -> RFNoC: FIFO -> RFNoc: halfSignal -> QT GUI Freq Sink

Now I would expect everything to function the same, and when I turn on
my externally broadcast tone, it would show a 3-6dB decrease in power
due to the halving block being in place.  This does not happen, instead
I always see a tone at the center of the freq sink, even when I am not
broadcasting my external tone.  This leads me to believe that I am not
manipulating the data properly in my halving block on the FPGA.

On the FPGA, I mimic the keep_one_in_n FPGA files by creating
halfSignal.v and halfSignal_vec.v files.  In the halfSignal_vec.v file,
the pertinent info is:
   assign i_tready = o_tready;
   assign o_tvalid = i_tvalid;
   assign o_tdata = {i_tdata[WIDTH-1:WIDTH/2]/2,i_tdata[WIDTH/2-1:0]/2};
   assign o_tlast = i_tlast;

Am I misunderstanding what o_tdata/i_tdata actually is used for?  In my
above example I am assuming that i_tdata contains a concatenation of the
I/Q incoming stream.

When I stop the script from running on the E310, I do see an error
message, but I don't think it is relevant to this problem.  Here it is
anyway just in case:
visit_decref: Assertion `gc->gc.gc_refs != 0' failed.

More information about the USRP-users mailing list