From 9b78da222fb5e51c1ad9ccd6887d1cf85c4c7926 Mon Sep 17 00:00:00 2001 From: michael-west Date: Thu, 4 Nov 2021 13:53:20 -0700 Subject: host: Add ability to get time from Radio block Add API calls to Radio control to get ticks and time. Signed-off-by: michael-west --- host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp') diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp index 0ff0e9b12..b60b0f2a2 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp @@ -58,6 +58,12 @@ public: meta_range_t get_rate_range() const override; size_t get_spc() const override; + /************************************************************************** + * Time-Related API Calls + *************************************************************************/ + uint64_t get_ticks_now() override; + uhd::time_spec_t get_time_now() override; + /************************************************************************** * RF-specific API calls *************************************************************************/ @@ -209,6 +215,10 @@ public: { static const uint32_t REG_COMPAT_NUM = 0x00; // Compatibility number register offset + static const uint32_t REG_TIME_LO = + 0x04; // Time lower bits + static const uint32_t REG_TIME_HI = + 0x08; // Time upper bits static const uint32_t REG_RADIO_WIDTH = 0x1000 + 0x04; // Upper 16 bits is sample width, lower 16 bits is NSPC -- cgit v1.2.3