aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch_pybindings.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-09-13 19:01:26 +0100
committerGitHub <noreply@github.com>2019-09-13 19:01:26 +0100
commitbc6b47efe097b5086fd6aaf4fb8be51d97435719 (patch)
treed3d88bd0f0ce92817504754ac8670c107e2db417 /ice40/arch_pybindings.cc
parent3975424ff544406915a9e995ef14a0b060b30661 (diff)
parent95540763b972bc389b76000397d4e210d59fa4bf (diff)
downloadnextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.tar.gz
nextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.tar.bz2
nextpnr-bc6b47efe097b5086fd6aaf4fb8be51d97435719.zip
Merge pull request #329 from YosysHQ/dave/net_aliases
json: Add support for net aliases
Diffstat (limited to 'ice40/arch_pybindings.cc')
-rw-r--r--ice40/arch_pybindings.cc5
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,