diff options
author | David Shah <dave@ds0.me> | 2019-04-01 19:48:51 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-04-02 15:30:01 +0100 |
commit | 6a383cd4c57db1f8bab6416daffdb24c0eb093c6 (patch) | |
tree | d10ee8ae12bee51935bfe6273570bf488721425d /generic/arch_pybindings.cc | |
parent | ca918078bfe6c4b1a279c7df7c59fb9de0f9710a (diff) | |
download | nextpnr-6a383cd4c57db1f8bab6416daffdb24c0eb093c6.tar.gz nextpnr-6a383cd4c57db1f8bab6416daffdb24c0eb093c6.tar.bz2 nextpnr-6a383cd4c57db1f8bab6416daffdb24c0eb093c6.zip |
generic: Simple procedural example works
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic/arch_pybindings.cc')
-rw-r--r-- | generic/arch_pybindings.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/arch_pybindings.cc b/generic/arch_pybindings.cc index 014b7758..950e7e34 100644 --- a/generic/arch_pybindings.cc +++ b/generic/arch_pybindings.cc @@ -40,6 +40,8 @@ void arch_wrap_python() class_<BelPin>("BelPin").def_readwrite("bel", &BelPin::bel).def_readwrite("pin", &BelPin::pin); + class_<DelayInfo>("DelayInfo").def("maxDelay", &DelayInfo::maxDelay).def("minDelay", &DelayInfo::minDelay); + fn_wrapper_1a<Context, decltype(&Context::getBelType), &Context::getBelType, conv_to_str<IdString>, conv_from_str<BelId>>::def_wrap(ctx_cls, "getBelType"); fn_wrapper_1a<Context, decltype(&Context::checkBelAvail), &Context::checkBelAvail, pass_through<bool>, @@ -109,6 +111,9 @@ void arch_wrap_python() fn_wrapper_1a<Context, decltype(&Context::getPipDelay), &Context::getPipDelay, pass_through<DelayInfo>, conv_from_str<PipId>>::def_wrap(ctx_cls, "getPipDelay"); + fn_wrapper_1a<Context, decltype(&Context::getDelayFromNS), &Context::getDelayFromNS, pass_through<DelayInfo>, + pass_through<double>>::def_wrap(ctx_cls, "getDelayFromNS"); + fn_wrapper_0a<Context, decltype(&Context::getChipName), &Context::getChipName, pass_through<std::string>>::def_wrap( ctx_cls, "getChipName"); fn_wrapper_0a<Context, decltype(&Context::archId), &Context::archId, conv_to_str<IdString>>::def_wrap(ctx_cls, |