aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2021-08-25 12:10:43 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-08-30 12:27:56 -0500
commit67e6234a0546a61661799873d8651f6e4e791536 (patch)
tree7f67466fc70ad408e8a51a07b9f9e9493352a360 /host/lib/rfnoc
parenta6d43465e6370bfaa27a408d9ac5fb24975f1659 (diff)
downloaduhd-67e6234a0546a61661799873d8651f6e4e791536.tar.gz
uhd-67e6234a0546a61661799873d8651f6e4e791536.tar.bz2
uhd-67e6234a0546a61661799873d8651f6e4e791536.zip
python: Add new method bindings to noc_block_base
This commit adds `get_src_epid()` and `get_port_num()` method bindings to the Python bindings for `noc_block_base`.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/rfnoc_python.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/rfnoc/rfnoc_python.hpp b/host/lib/rfnoc/rfnoc_python.hpp
index 6eb669b1c..f19ce8fa7 100644
--- a/host/lib/rfnoc/rfnoc_python.hpp
+++ b/host/lib/rfnoc/rfnoc_python.hpp
@@ -424,6 +424,14 @@ void export_rfnoc(py::module& m)
py::arg("timeout"),
py::arg("time"),
py::arg("ack") = false)
+ .def("get_src_epid",
+ [](noc_block_base& self) {
+ return self.regs().get_src_epid();
+ })
+ .def("get_port_num",
+ [](noc_block_base& self) {
+ return self.regs().get_port_num();
+ })
.def("__repr__",
[](noc_block_base& self) {
return "<NocBlock for block ID '" + self.get_unique_id() + "'>";