diff options
author | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-04 14:23:12 -0800 |
---|---|---|
committer | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-04 16:38:34 -0800 |
commit | f1ee2fde58180270c32e91a21351364567c95a15 (patch) | |
tree | 376c183593acab42ecad439aad30e3d25074798a /fpga_interchange/arch_pybindings.h | |
parent | 9afa8a9bea0f501130562b5141ad25c2335b3ef3 (diff) | |
download | nextpnr-f1ee2fde58180270c32e91a21351364567c95a15.tar.gz nextpnr-f1ee2fde58180270c32e91a21351364567c95a15.tar.bz2 nextpnr-f1ee2fde58180270c32e91a21351364567c95a15.zip |
Update APIs to conform to style guide.
- Change non-Arch methods to snake_case
- Adds some utility functions to for accessing bel_data.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/arch_pybindings.h')
-rw-r--r-- | fpga_interchange/arch_pybindings.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpga_interchange/arch_pybindings.h b/fpga_interchange/arch_pybindings.h index e7de0f59..1cccdf55 100644 --- a/fpga_interchange/arch_pybindings.h +++ b/fpga_interchange/arch_pybindings.h @@ -30,7 +30,7 @@ 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) { return ctx->getBelByName(IdStringList::parse(ctx, name)); } std::string to_str(Context *ctx, BelId id) { @@ -42,7 +42,7 @@ template <> struct string_converter<BelId> 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) { return ctx->getWireByName(IdStringList::parse(ctx, name)); } std::string to_str(Context *ctx, WireId id) { @@ -54,7 +54,7 @@ template <> struct string_converter<WireId> template <> struct string_converter<const WireId> { - WireId from_str(Context *ctx, std::string name) { return ctx->getWireByName(ctx->id(name)); } + WireId from_str(Context *ctx, std::string name) { return ctx->getWireByName(IdStringList::parse(ctx, name)); } std::string to_str(Context *ctx, WireId id) { @@ -66,7 +66,7 @@ template <> struct string_converter<const WireId> 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) { return ctx->getPipByName(IdStringList::parse(ctx, name)); } std::string to_str(Context *ctx, PipId id) { |