Hello Jörg,
Hello interested reader,
sorry I was quite busy end of the year and then on vacation so I couldn’t continue with my tests here. But today I tinkered a little with what you described under 1.
Unfortuantely, I wasn’t able to reproduce what you are saying. Are we working on the same version of the code (ofdm_loopback.py) ?
here is some Info.
- the command I used initially with a delay of “0” according to what you said this shouldn’t result in a sharp peak, which I am seeing.
./ofdm_loopback.py --args "addr=192.168.10.2" -s 2048 -n 10 -y 0.8 -d 0 -c 0,1 --tx-gain 0 --rx-gain 0 --rate 245760000
using arguments:
--args addr=192.168.10.2
--fft-size 2048
--num-symbols 10
--amplitude 0.8
--cp-list
--channels 0,1
--loopback False
--delay 0
--tx-gain 0
--rx-gain 0
--rate 245760000.0
Using samples per packet of 1024
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; DPDK_21.11; UHD_4.6.0.fft_cp_preview_2-14-g4a94995c
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=x4xx,product=x410,serial=33D8E1F,name=ni-x4xx-33D8E1F,fpga=X4_200,claimed=False,addr=192.168.10.2
from the output you can see on which Version of the code-base I am working (fft_cp_preview_2-14-g4a94995c). I changed the amplitude to 0.8 but that doesn’t really affect the result.

So my guess is that in the current version of ofdm_loopback.py the delay is already accounted for by lines 640 and 641:
(…)
tx_time=tx_time,
rx_time=tx_time + get_tx_rx_delay(radio, args),
(…)
where get_tx_rx_delay is a function (starting from line 373) which sets the delay as follows:
(only showing lines 388-395)
else:
# With RF loopback there's a fixed delay between TX and RX
if tick_rate in [245.76e6, 250.0e6]:
# Add 188 cycles for 200 MHz FPGA
loopback_delay = 188
else:
raise NotImplementedError()
return loopback_delay / tick_rate
Am I right with my assumption?
So to check for the delay I should set that offset back to 0 from 188 right?
But when I tried that, the number of Rx samples didn’t match the number of Tx samples and the code didn’t execute fully.
So is there a different code I should focus on ?
Furthermore i wrote a code which estimates the delay on the phase-difference between tx and rx. But these delays somehow don’t match the time I get by loopback_delay / tick_rate
which would be 188/245.76MHz in my case…
Do you have any suggestions what I can additionally try to determine the delay introduced by the USRP. Or maybe hint an error I might be doing…
Kind regards and a happy new year,
Ruben
Hello Jörg, \
Hello interested reader,
sorry I was quite busy end of the year and then on vacation so I couldn’t continue with my tests here. But today I tinkered a little with what you described under 1. \
Unfortuantely, I wasn’t able to reproduce what you are saying. Are we working on the same version of the code (ofdm_loopback.py) ?
here is some Info.
1) the command I used initially with a delay of “0” according to what you said this shouldn’t result in a sharp peak, which I am seeing.
`./ofdm_loopback.py --args "addr=192.168.10.2" -s 2048 -n 10 -y 0.8 -d 0 -c 0,1 --tx-gain 0 --rx-gain 0 --rate 245760000`
`using arguments:`
`--args addr=192.168.10.2`
`--fft-size 2048`
`--num-symbols 10`
`--amplitude 0.8`
`--cp-list `
`--channels 0,1`
`--loopback False`
`--delay 0`
`--tx-gain 0`
`--rx-gain 0`
`--rate 245760000.0`
`Using samples per packet of 1024`
`[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; DPDK_21.11; UHD_4.6.0.fft_cp_preview_2-14-g4a94995c`
`[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=x4xx,product=x410,serial=33D8E1F,name=ni-x4xx-33D8E1F,fpga=X4_200,claimed=False,addr=192.168.10.2`
from the output you can see on which Version of the code-base I am working (fft_cp_preview_2-14-g4a94995c). I changed the amplitude to 0.8 but that doesn’t really affect the result.

So my guess is that in the current version of ofdm_loopback.py the delay is already accounted for by lines 640 and 641:
`(…)`\
`tx_time=tx_time,`\
`rx_time=tx_time + get_tx_rx_delay(radio, args),`\
`(…)`
where get_tx_rx_delay is a function (starting from line 373) which sets the delay as follows:
(only showing lines 388-395)
`else:`\
` # With RF loopback there's a fixed delay between TX and RX`\
` if tick_rate in [245.76e6, 250.0e6]:`\
` # Add 188 cycles for 200 MHz FPGA`\
` loopback_delay = 188`\
` else:`\
` raise NotImplementedError()`\
` return loopback_delay / tick_rate`
Am I right with my assumption? \
So to check for the delay I should set that offset back to 0 from 188 right? \
But when I tried that, the number of Rx samples didn’t match the number of Tx samples and the code didn’t execute fully. \
\
So is there a different code I should focus on ? \
Furthermore i wrote a code which estimates the delay on the phase-difference between tx and rx. But these delays somehow don’t match the time I get by `loopback_delay / tick_rate` which would be 188/245.76MHz in my case… \
\
Do you have any suggestions what I can additionally try to determine the delay introduced by the USRP. Or maybe hint an error I might be doing…
Kind regards and a happy new year,
Ruben