diff options
Diffstat (limited to 'host/python')
-rw-r--r-- | host/python/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/python/__init__.py | 1 | ||||
-rw-r--r-- | host/python/pyuhd.cpp | 6 | ||||
-rw-r--r-- | host/python/rfnoc.py | 18 |
4 files changed, 26 insertions, 0 deletions
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt index 5598dda24..2b2a35d2e 100644 --- a/host/python/CMakeLists.txt +++ b/host/python/CMakeLists.txt @@ -52,6 +52,7 @@ set(PYUHD_FILES ${CMAKE_CURRENT_SOURCE_DIR}/types.py ${CMAKE_CURRENT_SOURCE_DIR}/usrp.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.py + ${CMAKE_CURRENT_SOURCE_DIR}/rfnoc.py ) set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") diff --git a/host/python/__init__.py b/host/python/__init__.py index 501b599ef..bf37f5215 100644 --- a/host/python/__init__.py +++ b/host/python/__init__.py @@ -10,3 +10,4 @@ UHD Python API module from . import types from . import usrp from . import filters +from . import rfnoc diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp index e38dc9224..50434b4fc 100644 --- a/host/python/pyuhd.cpp +++ b/host/python/pyuhd.cpp @@ -13,6 +13,8 @@ namespace py = pybind11; +#include "rfnoc/rfnoc_python.hpp" + #include "stream_python.hpp" #include "types/types_python.hpp" @@ -72,5 +74,9 @@ PYBIND11_MODULE(libpyuhd, m) // Register filters submodule auto filters_module = m.def_submodule("filters", "Filter Submodule"); export_filters(filters_module); + + // Register RFNoC submodule + auto rfnoc_module = m.def_submodule("rfnoc", "RFNoC Objects"); + export_rfnoc(rfnoc_module); } diff --git a/host/python/rfnoc.py b/host/python/rfnoc.py new file mode 100644 index 000000000..690b3d841 --- /dev/null +++ b/host/python/rfnoc.py @@ -0,0 +1,18 @@ +# +# Copyright 2019 Ettus Research, a National Instruments Brand +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +""" @package rfnoc +Python UHD module containing the RFNoC API. +""" + +from . import libpyuhd as lib + +BlockID = lib.rfnoc.block_id +Edge = lib.rfnoc.edge +GraphEdge = lib.rfnoc.graph_edge +RfnocGraph = lib.rfnoc.rfnoc_graph +MBController = lib.rfnoc.mb_controller +Timekeeper = lib.rfnoc.timekeeper +NocBlock = lib.rfnoc.noc_block_base |