aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-11-26 15:46:27 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-12-01 13:34:59 -0800
commit763eba025e56c1dbe3c24f0fc1139e7530411795 (patch)
treebbaf835ff2cc7e1f2c7460bb14409ed0b0e6078f /host/lib/rfnoc
parent746c896eafd64ff52de535ff4a274cdae05a28c1 (diff)
downloaduhd-763eba025e56c1dbe3c24f0fc1139e7530411795.tar.gz
uhd-763eba025e56c1dbe3c24f0fc1139e7530411795.tar.bz2
uhd-763eba025e56c1dbe3c24f0fc1139e7530411795.zip
rfnoc: replay block: Disable prop and action propagation
The replay block is more like the radio block than like a FIFO. In particular, consider this flow graph: Replay -> DDC -> Replay Imagine you're using the replay block to test the DDC block with prerecorded data. If we treated the Replay Block like a FIFO, then we'd have a loop in the graph (which is already wrong). If we used the DDC to resample, then the input- and output sample rate of the Replay mismatch, which is a legal way to use the Replay block, but not possible if we treat the graph like a loop.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/replay_block_control.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/rfnoc/replay_block_control.cpp b/host/lib/rfnoc/replay_block_control.cpp
index 201390cd1..e2d2523da 100644
--- a/host/lib/rfnoc/replay_block_control.cpp
+++ b/host/lib/rfnoc/replay_block_control.cpp
@@ -79,7 +79,11 @@ public:
uint16_t((_replay_reg_iface.peek32(REG_MEM_SIZE_ADDR) >> 16) & 0xFFFF) / 8),
_mem_size(uint64_t(1ULL << (_replay_reg_iface.peek32(REG_MEM_SIZE_ADDR) & 0xFFFF)))
{
- UHD_ASSERT_THROW(get_num_input_ports() == get_num_output_ports());
+ if (get_num_input_ports() != get_num_output_ports()) {
+ throw uhd::assertion_error(
+ "Replay block has invalid hardware configuration! Number of input ports "
+ "does not match number of output ports.");
+ }
uhd::assert_fpga_compat(MAJOR_COMPAT,
MINOR_COMPAT,
_fpga_compat,
@@ -87,6 +91,11 @@ public:
get_unique_id(),
false /* Let it slide if minors mismatch */
);
+ // Properties and actions can't propagate through this block, as we
+ // treat source and sink of this block like the radio (they terminate
+ // the graph).
+ set_prop_forwarding_policy(forwarding_policy_t::DROP);
+ set_action_forwarding_policy(forwarding_policy_t::DROP);
// Initialize record properties
_record_type.reserve(_num_input_ports);