RFNoC Split Stream Block
This RFNoC block takes in a single CHDR stream and duplicates it, creating 'Number of Branches' (num_branches) output streams for each input stream.
The 'Number of Inputs' (num_inputs) parameter corresponds to the number of inputs that you want to split. That is, the block creates num_inputs instances of 1:num_branches splitters. The figure below illustrates how the CHDR ports are ordered when num_inputs = 2 and num_branches = 3.
┌──────────┐ Stream A --->│0 0│---> Stream A Stream B --->│1 1│---> Stream B │ 2│---> Stream A │ 3│---> Stream B │ 4│---> Stream A │ 5│---> Stream B └──────────┘
Note that the number of available inputs and outputs are generated during FPGA build time, and GRC doesn't have access to how many inputs and outputs a particular target has. If the provided number for num_inputs or num_branches exceeds what is on the target, then a runtime error will be generated.
Parameters
(R): Run-time adjustable
- Device Select
- Default: -1
- Instance Select
- Default: -1
- These properties specify the device and instance to be used. It is best practice to always explicitly specify both. This is crucial because many USRP setups involve multiple instances of different blocks, and GNU Radio tends to select the first device or instance it finds, which may not be the most suitable choice. Explicit specification helps to prevent errors and ensures the correct setup is used.
- - Use uhd_usrp_probe to determine the correct device and instance numbers.
- - Always specify the device and instance explicitly to avoid automatic mismatches by GNU Radio.
- Even with a single device with multiple instances:
- - 0/Radio#0 → Device 0, Instance 0
- - 0/Radio#1 → Device 0, Instance 1
- Specification with multiple devices:
- - 0/Radio#1 → Device 0, Instance 0
- - 1/Radio#1 → Device 1, Instance 0
- By consistently specifying the device and instance, you ensure that the most appropriate settings are applied and avoid potential issues caused by automatic selection.
- Number of Inputs
- default: 1
- This sets the NUMBER_OF_INPUTS that you want to use.
- Number of Branches
- default: 2
- This sets the number of outputs for every input. Total output number equals NUMBER_OF_INPUTS * NUMBER_OF_BRANCHES.
- IO Type
- options: ['sc16', 'u8']
- This defines the data type for both input and output: either a 16-bit signed integer (sc16) or an 8-bit unsigned integer (u8).
Example Flowgraph
You can find this example at rfnoc_logpwr_split.grc
Source Files
- C++ files
- NA
- Header files
- NA
- Public header files
- NA
- Block definition
- uhd_rfnoc_split_stream.block.yml