mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
rfnoc: Update the MTU forwarding property for some blocks
Note that the default MTU forwarding policy is ONE_TO_ONE, therefore, it is only strictly necessary to modify the MTU forwarding policy for blocks that route data in a different manner. However, it may be nice to explicitly state the forwarding policy for the benefit of the reader. The following blocks had their policies updated: - addsub: ONE_TO_FAN - duc: ONE_TO_ONE - dmafifo: ONE_TO_ONE - null block: DROP - replay block: DROP - split stream: ONE_TO_FAN - switchboard: ONE_TO_FAN
This commit is contained in:
parent
cba3c8351d
commit
930fa39c60
@ -37,6 +37,9 @@ public:
|
||||
// opposite side from which they are received.
|
||||
set_prop_forwarding_policy(forwarding_policy_t::ONE_TO_FAN);
|
||||
set_action_forwarding_policy(forwarding_policy_t::ONE_TO_FAN);
|
||||
// MTU is also fanned out the same way as we produce output packets the
|
||||
// same size as input packets.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_FAN);
|
||||
|
||||
// Register the block's edge type properties.
|
||||
register_property(&_prop_type_in_a);
|
||||
|
||||
@ -74,6 +74,8 @@ public:
|
||||
<< " halfbands and "
|
||||
"max CIC decimation "
|
||||
<< _cic_max_decim);
|
||||
// This line is not strictly necessary, as ONE_TO_ONE is the default.
|
||||
// We set it make it explicit how this block works.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_ONE);
|
||||
// Load list of valid decimation values
|
||||
std::set<size_t> decims{1}; // 1 is always a valid decimation
|
||||
|
||||
@ -30,6 +30,9 @@ public:
|
||||
UHD_ASSERT_THROW(get_num_input_ports() == get_num_output_ports());
|
||||
set_action_forwarding_policy(forwarding_policy_t::ONE_TO_ONE);
|
||||
set_prop_forwarding_policy(forwarding_policy_t::ONE_TO_ONE);
|
||||
// This line is not strictly necessary, as ONE_TO_ONE is the default.
|
||||
// We set it make it explicit how this block works.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_ONE);
|
||||
// Now init DMA/DRAM control
|
||||
_fifo_cores.reserve(get_num_input_ports());
|
||||
for (size_t i = 0; i < get_num_input_ports(); i++) {
|
||||
|
||||
@ -72,6 +72,10 @@ public:
|
||||
<< " halfbands and "
|
||||
"max CIC interpolation "
|
||||
<< _cic_max_interp);
|
||||
// This line is not strictly necessary, as ONE_TO_ONE is the default.
|
||||
// We set it make it explicit how this block works. Output packets have
|
||||
// the same size as the input packet.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_ONE);
|
||||
// Load list of valid interpolation values
|
||||
std::set<size_t> interps{1}; // 1 is always a valid interpolation
|
||||
for (size_t hb = 0; hb < _num_halfbands; hb++) {
|
||||
|
||||
@ -40,6 +40,9 @@ class null_block_control_impl : public null_block_control
|
||||
public:
|
||||
RFNOC_BLOCK_CONSTRUCTOR(null_block_control)
|
||||
{
|
||||
// This block doesn't pass through packets, so the MTU can differ on
|
||||
// input and output.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::DROP);
|
||||
uint32_t initial_state = regs().peek32(REG_CTRL_STATUS);
|
||||
_streaming = initial_state & 0x2;
|
||||
_nipc = (initial_state >> 24) & 0xFF;
|
||||
|
||||
@ -96,6 +96,8 @@ public:
|
||||
// the graph).
|
||||
set_prop_forwarding_policy(forwarding_policy_t::DROP);
|
||||
set_action_forwarding_policy(forwarding_policy_t::DROP);
|
||||
// Same for MTU
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::DROP);
|
||||
|
||||
// Initialize record properties
|
||||
_record_type.reserve(_num_input_ports);
|
||||
|
||||
@ -41,6 +41,10 @@ public:
|
||||
// the split stream block.
|
||||
set_prop_forwarding_policy(forwarding_policy_t::USE_MAP);
|
||||
set_action_forwarding_policy(forwarding_policy_t::USE_MAP);
|
||||
// MTU forwarding doesn't allow for USE_MAP, but we assume that packets
|
||||
// coming in may potentially go to any output port. We thus fan out the
|
||||
// MTU propagation.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_FAN);
|
||||
|
||||
// Property propagation scheme (X --> Y means 'Properties received on
|
||||
// X propagate to Y'):
|
||||
|
||||
@ -36,6 +36,10 @@ public:
|
||||
// Configure property propagation and action forwarding behavior.
|
||||
set_prop_forwarding_policy(forwarding_policy_t::USE_MAP);
|
||||
set_action_forwarding_policy(forwarding_policy_t::USE_MAP);
|
||||
// MTU forwarding doesn't allow for USE_MAP, but we assume that packets
|
||||
// coming in may potentially go to any output port. We thus fan out the
|
||||
// MTU propagation.
|
||||
set_mtu_forwarding_policy(forwarding_policy_t::ONE_TO_FAN);
|
||||
|
||||
_update_forwarding_map();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user