Merge pull request #681 from YosysHQ/gatecat/more-pybindings

Add Python bindings for placement tests
This commit is contained in:
gatecat 2021-04-15 11:16:31 +01:00 committed by GitHub
commit 6fbefb8f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -116,6 +116,9 @@ fn_wrapper_0a<Context, decltype(&Context::archId), &Context::archId, conv_to_str
fn_wrapper_2a_v<Context, decltype(&Context::writeSVG), &Context::writeSVG, pass_through<std::string>, fn_wrapper_2a_v<Context, decltype(&Context::writeSVG), &Context::writeSVG, pass_through<std::string>,
pass_through<std::string>>::def_wrap(ctx_cls, "writeSVG"); pass_through<std::string>>::def_wrap(ctx_cls, "writeSVG");
fn_wrapper_1a<Context, decltype(&Context::isBelLocationValid), &Context::isBelLocationValid, pass_through<bool>,
conv_from_str<BelId>>::def_wrap(ctx_cls, "isBelLocationValid");
// const\_range\<BelBucketId\> getBelBuckets() const // const\_range\<BelBucketId\> getBelBuckets() const
fn_wrapper_0a<Context, decltype(&Context::getBelBuckets), &Context::getBelBuckets, fn_wrapper_0a<Context, decltype(&Context::getBelBuckets), &Context::getBelBuckets,
wrap_context<BelBucketRange>>::def_wrap(ctx_cls, "getBelBuckets"); wrap_context<BelBucketRange>>::def_wrap(ctx_cls, "getBelBuckets");

View File

@ -44,6 +44,11 @@ void arch_wrap_python(py::module &m)
.def("place", &Context::place) .def("place", &Context::place)
.def("route", &Context::route); .def("route", &Context::route);
fn_wrapper_0a_v<Context, decltype(&Context::remove_site_routing), &Context::remove_site_routing>::def_wrap(
ctx_cls, "remove_site_routing");
fn_wrapper_1a_v<Context, decltype(&Context::explain_bel_status), &Context::explain_bel_status,
conv_from_str<BelId>>::def_wrap(ctx_cls, "explain_bel_status");
typedef std::unordered_map<IdString, std::unique_ptr<CellInfo>> CellMap; 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, std::unique_ptr<NetInfo>> NetMap;
typedef std::unordered_map<IdString, IdString> AliasMap; typedef std::unordered_map<IdString, IdString> AliasMap;