aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-03-30 14:44:18 +0100
committergatecat <gatecat@ds0.me>2021-03-30 15:28:19 +0100
commit8863b962fdb095dca06025cac6e8e639a57b8344 (patch)
tree626f2496a90a5493fbb0958f26e8402b8c91c261 /fpga_interchange
parent99298d0aba162255308f478c6909945c742f1da0 (diff)
downloadnextpnr-8863b962fdb095dca06025cac6e8e639a57b8344.tar.gz
nextpnr-8863b962fdb095dca06025cac6e8e639a57b8344.tar.bz2
nextpnr-8863b962fdb095dca06025cac6e8e639a57b8344.zip
interchange: Fix illegal placements
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'fpga_interchange')
-rw-r--r--fpga_interchange/arch.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h
index 642060cc..cb137ef6 100644
--- a/fpga_interchange/arch.h
+++ b/fpga_interchange/arch.h
@@ -808,9 +808,7 @@ struct Arch : ArchAPI<ArchRanges>
}
const TileStatus &tile_status = iter->second;
const CellInfo *cell = tile_status.boundcells[bel.index];
- if (cell == nullptr) {
- return true;
- } else {
+ if (cell != nullptr) {
if (!dedicated_interconnect.isBelLocationValid(bel, cell)) {
return false;
}
@@ -825,10 +823,11 @@ struct Arch : ArchAPI<ArchRanges>
if (!is_cell_valid_constraints(cell, tile_status, explain_constraints)) {
return false;
}
-
- auto &bel_data = bel_info(chip_info, bel);
- return get_site_status(tile_status, bel_data).checkSiteRouting(getCtx(), tile_status);
}
+ // Still check site status if cell is nullptr; as other bels in the site could be illegal (for example when
+ // dedicated paths can no longer be used after ripping up a cell)
+ auto &bel_data = bel_info(chip_info, bel);
+ return get_site_status(tile_status, bel_data).checkSiteRouting(getCtx(), tile_status);
}
IdString get_bel_tiletype(BelId bel) const { return IdString(loc_info(chip_info, bel).name); }