aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.h
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-16 14:51:25 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-17 12:03:16 -0800
commit7c1544f4d8e5dc75d6d6a8cf973888f5c94bd1b9 (patch)
tree842b999ee2af18571b97ce22bffa537b8856a25c /fpga_interchange/arch.h
parent6f1c835221d18199962273def4386e0385820c67 (diff)
downloadnextpnr-7c1544f4d8e5dc75d6d6a8cf973888f5c94bd1b9.tar.gz
nextpnr-7c1544f4d8e5dc75d6d6a8cf973888f5c94bd1b9.tar.bz2
nextpnr-7c1544f4d8e5dc75d6d6a8cf973888f5c94bd1b9.zip
Continue fixes.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/arch.h')
-rw-r--r--fpga_interchange/arch.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h
index cd987001..556aa566 100644
--- a/fpga_interchange/arch.h
+++ b/fpga_interchange/arch.h
@@ -1405,15 +1405,7 @@ struct Arch : ArchAPI<ArchRanges>
return BelBucketId();
}
- size_t get_cell_type_index(IdString cell_type) const
- {
- const CellMapPOD &cell_map = *chip_info->cell_map;
- int cell_offset = cell_type.index - cell_map.cell_names[0];
- NPNR_ASSERT(cell_offset >= 0 && cell_offset < cell_map.cell_names.ssize());
- NPNR_ASSERT(cell_map.cell_names[cell_offset] == cell_type.index);
-
- return cell_offset;
- }
+ size_t get_cell_type_index(IdString cell_type) const;
BelBucketId getBelBucketForCellType(IdString cell_type) const override
{
@@ -1444,11 +1436,12 @@ struct Arch : ArchAPI<ArchRanges>
return pads.count(bel) > 0;
}
- auto cell_type_index = get_cell_type_index(cell_type);
const auto &bel_data = bel_info(chip_info, bel);
if (bel_data.category != BEL_CATEGORY_LOGIC) {
return false;
}
+
+ auto cell_type_index = get_cell_type_index(cell_type);
return bel_data.pin_map[cell_type_index] != -1;
}