placer1: Fix regression moving chained cells pre-legalise

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah 2019-03-23 23:15:05 +01:00
parent e04efa8c6e
commit 52e05f4a07

View File

@ -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);