diff options
author | David Shah <davey1576@gmail.com> | 2018-08-08 19:08:43 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-08-08 19:08:43 +0200 |
commit | a3ae3f97913c291dbe36a49b1a20388156943abc (patch) | |
tree | aa18634d3ea82650dd6e19330bb1ed9c87f472c3 /ecp5/arch_pybindings.cc | |
parent | abf5ea84b9700c72a19327cda1000db0f80b34e0 (diff) | |
download | nextpnr-a3ae3f97913c291dbe36a49b1a20388156943abc.tar.gz nextpnr-a3ae3f97913c291dbe36a49b1a20388156943abc.tar.bz2 nextpnr-a3ae3f97913c291dbe36a49b1a20388156943abc.zip |
ecp5: Update to use const IdStrings in place of PortPin/BelType
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/arch_pybindings.cc')
-rw-r--r-- | ecp5/arch_pybindings.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ecp5/arch_pybindings.cc b/ecp5/arch_pybindings.cc index 1dc9945b..9312b4ad 100644 --- a/ecp5/arch_pybindings.cc +++ b/ecp5/arch_pybindings.cc @@ -39,13 +39,6 @@ void arch_wrap_python() class_<BelPin>("BelPin").def_readwrite("bel", &BelPin::bel).def_readwrite("pin", &BelPin::pin); - enum_<PortPin>("PortPin") -#define X(t) .value("PIN_" #t, PIN_##t) - -#include "portpins.inc" - ; -#undef X - 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) @@ -53,7 +46,7 @@ void arch_wrap_python() .def("place", &Context::place) .def("route", &Context::route); - fn_wrapper_1a<Context, decltype(&Context::getBelType), &Context::getBelType, conv_to_str<BelType>, + fn_wrapper_1a<Context, decltype(&Context::getBelType), &Context::getBelType, conv_to_str<IdString>, conv_from_str<BelId>>::def_wrap(ctx_cls, "getBelType"); fn_wrapper_1a<Context, decltype(&Context::checkBelAvail), &Context::checkBelAvail, pass_through<bool>, conv_from_str<BelId>>::def_wrap(ctx_cls, "checkBelAvail"); @@ -71,7 +64,7 @@ void arch_wrap_python() "getBels"); fn_wrapper_2a<Context, decltype(&Context::getBelPinWire), &Context::getBelPinWire, conv_to_str<WireId>, - conv_from_str<BelId>, conv_from_str<PortPin>>::def_wrap(ctx_cls, "getBelPinWire"); + conv_from_str<BelId>, conv_from_str<IdString>>::def_wrap(ctx_cls, "getBelPinWire"); fn_wrapper_1a<Context, decltype(&Context::getWireBelPins), &Context::getWireBelPins, wrap_context<BelPinRange>, conv_from_str<WireId>>::def_wrap(ctx_cls, "getWireBelPins"); |