From 8daa80c05f8006697aea05fea4ac5cd4dabbaef1 Mon Sep 17 00:00:00 2001 From: michael-west Date: Mon, 7 Mar 2022 09:47:05 -0800 Subject: rfnoc: Fix test_timed_commands for RFNoC devices - Added command time to readback of time from Radio block. - Added wait for time to readback of shared registers in Radio block. Signed-off-by: michael-west --- host/lib/rfnoc/radio_control_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 6ca8419d0..0ea24fc60 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -314,7 +314,9 @@ uint64_t radio_control_impl::get_ticks_now() if (_fpga_compat < 1) { return get_mb_controller()->get_timekeeper(0)->get_ticks_now(); } - return regs().peek64(regmap::REG_TIME_LO); + // Applying the command time here allows for testing of timed commands, + // but all register accesses should use the command time by default. + return regs().peek64(regmap::REG_TIME_LO, get_command_time(0)); } uhd::time_spec_t radio_control_impl::get_time_now() -- cgit v1.2.3