diff options
author | David Shah <dave@ds0.me> | 2020-06-29 11:08:21 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-06-29 19:52:31 +0100 |
commit | b24e0a609b123c8602d763f2cd4af6f935e88962 (patch) | |
tree | c4722d1fbf75df77e0640c2ec4baba52c11f9ab2 /ice40/arch.cc | |
parent | 32e655d0afcc01d7a04aca0f1c5be39140e21335 (diff) | |
download | nextpnr-b24e0a609b123c8602d763f2cd4af6f935e88962.tar.gz nextpnr-b24e0a609b123c8602d763f2cd4af6f935e88962.tar.bz2 nextpnr-b24e0a609b123c8602d763f2cd4af6f935e88962.zip |
ice40: Fix getBelsByTile
Signed-off-by: David Shah <dave@ds0.me>
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) { |