diff options
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/switchboard_block_control.hpp | 48 |
3 files changed, 50 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/CMakeLists.txt b/host/include/uhd/rfnoc/CMakeLists.txt index 3249b51f3..7a1602f90 100644 --- a/host/include/uhd/rfnoc/CMakeLists.txt +++ b/host/include/uhd/rfnoc/CMakeLists.txt @@ -45,6 +45,7 @@ UHD_INSTALL(FILES null_block_control.hpp radio_control.hpp split_stream_block_control.hpp + switchboard_block_control.hpp vector_iir_block_control.hpp window_block_control.hpp diff --git a/host/include/uhd/rfnoc/defaults.hpp b/host/include/uhd/rfnoc/defaults.hpp index 9964467d3..ac230b57d 100644 --- a/host/include/uhd/rfnoc/defaults.hpp +++ b/host/include/uhd/rfnoc/defaults.hpp @@ -83,6 +83,7 @@ static const noc_id_t FOSPHOR_BLOCK = 0x666F0000; static const noc_id_t LOGPWR_BLOCK = 0x4C500000; static const noc_id_t MOVING_AVERAGE_BLOCK = 0xAAD20000; static const noc_id_t SPLIT_STREAM_BLOCK = 0x57570000; +static const noc_id_t SWITCHBOARD_BLOCK = 0xBE110000; static const noc_id_t RADIO_BLOCK = 0x12AD1000; static const noc_id_t VECTOR_IIR_BLOCK = 0x11120000; static const noc_id_t WINDOW_BLOCK = 0xD0530000; diff --git a/host/include/uhd/rfnoc/switchboard_block_control.hpp b/host/include/uhd/rfnoc/switchboard_block_control.hpp new file mode 100644 index 000000000..0b0b4c722 --- /dev/null +++ b/host/include/uhd/rfnoc/switchboard_block_control.hpp @@ -0,0 +1,48 @@ +// +// 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 { + +/*! Switchboard Block Control Class + * + * The Switchboard Block is an RFNoC block that routes any single input to any + * single output. Routing is 1 to 1, that is, an input port can only be connected + * to one output port, and vice versa. + * + * INIT: This block is initialized with only input port 0 connected to output + * port 0. + * + * NOTE: This block is not intended to switch during the transmission of packets. + * Data on disconnected inputs will stall. + */ +class UHD_API switchboard_block_control : public noc_block_base +{ +public: + RFNOC_DECLARE_BLOCK(switchboard_block_control) + + // Block registers + static const uint32_t REG_BLOCK_SIZE; + + static const uint32_t REG_DEMUX_SELECT_ADDR; + static const uint32_t REG_MUX_SELECT_ADDR; + + /*! Connects an input to an output + * + * Bridges an input to an output. Any existing connections on + * either the input or output will be dropped. + * + * \param input Index of the input port. + * \param output Index of the output port. + */ + virtual void connect(const size_t input, const size_t output) = 0; +}; + +}} // namespace uhd::rfnoc |