aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-13 17:27:02 +0100
committerDavid Shah <dave@ds0.me>2019-09-13 17:27:15 +0100
commit95540763b972bc389b76000397d4e210d59fa4bf (patch)
treef27ec329d8b2df9dd47476de237acf97f3975e2e /ecp5
parent927077e03b2e71649a0d691dee8d09bfdf085146 (diff)
downloadnextpnr-95540763b972bc389b76000397d4e210d59fa4bf.tar.gz
nextpnr-95540763b972bc389b76000397d4e210d59fa4bf.tar.bz2
nextpnr-95540763b972bc389b76000397d4e210d59fa4bf.zip
json: Add support for net aliases
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch_pybindings.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ecp5/arch_pybindings.cc b/ecp5/arch_pybindings.cc
index 18d21112..275956f3 100644
--- a/ecp5/arch_pybindings.cc
+++ b/ecp5/arch_pybindings.cc
@@ -125,12 +125,17 @@ 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;
readonly_wrapper<Context, decltype(&Context::cells), &Context::cells, wrap_context<CellMap &>>::def_wrap(ctx_cls,
"cells");
readonly_wrapper<Context, decltype(&Context::nets), &Context::nets, wrap_context<NetMap &>>::def_wrap(ctx_cls,
"nets");
+ readonly_wrapper<Context, decltype(&Context::net_aliases), &Context::net_aliases,
+ wrap_context<AliasMap &>>::def_wrap(ctx_cls, "net_aliases");
+ fn_wrapper_1a<Context, decltype(&Context::getNetByAlias), &Context::getNetByAlias, deref_and_wrap<NetInfo>,
+ conv_from_str<IdString>>::def_wrap(ctx_cls, "getNetByAlias");
fn_wrapper_2a_v<Context, decltype(&Context::addClock), &Context::addClock, conv_from_str<IdString>,
pass_through<float>>::def_wrap(ctx_cls, "addClock");
fn_wrapper_5a_v<Context, decltype(&Context::createRectangularRegion), &Context::createRectangularRegion,