diff options
author | David Shah <davey1576@gmail.com> | 2018-06-23 19:51:22 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-23 19:51:22 +0200 |
commit | 37bad1f99ed8c50cd815b588341a5b0fc4200af0 (patch) | |
tree | bc4e86e1046d06a4145e6b6763e0cd0fd736bc66 | |
parent | 3407d7638313ec6bb989088c81a30f99e8ec94b1 (diff) | |
download | nextpnr-37bad1f99ed8c50cd815b588341a5b0fc4200af0.tar.gz nextpnr-37bad1f99ed8c50cd815b588341a5b0fc4200af0.tar.bz2 nextpnr-37bad1f99ed8c50cd815b588341a5b0fc4200af0.zip |
Fixing the Python bindings following Context/Arch refactoring
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r-- | common/pybindings.cc | 6 | ||||
-rw-r--r-- | ice40/pybindings.cc | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/common/pybindings.cc b/common/pybindings.cc index cc4ad006..3a43478c 100644 --- a/common/pybindings.cc +++ b/common/pybindings.cc @@ -108,7 +108,7 @@ BOOST_PYTHON_MODULE(MODULE_NAME) WRAP_MAP(decltype(CellInfo::ports), "IdPortMap"); // WRAP_MAP(decltype(CellInfo::pins), "IdIdMap"); - class_<Context, Context *>("Context", no_init) + class_<BaseCtx, BaseCtx *>("BaseCtx", no_init) .def_readwrite("nets", &Context::nets) .def_readwrite("cells", &Context::cells); @@ -123,6 +123,8 @@ BOOST_PYTHON_MODULE(MODULE_NAME) .def(self < self) .def(self == self); arch_wrap_python(); + + class_<Context, Context *, bases<Arch>>("Context", no_init).def("checksum", &Context::checksum); } void arch_appendinittab() { PyImport_AppendInittab(TOSTRING(MODULE_NAME), PYINIT_MODULE_NAME); } @@ -179,4 +181,4 @@ void execute_python_file(const char *python_file) NEXTPNR_NAMESPACE_END -#endif // NO_PYTHON
\ No newline at end of file +#endif // NO_PYTHON diff --git a/ice40/pybindings.cc b/ice40/pybindings.cc index 4c707e65..bb591289 100644 --- a/ice40/pybindings.cc +++ b/ice40/pybindings.cc @@ -53,7 +53,7 @@ void arch_wrap_python() ; #undef X - class_<Arch>("Arch", init<ArchArgs>()) + class_<Arch, Arch *, bases<BaseCtx>>("Arch", init<ArchArgs>()) .def("getBelByName", &Arch::getBelByName) .def("getWireByName", &Arch::getWireByName) .def("getBelName", &Arch::getBelName) @@ -85,4 +85,4 @@ void arch_wrap_python() NEXTPNR_NAMESPACE_END -#endif // NO_PYTHON
\ No newline at end of file +#endif // NO_PYTHON |