place_common: Fixing rel legaliser search bugs

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah 2018-08-03 15:02:42 +02:00
parent 7e9209878c
commit 48e06896a2

View File

@ -251,7 +251,7 @@ class ConstraintLegaliseWorker
zSearch = IncreasingDiameterSearch(loc.z + child->constr_z); zSearch = IncreasingDiameterSearch(loc.z + child->constr_z);
} }
} }
while (!(xSearch.done() && ySearch.done() && zSearch.done())) { while (!xSearch.done()) {
Loc cloc; Loc cloc;
cloc.x = xSearch.get(); cloc.x = xSearch.get();
cloc.y = ySearch.get(); cloc.y = ySearch.get();
@ -267,7 +267,7 @@ class ConstraintLegaliseWorker
} }
} }
if (usedLocations.count(loc)) if (usedLocations.count(cloc))
continue; continue;
if (valid_loc_for(child, cloc, solution, usedLocations)) if (valid_loc_for(child, cloc, solution, usedLocations))
return true; return true;
@ -306,7 +306,7 @@ class ConstraintLegaliseWorker
yRootSearch = IncreasingDiameterSearch(currentLoc.y, 0, ctx->getGridDimY() - 1); yRootSearch = IncreasingDiameterSearch(currentLoc.y, 0, ctx->getGridDimY() - 1);
if (cell->constr_z == cell->UNCONSTR) if (cell->constr_z == cell->UNCONSTR)
zRootSearch = IncreasingDiameterSearch(currentLoc.z, 0, ctx->getTileDimZ(currentLoc.x, currentLoc.y)); zRootSearch = IncreasingDiameterSearch(currentLoc.z, 0, ctx->getTileDimZ(currentLoc.x, currentLoc.y));
while (!(xRootSearch.done() && yRootSearch.done() && zRootSearch.done())) { while (!xRootSearch.done()) {
Loc rootLoc; Loc rootLoc;
rootLoc.x = xRootSearch.get(); rootLoc.x = xRootSearch.get();
rootLoc.y = yRootSearch.get(); rootLoc.y = yRootSearch.get();