From 9b8e4e652c168e76f7cf2ca0a699640961b8e6ce Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 26 Jul 2019 15:08:18 -0700 Subject: rfnoc: Add MTU tracking MTUs are now tracked through the framework for all childs of noc_block_base. Every edge gets an 'mtu' property. MTU can be set and get either through the prop API, or through new API calls (get_mtu(), set_mtu()). It is also possible to create custom properties that depend on the MTU by asking for a reference to the MTU property, and then adding that to the input list of a property resolver. The radio_control_impl includes a change in this commit where it sets the spp based on the MTU. Blocks can also set an MTU forwarding policy. The DDC block includes a change in this commit that sets a forwarding policy of ONE_TO_ONE, meaning that the MTU on an input edge is forwarded to the corresponding output edge (but not the other edges, as with the tick rate). --- host/lib/rfnoc/rfnoc_graph.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib/rfnoc/rfnoc_graph.cpp') diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index bf49ca28b..511e61f05 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -409,6 +409,8 @@ private: make_args_uptr->block_id = block_id; make_args_uptr->num_input_ports = block_info.num_inputs; make_args_uptr->num_output_ports = block_info.num_outputs; + make_args_uptr->mtu = + (1 << block_info.data_mtu) * chdr_w_to_bits(mb.get_chdr_w()) / 8; make_args_uptr->reg_iface = block_reg_iface; make_args_uptr->tb_clk_iface = tb_clk_iface; make_args_uptr->ctrlport_clk_iface = ctrlport_clk_iface; -- cgit v1.2.3