From 80097526eef823a475d3cc0955721ffe13d995be Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 21 Jul 2018 16:45:46 +0200 Subject: Fix placement bug with VexRiscV reported by John McMaster Signed-off-by: David Shah --- common/place_common.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/place_common.cc b/common/place_common.cc index b2f0e849..370eff23 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -130,10 +130,11 @@ bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality) if (iters >= 4) wirelen += ctx->rng(25); if (wirelen <= best_ripup_wirelen) { - ripup_target = ctx->cells.at(ctx->getBoundBelCell(bel)).get(); - if (ripup_target->belStrength < STRENGTH_STRONG) { + CellInfo *curr_cell = ctx->cells.at(ctx->getBoundBelCell(bel)).get(); + if (curr_cell->belStrength < STRENGTH_STRONG) { best_ripup_wirelen = wirelen; ripup_bel = bel; + ripup_target = curr_cell; } } } -- cgit v1.2.3