From 4ea4f870660bef7fa4b6e01423ef8f5cdbdb8131 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 16 Jul 2019 16:42:27 -0700 Subject: rfnoc: radio_control: Add async message handler This will receive async messages from the radio, and print OUL characters where appropriate. When an overrun message is received, it will send an action upstream to initiate overrun handling. --- host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'host/lib/include') diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp index c5e990343..9c3288164 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp @@ -233,6 +233,21 @@ public: static const uint32_t PERIPH_BASE = 0x80000; static const uint32_t PERIPH_REG_OFFSET = 8; + + static const uint32_t SWREG_TX_ERR = 0x0000; + static const uint32_t SWREG_RX_ERR = 0x1000; + static const uint32_t SWREG_CHAN_OFFSET = 64; + }; + + struct err_codes + { + static const uint32_t ERR_RX_LATE_CMD = + 1; // Late command (arrived after indicated time) + static const uint32_t ERR_RX_OVERRUN = 2; // FIFO overflow + static const uint32_t ERR_TX_UNDERRUN = + 1; // Data underflow (data not available when needed) + static const uint32_t ERR_TX_LATE_DATA = + 2; // Late data (arrived after indicated time) }; //! Tree path to the dboard-specific properties @@ -284,6 +299,8 @@ private: std::unordered_map _rx_gain; std::unordered_map _tx_bandwidth; std::unordered_map _rx_bandwidth; + + std::vector _last_stream_cmd; }; }} // namespace uhd::rfnoc -- cgit v1.2.3