himbaechel: Add Python binding for get_tile_wire_range

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2025-06-25 18:37:17 +02:00
parent 1cd1e4a8d9
commit 9ade2d1877
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,10 @@ void arch_wrap_python(py::module &m)
readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel"); readonly_wrapper<BelPin, decltype(&BelPin::bel), &BelPin::bel, conv_to_str<BelId>>::def_wrap(belpin_cls, "bel");
readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin"); readonly_wrapper<BelPin, decltype(&BelPin::pin), &BelPin::pin, conv_to_str<IdString>>::def_wrap(belpin_cls, "pin");
// Useful for debugging routing database
fn_wrapper_1a<Context, decltype(&Context::get_tile_wire_range), &Context::get_tile_wire_range,
wrap_context<TileWireRange>, conv_from_str<WireId>>::def_wrap(ctx_cls, "get_tile_wire_range");
typedef const std::vector<BelBucketId> &BelBucketRange; typedef const std::vector<BelBucketId> &BelBucketRange;
typedef const std::vector<BelId> &BelRangeForBelBucket; typedef const std::vector<BelId> &BelRangeForBelBucket;
#include "arch_pybindings_shared.h" #include "arch_pybindings_shared.h"
@ -63,6 +67,8 @@ void arch_wrap_python(py::module &m)
WRAP_RANGE(m, DownhillPip, conv_to_str<PipId>); WRAP_RANGE(m, DownhillPip, conv_to_str<PipId>);
WRAP_RANGE(m, BelPin, wrap_context<BelPin>); WRAP_RANGE(m, BelPin, wrap_context<BelPin>);
WRAP_RANGE(m, TileWire, conv_to_str<WireId>);
WRAP_MAP_UPTR(m, CellMap, "IdCellMap"); WRAP_MAP_UPTR(m, CellMap, "IdCellMap");
WRAP_MAP_UPTR(m, NetMap, "IdNetMap"); WRAP_MAP_UPTR(m, NetMap, "IdNetMap");
WRAP_MAP(m, HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap"); WRAP_MAP(m, HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap");