aboutsummaryrefslogtreecommitdiffstats
path: root/generic/arch_pybindings.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 21:25:41 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 21:25:41 +0200
commit5a7e7b2d039cdad68c6651e67765d7adb2282f25 (patch)
tree398eae8d7dccb7acc5e88022fdb1df48552fdaa4 /generic/arch_pybindings.cc
parent6a7f3cd336ebb35389d0c4ee4f8b457d2a2e026a (diff)
parentede3cc1459c3d0fd9501358ae91ca74bb7ee0047 (diff)
downloadnextpnr-5a7e7b2d039cdad68c6651e67765d7adb2282f25.tar.gz
nextpnr-5a7e7b2d039cdad68c6651e67765d7adb2282f25.tar.bz2
nextpnr-5a7e7b2d039cdad68c6651e67765d7adb2282f25.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'generic/arch_pybindings.cc')
-rw-r--r--generic/arch_pybindings.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc
index a99723f2..186b2c13 100644
--- a/generic/arch_pybindings.cc
+++ b/generic/arch_pybindings.cc
@@ -20,12 +20,22 @@
#ifndef NO_PYTHON
+#include "arch_pybindings.h"
#include "nextpnr.h"
#include "pybindings.h"
NEXTPNR_NAMESPACE_BEGIN
-void arch_wrap_python() { class_<ArchArgs>("ArchArgs"); }
+void arch_wrap_python()
+{
+ using namespace PythonConversion;
+ auto arch_cls = class_<Arch, Arch *, bases<BaseCtx>, boost::noncopyable>("Arch", init<ArchArgs>());
+ auto ctx_cls = class_<Context, Context *, bases<Arch>, boost::noncopyable>("Context", no_init)
+ .def("checksum", &Context::checksum)
+ .def("pack", &Context::pack)
+ .def("place", &Context::place)
+ .def("route", &Context::route);
+}
NEXTPNR_NAMESPACE_END