aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index 8fb5ffdb..d1540e82 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -80,6 +80,13 @@ Arch::Arch(ArchArgs args) : args(args)
for (int i = 0; i < chip_info->num_tiles; i++) {
tileStatus[i].boundcells.resize(chip_info->tile_types[chip_info->tiles[i].type].num_bels);
}
+
+ // Sanity check cell name ids.
+ const CellMapPOD & cell_map = *chip_info->cell_map;
+ int32_t first_cell_id = cell_map.cell_names[0];
+ for(size_t i = 0; i < cell_map.number_cells; ++i) {
+ log_assert(cell_map.cell_names[i] == i + first_cell_id);
+ }
}
// -----------------------------------------------------------------------