Hi,
After being able to tune RX and TX separately, I still do not get phase
coherency.
To debug, I added the following debug statements to set_tx_freq and set_rx_freq
in uhd/host/lib/usrp/multi_usrp.cpp:
tune_result_t set_tx_freq(const tune_request_t &tune_request, size_t chan){
#if 1
try {
time_spec_t now = _tree->access<time_spec_t>(mb_root(0) /
"time/now").get();
time_spec_t when = _tree->access<time_spec_t>(mb_root(0) /
"time/cmd").get();
UHD_LOGGER_WARNING("MULTI_USRP") << boost::format("Tune TX at %d:%f
for %d:%f") % now.get_full_secs() % now.get_frac_secs() % when.get_full_secs()
% when.get_frac_secs();
} catch(...) {}
#endif
and for RX:
#if 1
try
{
time_spec_t now = _tree->access<time_spec_t>(mb_root(0) /
"time/now").get();
time_spec_t when = _tree->access<time_spec_t>(mb_root(0) /
"time/cmd").get();
UHD_LOGGER_WARNING("MULTI_USRP") << boost::format("Tune RX at %d:%f
for %d:%f") % now.get_full_secs() % now.get_frac_secs() % when.get_full_secs()
% when.get_frac_secs();
} catch(...){}
#endif
I use the following python code to send the timed commands from within gnuradio:
tune_req_rx = uhd.tune_request()
tune_req_rx.rf_freq_policy = uhd.tune_request.POLICY_NONE
tune_req_rx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
tune_req_rx.dsp_freq = -dsp_freq
tune_req_tx = uhd.tune_request()
tune_req_tx.rf_freq_policy = uhd.tune_request.POLICY_NONE
tune_req_tx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
tune_req_tx.dsp_freq = dsp_freq
exec_time = usrp_sink.get_time_now() + uhd.time_spec(1)
usrp_sink.set_command_time(exec_time)
usrp_source.set_command_time(exec_time)
res1 = usrp_source.set_center_freq(tune_req_rx, 1)
res2 = usrp_sink.set_center_freq(tune_req_tx)
usrp_sink.clear_command_time()
usrp_source.clear_command_time()
As can be seen, I request the commands to be executed 1s from now. I only have
one MBoard but two channels (X310+2xUBX160).
Now when I execute this code I can see:
[WARNING] [MULTI_USRP] Tune RX at 16:0.423319 for 16:0.423318
[WARNING] [MULTI_USRP] Tune TX at 16:0.423493 for 16:0.423318
It can be seen that the command time (while being the same for RX+TX) is NOT in
the future as compared to the current time. If this is true then it's no
surprise I don't see phase coherence (=constant phase offset for one dsp_freq).
HOW ON EARTH can that be?
Lukas
PS: I tried adding larger time offsets but no change
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com