diff options
author | David Shah <dave@ds0.me> | 2019-11-29 16:25:11 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-12-27 10:44:30 +0000 |
commit | b1000870244dbb1a73198e23a859825865938b4c (patch) | |
tree | 1958990ff08d0dca2034e91f5651e4533fe9f60e /generic/arch_pybindings.cc | |
parent | 9f6031cda13a290903785a1c469af02838309b39 (diff) | |
download | nextpnr-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 'generic/arch_pybindings.cc')
-rw-r--r-- | generic/arch_pybindings.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc index 8526e409..2600cac0 100644 --- a/generic/arch_pybindings.cc +++ b/generic/arch_pybindings.cc @@ -141,6 +141,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, HierarchicalCell> HierarchyMap; readonly_wrapper<Context, decltype(&Context::cells), &Context::cells, wrap_context<CellMap &>>::def_wrap(ctx_cls, "cells"); @@ -231,6 +232,7 @@ void arch_wrap_python() WRAP_MAP_UPTR(CellMap, "IdCellMap"); WRAP_MAP_UPTR(NetMap, "IdNetMap"); + WRAP_MAP(HierarchyMap, wrap_context<HierarchicalCell &>, "HierarchyMap"); WRAP_VECTOR(const std::vector<IdString>, conv_to_str<IdString>); } |