aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-11-29 16:25:11 +0000
committerDavid Shah <dave@ds0.me>2019-12-27 10:44:30 +0000
commitb1000870244dbb1a73198e23a859825865938b4c (patch)
tree1958990ff08d0dca2034e91f5651e4533fe9f60e /ecp5
parent9f6031cda13a290903785a1c469af02838309b39 (diff)
downloadnextpnr-b1000870244dbb1a73198e23a859825865938b4c.tar.gz
nextpnr-b1000870244dbb1a73198e23a859825865938b4c.tar.bz2
nextpnr-b1000870244dbb1a73198e23a859825865938b4c.zip
python: Add bindings for hierarchy structures
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch_pybindings.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/ecp5/arch_pybindings.cc b/ecp5/arch_pybindings.cc
index da6d3e50..cd5e31c3 100644
--- a/ecp5/arch_pybindings.cc
+++ b/ecp5/arch_pybindings.cc
@@ -49,6 +49,7 @@ void arch_wrap_python()
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, 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");
@@ -64,6 +65,7 @@ void arch_wrap_python()
WRAP_MAP_UPTR(CellMap, "IdCellMap");
WRAP_MAP_UPTR(NetMap, "IdNetMap");
+ WRAP_MAP(HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap");
}
NEXTPNR_NAMESPACE_END