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;
29
31 // map the IO namespace to a sub-module
32 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.protocols.xilinx"))));
33
34 // make "from mypackage import class1" work
35 bp::scope().attr("xilinx") = module;
36
37 // set the current scope to the new sub-module
38 bp::scope io_scope = module;
39
40 rpx::JtagDriver::setup_python();
41 rpx::Xvc::setup_python();
42}