diff options
author | David Shah <dave@ds0.me> | 2019-08-07 10:40:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 10:40:25 +0100 |
commit | eaef3b600e2e8c4633db25edd4ad017b59a1cc79 (patch) | |
tree | 66a6e88614d99dfdf8c15ac3a1d1a13339784f9c /ice40/cells.h | |
parent | 1ecf271cb32f9f78ea082788c6534f2523144d01 (diff) | |
parent | 8eef6ac55e48aa181d1e268fcec004a58f9d8db4 (diff) | |
download | nextpnr-eaef3b600e2e8c4633db25edd4ad017b59a1cc79.tar.gz nextpnr-eaef3b600e2e8c4633db25edd4ad017b59a1cc79.tar.bz2 nextpnr-eaef3b600e2e8c4633db25edd4ad017b59a1cc79.zip |
Merge pull request #306 from YosysHQ/dave/jsonfix
Major improvements to constants/Property
Diffstat (limited to 'ice40/cells.h')
-rw-r--r-- | ice40/cells.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ice40/cells.h b/ice40/cells.h index 3d9358da..777ca3e2 100644 --- a/ice40/cells.h +++ b/ice40/cells.h @@ -101,17 +101,19 @@ inline bool is_sb_pll40_pad(const BaseCtx *ctx, const CellInfo *cell) return cell->type == ctx->id("SB_PLL40_PAD") || cell->type == ctx->id("SB_PLL40_2_PAD") || cell->type == ctx->id("SB_PLL40_2F_PAD") || (cell->type == ctx->id("ICESTORM_PLL") && - (cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_PAD" || cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2_PAD" || - cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_PAD")); + (cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_PAD" || + cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_2_PAD" || + cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_2F_PAD")); } inline bool is_sb_pll40_dual(const BaseCtx *ctx, const CellInfo *cell) { return cell->type == ctx->id("SB_PLL40_2_PAD") || cell->type == ctx->id("SB_PLL40_2F_PAD") || cell->type == ctx->id("SB_PLL40_2F_CORE") || - (cell->type == ctx->id("ICESTORM_PLL") && (cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2_PAD" || - cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_PAD" || - cell->attrs.at(ctx->id("TYPE")) == "SB_PLL40_2F_CORE")); + (cell->type == ctx->id("ICESTORM_PLL") && + (cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_2_PAD" || + cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_2F_PAD" || + cell->attrs.at(ctx->id("TYPE")).as_string() == "SB_PLL40_2F_CORE")); } uint8_t sb_pll40_type(const BaseCtx *ctx, const CellInfo *cell); |