aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/place_legaliser.cc
diff options
context:
space:
mode:
authorEddie Hung <e.hung@imperial.ac.uk>2018-07-25 17:55:20 -0700
committerEddie Hung <e.hung@imperial.ac.uk>2018-07-25 17:55:20 -0700
commita21cc4dd5bbbf1c9e5894d8c30a2c3252d21dfd0 (patch)
treeea93dcd47f9e84145ba66de353e1848ebc34cbf5 /ice40/place_legaliser.cc
parent7c8c13aba14ee51851506e0c1cfc0c995db21102 (diff)
parentf78a74b9cff79a41f992cfaf20deb88054ea27a6 (diff)
downloadnextpnr-a21cc4dd5bbbf1c9e5894d8c30a2c3252d21dfd0.tar.gz
nextpnr-a21cc4dd5bbbf1c9e5894d8c30a2c3252d21dfd0.tar.bz2
nextpnr-a21cc4dd5bbbf1c9e5894d8c30a2c3252d21dfd0.zip
Merge remote-tracking branch 'origin/master' into redist_slack
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;