18 #define RFNOC_BLOCK_CONSTRUCTOR(CLASS_NAME) \ 19 CLASS_NAME##_impl(make_args_ptr make_args) : CLASS_NAME(std::move(make_args)) 21 #define RFNOC_DECLARE_BLOCK(CLASS_NAME) \ 22 using sptr = std::shared_ptr<CLASS_NAME>; \ 23 CLASS_NAME(make_args_ptr make_args) : noc_block_base(std::move(make_args)) {} 25 namespace uhd {
namespace rfnoc {
47 using sptr = std::shared_ptr<noc_block_base>;
63 return get_block_id().to_string();
74 return _num_input_ports;
85 return _num_output_ports;
113 double get_tick_rate()
const;
160 void set_num_input_ports(
const size_t num_ports);
174 void set_num_output_ports(
const size_t num_ports);
181 void set_tick_rate(
const double tick_rate);
211 void set_mtu_forwarding_policy(
const forwarding_policy_t policy);
239 std::shared_ptr<mb_controller> get_mb_controller();
258 virtual void deinit();
266 void _set_tick_rate(
const double tick_rate);
273 void shutdown()
override;
287 size_t _num_input_ports;
290 size_t _num_output_ports;
294 std::vector<property_t<double>> _tick_rate_props;
297 forwarding_policy_t _mtu_fwd_policy = forwarding_policy_t::DROP;
300 bool _mtu_fwd_policy_set =
false;
304 std::vector<property_t<size_t>> _mtu_props;
307 std::unordered_map<res_source_info, size_t> _mtu;
310 std::shared_ptr<clock_iface> _ctrlport_clock_iface;
313 std::shared_ptr<clock_iface> _tb_clock_iface;
317 std::shared_ptr<mb_controller> _mb_controller;
const block_id_t & get_block_id() const
Definition: noc_block_base.hpp:104
Definition: register_iface_holder.hpp:18
uhd::property_tree::sptr & get_tree()
Return a reference to this block's subtree (non-const version)
Definition: noc_block_base.hpp:143
std::string get_unique_id() const override
Unique ID for an RFNoC block is its block ID.
Definition: noc_block_base.hpp:61
Definition: block_id.hpp:39
Definition: build_info.hpp:12
Definition: noc_block_base.hpp:41
noc_id_t get_noc_id() const
Definition: noc_block_base.hpp:95
uhd::property_tree::sptr & get_tree() const
Return a reference to this block's subtree.
Definition: noc_block_base.hpp:137
Definition: res_source_info.hpp:17
size_t get_num_output_ports() const override
Number of output ports. Note: This gets passed outto this block from the.
Definition: noc_block_base.hpp:83
size_t get_num_input_ports() const override
Number of input ports. Note: This gets passed into this block from the.
Definition: noc_block_base.hpp:72
std::shared_ptr< noc_block_base > sptr
Definition: noc_block_base.hpp:47
#define UHD_API
Definition: config.h:70
Definition: property.hpp:25
Definition: noc_block_make_args.hpp:23
uint32_t noc_id_t
Definition: defaults.hpp:54
std::shared_ptr< property_tree > sptr
Definition: property_tree.hpp:216
std::unique_ptr< make_args_t > make_args_ptr
Opaque pointer to the constructor arguments.
Definition: noc_block_base.hpp:53
uhd::device_addr_t get_block_args() const
Definition: noc_block_base.hpp:131
Definition: device_addr.hpp:37