diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-03-19 09:38:51 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-28 14:49:32 -0500 |
commit | 9c67396ec175acc84667085a9c8ab2b9247b6eb8 (patch) | |
tree | 146f7fe58690bdb45919f451e5a844191934bd3f /host/include | |
parent | 2f134ac1a745491094951d409fcf3f4588d66348 (diff) | |
download | uhd-9c67396ec175acc84667085a9c8ab2b9247b6eb8.tar.gz uhd-9c67396ec175acc84667085a9c8ab2b9247b6eb8.tar.bz2 uhd-9c67396ec175acc84667085a9c8ab2b9247b6eb8.zip |
rfnoc: Add support for Split Stream RFNoC block
The split stream RFNoC block is an RFNoC block that takes in a single
CHDR stream and duplicates it, creating a number of output streams for
each input stream. Consult the split_stream_block_control class header
file for more details on block configuration and behavior, including how
property and action forwarding is handled by the block.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/rfnoc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/defaults.hpp | 1 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/split_stream_block_control.hpp | 63 |
3 files changed, 65 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/CMakeLists.txt b/host/include/uhd/rfnoc/CMakeLists.txt index 24409fbf9..f86c04850 100644 --- a/host/include/uhd/rfnoc/CMakeLists.txt +++ b/host/include/uhd/rfnoc/CMakeLists.txt @@ -39,6 +39,7 @@ UHD_INSTALL(FILES fosphor_block_control.hpp null_block_control.hpp radio_control.hpp + split_stream_block_control.hpp vector_iir_block_control.hpp DESTINATION ${INCLUDE_DIR}/uhd/rfnoc diff --git a/host/include/uhd/rfnoc/defaults.hpp b/host/include/uhd/rfnoc/defaults.hpp index 053834335..ba9907a11 100644 --- a/host/include/uhd/rfnoc/defaults.hpp +++ b/host/include/uhd/rfnoc/defaults.hpp @@ -77,6 +77,7 @@ static const noc_id_t DUC_BLOCK = 0xD0C00000; static const noc_id_t DDC_BLOCK = 0xDDC00000; static const noc_id_t FIR_FILTER_BLOCK = 0xf1120000; static const noc_id_t FOSPHOR_BLOCK = 0x666F0000; +static const noc_id_t SPLIT_STREAM_BLOCK = 0x57570000; static const noc_id_t VECTOR_IIR_BLOCK = 0x11120000; }} // namespace uhd::rfnoc diff --git a/host/include/uhd/rfnoc/split_stream_block_control.hpp b/host/include/uhd/rfnoc/split_stream_block_control.hpp new file mode 100644 index 000000000..596d7f19c --- /dev/null +++ b/host/include/uhd/rfnoc/split_stream_block_control.hpp @@ -0,0 +1,63 @@ +// +// Copyright 2020 Ettus Research, a National Instruments Brand +// +// SPDX-License-Identifier: GPL-3.0-or-later +// + +#pragma once + +#include <uhd/config.hpp> +#include <uhd/rfnoc/noc_block_base.hpp> + +namespace uhd { namespace rfnoc { + +/*! Split Stream Block Control Class + * + * The Split Stream Block is an RFNoC block that takes in a single CHDR + * stream and duplicates it, creating a number of output streams for each + * input stream. The number of streams is defined by the NUM_PORTS parameter + * used to instantiate the RFNoC block in the image, while the number of + * output branches is defined by the NUM_BRANCH parameter. In software, this + * corresponds to an RFNoC block having NUM_PORTS input ports and + * NUM_PORTS * NUM_BRANCH output ports. + * + * Given the following example of a split stream RFNoC block with + * NUM_PORTS = 2 and NUM_BRANCH = 3, the input streams map to output branches + * and streams as follows. The number located at each input and output + * indicates the port number corresponding to that stream and branch: + * + * +----------+ + * Stream A --->|0 0|---> Stream A } Branch 0 + * Stream B --->|1 1|---> Stream B + * | 2|---> Stream A } Branch 1 + * | 3|---> Stream B + * | 4|---> Stream A } Branch 2 + * | 5|---> Stream B + * +----------+ + * + * In other words, the port number corresponding to stream S of branch B is + * given by B * (num_input_ports) + S. + * + * \section ss_fwd_behavior Property Propagation and Action Forwarding Behavior + * + * The default behavior of the split stream block controller is to propagate + * properties received on a particular stream to all branches of that stream. + * For example, if a property is received at branch 0, stream B in the example + * above, that property will be propagated to stream B in branches 1 and 2 + * AND to stream B in the input. The property will not propagate across + * streams. + * + * For actions, an action received on a particular stream is forwarded to + * that stream on *all opposite* branches. If in the example above, an action + * is received at branch 2, stream A, it will be forwarded to stream A on the + * input side. Similarly, if an action is received on stream B of the input, + * it will be forwarded to stream B on branches 0, 1, AND 2. + */ +class UHD_API split_stream_block_control : public noc_block_base +{ +public: + RFNOC_DECLARE_BLOCK(split_stream_block_control) +}; + +}} // namespace uhd::rfnoc + |