1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-04-26 04:07:02 +00:00

place: Fix placer validity checks

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah
2018-06-16 18:45:32 +02:00
parent 6d68af1e62
commit e497575c8e
3 changed files with 33 additions and 6 deletions

View File

@@ -177,13 +177,16 @@ static bool try_swap_position(Design *design, CellInfo *cell, BelId newBel,
}
chip.bindBel(newBel, cell->name);
if (other != IdString()) {
if (!isValidBelForCell(design, other_cell, oldBel)) {
chip.unbindBel(newBel);
goto swap_fail;
} else {
chip.bindBel(oldBel, other_cell->name);
}
chip.bindBel(oldBel, other_cell->name);
}
if (!isBelLocationValid(design, newBel) || ((other != IdString() && !isBelLocationValid(design, oldBel)))) {
chip.unbindBel(newBel);
if (other != IdString())
chip.unbindBel(oldBel);
goto swap_fail;
}
cell->bel = newBel;