aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/place_legaliser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/place_legaliser.cc')
-rw-r--r--ice40/place_legaliser.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/ice40/place_legaliser.cc b/ice40/place_legaliser.cc
index ebc2b865..9fde179d 100644
--- a/ice40/place_legaliser.cc
+++ b/ice40/place_legaliser.cc
@@ -90,21 +90,20 @@ static int get_cell_evilness(const Context *ctx, const CellInfo *cell)
// This returns how "evil" a logic cell is, and thus how likely it is to be ripped up
// during logic tile legalisation
int score = 0;
- if (get_net_or_empty(cell, ctx->id("I0")))
+ if (get_net_or_empty(cell, ctx->id_i0))
++score;
- if (get_net_or_empty(cell, ctx->id("I1")))
+ if (get_net_or_empty(cell, ctx->id_i1))
++score;
- if (get_net_or_empty(cell, ctx->id("I2")))
+ if (get_net_or_empty(cell, ctx->id_i2))
++score;
- if (get_net_or_empty(cell, ctx->id("I3")))
+ if (get_net_or_empty(cell, ctx->id_i3))
++score;
- if (bool_or_default(cell->params, ctx->id("DFF_ENABLE"))) {
- const NetInfo *cen = get_net_or_empty(cell, ctx->id("CEN")), *sr = get_net_or_empty(cell, ctx->id("SR"));
- if (cen)
+ if (cell->lcInfo.dffEnable) {
+ if (cell->lcInfo.cen)
score += 10;
- if (sr)
+ if (cell->lcInfo.sr)
score += 10;
- if (bool_or_default(cell->params, ctx->id("NEG_CLK")))
+ if (cell->lcInfo.negClk)
score += 5;
}
return score;