diff options
author | David Shah <dave@ds0.me> | 2019-09-13 17:27:02 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-09-13 17:27:15 +0100 |
commit | 95540763b972bc389b76000397d4e210d59fa4bf (patch) | |
tree | f27ec329d8b2df9dd47476de237acf97f3975e2e /ice40 | |
parent | 927077e03b2e71649a0d691dee8d09bfdf085146 (diff) | |
download | nextpnr-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 'ice40')
-rw-r--r-- | ice40/arch_pybindings.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ice40/arch_pybindings.cc b/ice40/arch_pybindings.cc index bc0bfb84..194d7c6d 100644 --- a/ice40/arch_pybindings.cc +++ b/ice40/arch_pybindings.cc @@ -136,12 +136,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, |