diff options
Diffstat (limited to 'ice40/pybindings.cc')
-rw-r--r-- | ice40/pybindings.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ice40/pybindings.cc b/ice40/pybindings.cc index daf0be84..fb5d7763 100644 --- a/ice40/pybindings.cc +++ b/ice40/pybindings.cc @@ -46,6 +46,20 @@ void arch_wrap_python() .def_readwrite("index", &WireId::index) .def("nil", &WireId::nil); + class_<PipId>("PipId") + .def_readwrite("index", &PipId::index) + .def("nil", &WireId::nil); + + 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 + class_<Chip>("Chip", init<ChipArgs>()) .def("getBelByName", &Chip::getBelByName) .def("getWireByName", &Chip::getWireByName) |