Fixing relative constraint implementation
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
60757a2dd7
commit
8c518cb838
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +260,8 @@ class ChainConstrainer
|
||||
log_info("Placing carry chain starting at '%s'\n", chain.cells.front()->name.c_str(ctx));
|
||||
|
||||
// Place carry chain
|
||||
chain.cells.at(0)->constr_abs_z = 0;
|
||||
chain.cells.at(0)->constr_abs_z = true;
|
||||
chain.cells.at(0)->constr_z = 0;
|
||||
for (int i = 1; i < int(chain.cells.size()); i++) {
|
||||
chain.cells.at(i)->constr_x = 0;
|
||||
chain.cells.at(i)->constr_y = (i / 8);
|
||||
|
Loading…
Reference in New Issue
Block a user