From 09839fa23229daf00cb9b857806d47d2cac50057 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 4 Nov 2021 11:55:33 +0100 Subject: 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. --- host/include/uhd/rfnoc/noc_block_base.hpp | 4 ++++ host/include/uhd/rfnoc/noc_block_make_args.hpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'host/include') 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 #include #include +#include #include //! Shorthand for block constructor @@ -306,6 +307,9 @@ private: //! The actual MTU value std::unordered_map _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 _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 #include #include +#include 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; -- cgit v1.2.3