aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-11-04 11:55:33 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-11-12 12:11:33 -0800
commit09839fa23229daf00cb9b857806d47d2cac50057 (patch)
tree09068ed6dbda6747b1a1730885746c120c6eb934 /host/include
parentbccc2b49ab25551c6fc104a0b69f69121b76031d (diff)
downloaduhd-09839fa23229daf00cb9b857806d47d2cac50057.tar.gz
uhd-09839fa23229daf00cb9b857806d47d2cac50057.tar.bz2
uhd-09839fa23229daf00cb9b857806d47d2cac50057.zip
rfnoc: Add CHDR width to make args
This provides every block controller with a copy of its CHDR width. Note: mock blocks always get configured with a 64-bit CHDR width, to retain API compatibility.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/noc_block_base.hpp4
-rw-r--r--host/include/uhd/rfnoc/noc_block_make_args.hpp6
2 files changed, 9 insertions, 1 deletions
diff --git a/host/include/uhd/rfnoc/noc_block_base.hpp b/host/include/uhd/rfnoc/noc_block_base.hpp
index dbb20b8d2..ab002841c 100644
--- a/host/include/uhd/rfnoc/noc_block_base.hpp
+++ b/host/include/uhd/rfnoc/noc_block_base.hpp
@@ -12,6 +12,7 @@
#include <uhd/rfnoc/defaults.hpp>
#include <uhd/rfnoc/node.hpp>
#include <uhd/rfnoc/register_iface_holder.hpp>
+#include <uhd/rfnoc/rfnoc_types.hpp>
#include <uhd/types/device_addr.hpp>
//! Shorthand for block constructor
@@ -306,6 +307,9 @@ private:
//! The actual MTU value
std::unordered_map<res_source_info, size_t> _mtu;
+ //! CHDR width of this block
+ chdr_w_t _chdr_w;
+
//! Reference to the ctrlport clock_iface object shared with the register_iface
std::shared_ptr<clock_iface> _ctrlport_clock_iface;
diff --git a/host/include/uhd/rfnoc/noc_block_make_args.hpp b/host/include/uhd/rfnoc/noc_block_make_args.hpp
index 9d45c98b0..e2f056849 100644
--- a/host/include/uhd/rfnoc/noc_block_make_args.hpp
+++ b/host/include/uhd/rfnoc/noc_block_make_args.hpp
@@ -9,6 +9,7 @@
#include <uhd/property_tree.hpp>
#include <uhd/rfnoc/noc_block_base.hpp>
#include <uhd/rfnoc/register_iface.hpp>
+#include <uhd/rfnoc/rfnoc_types.hpp>
namespace uhd { namespace rfnoc {
@@ -36,9 +37,12 @@ struct noc_block_base::make_args_t
//! Number of output ports (gets reported from the FPGA)
size_t num_output_ports;
- //! Value of the MTU register
+ //! Value of the MTU register, converted to bytes
size_t mtu;
+ //! CHDR width of this block
+ chdr_w_t chdr_w;
+
//! Register interface to this block's register space
register_iface::sptr reg_iface;