From 763eba025e56c1dbe3c24f0fc1139e7530411795 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 26 Nov 2021 15:46:27 +0100 Subject: 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. --- host/lib/rfnoc/replay_block_control.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'host') 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); -- cgit v1.2.3