aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch_pybindings.h
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/arch_pybindings.h')
-rw-r--r--ecp5/arch_pybindings.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/ecp5/arch_pybindings.h b/ecp5/arch_pybindings.h
index a5044f29..6256af18 100644
--- a/ecp5/arch_pybindings.h
+++ b/ecp5/arch_pybindings.h
@@ -30,7 +30,11 @@ namespace PythonConversion {
template <> struct string_converter<BelId>
{
- BelId from_str(Context *ctx, std::string name) { return ctx->getBelByName(ctx->id(name)); }
+ BelId from_str(Context *ctx, std::string name)
+ {
+ auto &&proxy = ctx->rproxy();
+ return proxy.getBelByName(ctx->id(name));
+ }
std::string to_str(Context *ctx, BelId id)
{
@@ -49,14 +53,22 @@ template <> struct string_converter<BelType>
template <> struct string_converter<WireId>
{
- WireId from_str(Context *ctx, std::string name) { return ctx->getWireByName(ctx->id(name)); }
+ WireId from_str(Context *ctx, std::string name)
+ {
+ auto &&proxy = ctx->rproxy();
+ return proxy.getWireByName(ctx->id(name));
+ }
std::string to_str(Context *ctx, WireId id) { return ctx->getWireName(id).str(ctx); }
};
template <> struct string_converter<PipId>
{
- PipId from_str(Context *ctx, std::string name) { return ctx->getPipByName(ctx->id(name)); }
+ PipId from_str(Context *ctx, std::string name)
+ {
+ auto &&proxy = ctx->rproxy();
+ return proxy.getPipByName(ctx->id(name));
+ }
std::string to_str(Context *ctx, PipId id) { return ctx->getPipName(id).str(ctx); }
};