aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-07-16 16:42:27 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:31 -0800
commit4ea4f870660bef7fa4b6e01423ef8f5cdbdb8131 (patch)
tree529b9b26c585a40e2e7a1b91b1f35679a25b55ae /host/lib/include
parent5724548f5ce1efae1f8a5de218fafcb26fcc97fa (diff)
downloaduhd-4ea4f870660bef7fa4b6e01423ef8f5cdbdb8131.tar.gz
uhd-4ea4f870660bef7fa4b6e01423ef8f5cdbdb8131.tar.bz2
uhd-4ea4f870660bef7fa4b6e01423ef8f5cdbdb8131.zip
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.
Diffstat (limited to 'host/lib/include')
-rw-r--r--host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp17
1 files changed, 17 insertions, 0 deletions
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<size_t, double> _rx_gain;
std::unordered_map<size_t, double> _tx_bandwidth;
std::unordered_map<size_t, double> _rx_bandwidth;
+
+ std::vector<uhd::stream_cmd_t> _last_stream_cmd;
};
}} // namespace uhd::rfnoc