rogue
Loading...
Searching...
No Matches
module.cpp
Go to the documentation of this file.
1
18#include "rogue/Directives.h"
19
21
22#include <boost/python.hpp>
23
26
27namespace bp = boost::python;
28namespace rha = rogue::hardware::axi;
30
32 // map the IO namespace to a sub-module
33 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.hardware.axi"))));
34
35 // make "from mypackage import class1" work
36 bp::scope().attr("axi") = module;
37
38 // set the current scope to the new sub-module
39 bp::scope io_scope = module;
40
41 rha::AxiStreamDma::setup_python();
42 rha::AxiMemMap::setup_python();
43}