diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2020-06-27 13:24:30 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2020-06-27 13:24:30 +0200 |
commit | 929a1cc7e4b0327e75212e4cabd6a60ef21ea1d9 (patch) | |
tree | 7015737e4cb52eaf8d3d371e3ce7d9b93df4c1b5 /ice40 | |
parent | 7a95629aff3fac96067fba8cddd9743289dcca2d (diff) | |
download | nextpnr-929a1cc7e4b0327e75212e4cabd6a60ef21ea1d9.tar.gz nextpnr-929a1cc7e4b0327e75212e4cabd6a60ef21ea1d9.tar.bz2 nextpnr-929a1cc7e4b0327e75212e4cabd6a60ef21ea1d9.zip |
Make python bindings consistent
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/arch_pybindings.cc | 5 | ||||
-rw-r--r-- | ice40/arch_pybindings.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ice40/arch_pybindings.cc b/ice40/arch_pybindings.cc index e2022091..88065065 100644 --- a/ice40/arch_pybindings.cc +++ b/ice40/arch_pybindings.cc @@ -57,10 +57,13 @@ void arch_wrap_python() .def("place", &Context::place) .def("route", &Context::route); + fn_wrapper_2a<Context, decltype(&Context::isValidBelForCell), &Context::isValidBelForCell, pass_through<bool>, + addr_and_unwrap<CellInfo>, conv_from_str<BelId>>::def_wrap(ctx_cls, "isValidBelForCell"); + typedef std::unordered_map<IdString, std::unique_ptr<CellInfo>> CellMap; typedef std::unordered_map<IdString, std::unique_ptr<NetInfo>> NetMap; - typedef std::unordered_map<IdString, HierarchicalCell> HierarchyMap; typedef std::unordered_map<IdString, IdString> AliasMap; + typedef std::unordered_map<IdString, HierarchicalCell> HierarchyMap; auto belpin_cls = class_<ContextualWrapper<BelPin>>("BelPin", no_init); readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel"); diff --git a/ice40/arch_pybindings.h b/ice40/arch_pybindings.h index 7c15b269..cf343976 100644 --- a/ice40/arch_pybindings.h +++ b/ice40/arch_pybindings.h @@ -23,7 +23,6 @@ #include "nextpnr.h" #include "pybindings.h" -#include "pywrappers.h" NEXTPNR_NAMESPACE_BEGIN |