mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-08 08:42:23 +00:00
himbaechel: bounds check getBelByLocation
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
@@ -513,6 +513,8 @@ struct Arch : BaseArch<ArchRanges>
|
||||
}
|
||||
BelId getBelByLocation(Loc loc) const override
|
||||
{
|
||||
if (loc.x < 0 || loc.x >= chip_info->width || loc.y < 0 || loc.y >= chip_info->height)
|
||||
return BelId();
|
||||
int tile = tile_by_xy(chip_info, loc.x, loc.y);
|
||||
auto &tile_data = chip_tile_info(chip_info, tile);
|
||||
for (size_t i = 0; i < tile_data.bels.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user