I am using the OOT rfnoc-example (which includes a gain block) along with a
short custom c++ program that simply streams samples to the input port of a
single RFNoC block and then captures the stream from the output port to a
file. I built an E310 image with this block and loaded the bitstream onto
the device. It all works fine but I noticed something strange in that the
metadata time stamps of the tx and rx streams do not match even though the
fpga implementation in this example assigns the input context axi stream
directly to the output context.

Note in the results below that the tx time stamp is 3.456, but the rx time
stamp is truncated to 3. If I change the tx time stamp to 4.456, then the
rx time stamp becomes 4 (not shown below).  I mentioned this issue a long
time ago on this users-list but got no reply. I'm wondering if anyone has
any suggestions regarding this discrepancy?
Rob

*The relevant lines from my custom program are*:
size_t num_rx_samps = rx_stream->recv(&buff.front(), buff.size(), md, 1.0);
if (md.has_time_spec) std::cout << "recv() time: " <<
md.time_spec.get_real_secs() << std::endl;
     AND
tx_stream->send(buffs, num_this_time, md, 1);
if (md.has_time_spec) std::cout << "send() at time: " <<
md.time_spec.get_real_secs() << std::endl;

*Here are the results of my program:*
~/rfnoc/rfnoc-example2/build/apps/rfnoc_block_test --block-id Gain#0
--const-real 5 --const-imag 10 --block-args "gain=256"

Creating the USRP device with: ...
[INFO] [UHD] linux; GNU C++ version 9.3.0; Boost_107100;
UHD_4.1.0.4-118-g06a9ded7
[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=192.168.0.2,type=e3xx,product=e310_sg3,serial=3150D1D,fpga=n/a,claimed=False,addr=192.168.0.2
[INFO] [MPM.PeriphManager] Found 1 daughterboard(s).
[INFO] [MPM.PeriphManager] init() called with device args
`fpga=n/a,mgmt_addr=192.168.0.2,product=e310_sg3'.
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 0 ...
[INFO] [0/Radio#0] CODEC loopback test passed
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 1 ...
[INFO] [0/Radio#0] CODEC loopback test passed

Available RFNoC blocks (# input ports, # output ports):
  0/Gain#0: (1,1)
  0/Radio#0: (2,2)

Block to test: 0/Gain#0
Block args: gain

Using rx streamer args: block_id=0/Gain#0,block_port=0
Using tx streamer args: block_id=0/Gain#0,block_port=0

Rx: Issuing start stream cmd
Tx: Streaming started for 1024 samps, spp = 364
send() at time: 3.456
Tx: send() samps: 364, EOB: 0
Tx: send() samps: 364, EOB: 0
Tx: send() samps: 296, EOB: 1
Tx: Streaming complete
recv() time: 3
Rx: recv() samps: 364, EOB: 0
Rx: recv() samps: 364, EOB: 0
Rx: recv() samps: 296, EOB: 1
Rx: Issuing stop stream cmd
Rx: Streaming complete

Done!
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to