blob: 66ce47ffa079037f417a96069a0f2ce7916f86e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//
// 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
*
* \ingroup rfnoc_blocks
*
* 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
|