diff options
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r-- | ice40/arch.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index 52246001..be346fd7 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -192,7 +192,11 @@ BelRange Arch::getBelsByTile(int x, int y) const // are used BelRange br; - br.b.cursor = Arch::getBelByLocation(Loc(x, y, 0)).index; + for (int i = 0; i < 4; i++) { + br.b.cursor = Arch::getBelByLocation(Loc(x, y, i)).index; + if (br.b.cursor != -1) + break; + } br.e.cursor = br.b.cursor; if (br.e.cursor != -1) { |