aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/fir_filter_block_control_python.hpp23
-rw-r--r--host/python/pyuhd.cpp2
-rw-r--r--host/python/uhd/rfnoc.py1
3 files changed, 26 insertions, 0 deletions
diff --git a/host/lib/rfnoc/fir_filter_block_control_python.hpp b/host/lib/rfnoc/fir_filter_block_control_python.hpp
new file mode 100644
index 000000000..269f61669
--- /dev/null
+++ b/host/lib/rfnoc/fir_filter_block_control_python.hpp
@@ -0,0 +1,23 @@
+//
+// Copyright 2020 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#pragma once
+
+#include "block_controller_factory_python.hpp"
+#include <uhd/rfnoc/fir_filter_block_control.hpp>
+
+using namespace uhd::rfnoc;
+
+void export_fir_filter_block_control(py::module& m)
+{
+ py::class_<fir_filter_block_control, noc_block_base, fir_filter_block_control::sptr>(
+ m, "fir_filter_block_control")
+ .def(py::init(&block_controller_factory<fir_filter_block_control>::make_from))
+ .def("get_max_num_coefficients",
+ &fir_filter_block_control::get_max_num_coefficients)
+ .def("set_coefficients", &fir_filter_block_control::set_coefficients)
+ .def("get_coefficients", &fir_filter_block_control::get_coefficients);
+}
diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp
index dacf60acf..2551c8320 100644
--- a/host/python/pyuhd.cpp
+++ b/host/python/pyuhd.cpp
@@ -16,6 +16,7 @@ namespace py = pybind11;
#include "cal/cal_python.hpp"
#include "rfnoc/ddc_block_control_python.hpp"
#include "rfnoc/duc_block_control_python.hpp"
+#include "rfnoc/fir_filter_block_control_python.hpp"
#include "rfnoc/fosphor_block_control_python.hpp"
#include "rfnoc/rfnoc_python.hpp"
#include "stream_python.hpp"
@@ -80,6 +81,7 @@ PYBIND11_MODULE(libpyuhd, m)
export_ddc_block_control(rfnoc_module);
export_duc_block_control(rfnoc_module);
export_fosphor_block_control(rfnoc_module);
+ export_fir_filter_block_control(rfnoc_module);
// Register calibration submodule
auto cal_module = m.def_submodule("cal", "Calibration Objects");
diff --git a/host/python/uhd/rfnoc.py b/host/python/uhd/rfnoc.py
index c121d65a8..a238b5bb5 100644
--- a/host/python/uhd/rfnoc.py
+++ b/host/python/uhd/rfnoc.py
@@ -21,4 +21,5 @@ NocBlock = lib.rfnoc.noc_block_base
DdcBlockControl = lib.rfnoc.ddc_block_control
DucBlockControl = lib.rfnoc.duc_block_control
FosphorBlockControl = lib.rfnoc.fosphor_block_control
+FirFilterBlockControl = lib.rfnoc.fir_filter_block_control