aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/rfnoc/noc_block_base.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/rfnoc/noc_block_base.cpp b/host/lib/rfnoc/noc_block_base.cpp
index 0b2d456b2..97aaeb002 100644
--- a/host/lib/rfnoc/noc_block_base.cpp
+++ b/host/lib/rfnoc/noc_block_base.cpp
@@ -64,6 +64,26 @@ noc_block_base::~noc_block_base()
// nop
}
+void noc_block_base::set_num_input_ports(const size_t num_ports)
+{
+ if (num_ports > get_num_input_ports()) {
+ throw uhd::value_error(
+ "New number of input ports must not exceed current number!");
+ }
+
+ _num_input_ports = num_ports;
+}
+
+void noc_block_base::set_num_output_ports(const size_t num_ports)
+{
+ if (num_ports > get_num_output_ports()) {
+ throw uhd::value_error(
+ "New number of output ports must not exceed current number!");
+ }
+
+ _num_output_ports = num_ports;
+}
+
void noc_block_base::set_tick_rate(const double tick_rate)
{