From 52e05f4a0706b1c108221e600ff11e654f6e85a5 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 23 Mar 2019 23:15:05 +0100 Subject: [PATCH] placer1: Fix regression moving chained cells pre-legalise Signed-off-by: David Shah --- common/placer1.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/placer1.cc b/common/placer1.cc index 0c918f33..99b24640 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -475,11 +475,12 @@ class SAPlacer { static const double epsilon = 1e-20; moveChange.reset(); - if (is_constrained(cell)) + if (!require_legal && is_constrained(cell)) return false; BelId oldBel = cell->bel; CellInfo *other_cell = ctx->getBoundBelCell(newBel); - if (other_cell != nullptr && (is_constrained(other_cell) || other_cell->belStrength > STRENGTH_WEAK)) { + if (!require_legal && other_cell != nullptr && + (is_constrained(other_cell) || other_cell->belStrength > STRENGTH_WEAK)) { return false; } int old_dist = get_constraints_distance(ctx, cell);