aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2019-03-23 23:15:05 +0100
committerDavid Shah <davey1576@gmail.com>2019-03-23 23:15:05 +0100
commit52e05f4a0706b1c108221e600ff11e654f6e85a5 (patch)
treeb2e70166123e4d40431f6a49b1a3101d57271ace /common
parente04efa8c6eb54563702c41591526cd7356ed9013 (diff)
downloadnextpnr-52e05f4a0706b1c108221e600ff11e654f6e85a5.tar.gz
nextpnr-52e05f4a0706b1c108221e600ff11e654f6e85a5.tar.bz2
nextpnr-52e05f4a0706b1c108221e600ff11e654f6e85a5.zip
placer1: Fix regression moving chained cells pre-legalise
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/placer1.cc5
1 files 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);