aboutsummaryrefslogtreecommitdiffstats
path: root/generic/arch_pybindings.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-07-24 20:21:31 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-07-24 20:21:31 +0200
commitc9c3d970c918f9c91d9886467d7957cbc49bd6b1 (patch)
treebd661f4e30863ae1d4c6ba8a41c9222a0314884e /generic/arch_pybindings.cc
parenta08b71c676ff664828105654e3c09e13fa690270 (diff)
downloadnextpnr-c9c3d970c918f9c91d9886467d7957cbc49bd6b1.tar.gz
nextpnr-c9c3d970c918f9c91d9886467d7957cbc49bd6b1.tar.bz2
nextpnr-c9c3d970c918f9c91d9886467d7957cbc49bd6b1.zip
Fixed pybiding so generic can work and ecp5 expose all needed
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