diff options
author | Eddie Hung <e.hung@imperial.ac.uk> | 2018-07-25 17:55:20 -0700 |
---|---|---|
committer | Eddie Hung <e.hung@imperial.ac.uk> | 2018-07-25 17:55:20 -0700 |
commit | a21cc4dd5bbbf1c9e5894d8c30a2c3252d21dfd0 (patch) | |
tree | ea93dcd47f9e84145ba66de353e1848ebc34cbf5 /ice40/place_legaliser.cc | |
parent | 7c8c13aba14ee51851506e0c1cfc0c995db21102 (diff) | |
parent | f78a74b9cff79a41f992cfaf20deb88054ea27a6 (diff) | |
download | nextpnr-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.cc | 17 |
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; |