aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-08-03 15:40:01 +0200
committerDavid Shah <davey1576@gmail.com>2018-08-03 15:40:01 +0200
commit8c518cb8388df5b50b3c263d5a36d27851764fe4 (patch)
tree8807ade618751d1b0adcfb5382ef92662f87d810 /common
parent60757a2dd74bdaae6c20f59417a7a2597eb6d3bc (diff)
downloadnextpnr-8c518cb8388df5b50b3c263d5a36d27851764fe4.tar.gz
nextpnr-8c518cb8388df5b50b3c263d5a36d27851764fe4.tar.bz2
nextpnr-8c518cb8388df5b50b3c263d5a36d27851764fe4.zip
Fixing relative constraint implementation
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/place_common.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/place_common.cc b/common/place_common.cc
index 9522624e..1d4427ac 100644
--- a/common/place_common.cc
+++ b/common/place_common.cc
@@ -306,10 +306,18 @@ class ConstraintLegaliseWorker
currentLoc = ctx->getBelLocation(cell->bel);
if (cell->constr_x == cell->UNCONSTR)
xRootSearch = IncreasingDiameterSearch(currentLoc.x, 0, ctx->getGridDimX() - 1);
+ else
+ xRootSearch = IncreasingDiameterSearch(cell->constr_x);
+
if (cell->constr_y == cell->UNCONSTR)
yRootSearch = IncreasingDiameterSearch(currentLoc.y, 0, ctx->getGridDimY() - 1);
+ else
+ yRootSearch = IncreasingDiameterSearch(cell->constr_y);
+
if (cell->constr_z == cell->UNCONSTR)
zRootSearch = IncreasingDiameterSearch(currentLoc.z, 0, ctx->getTileDimZ(currentLoc.x, currentLoc.y));
+ else
+ zRootSearch = IncreasingDiameterSearch(cell->constr_z);
while (!xRootSearch.done()) {
Loc rootLoc;
rootLoc.x = xRootSearch.get();
@@ -352,6 +360,7 @@ class ConstraintLegaliseWorker
}
ctx->bindBel(target, cp.first, STRENGTH_LOCKED);
}
+ NPNR_ASSERT(constraints_satisfied(cell));
return true;
}
}