aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2023-03-18 13:53:27 +0100
committermyrtle <gatecat@ds0.me>2023-03-20 09:53:35 +0100
commit3f4c8d15d9038d86d2840e3e5ae4fa2cf0128a6a (patch)
tree2f60658a714fc0bc38004eab98bf820a81b45234
parent0ce72e1a3103d52d036f822b98e511d9c4f1e71b (diff)
downloadnextpnr-3f4c8d15d9038d86d2840e3e5ae4fa2cf0128a6a.tar.gz
nextpnr-3f4c8d15d9038d86d2840e3e5ae4fa2cf0128a6a.tar.bz2
nextpnr-3f4c8d15d9038d86d2840e3e5ae4fa2cf0128a6a.zip
Use unified io location data
-rw-r--r--machxo2/facade_import.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/machxo2/facade_import.py b/machxo2/facade_import.py
index 93e07775..fdb0f723 100644
--- a/machxo2/facade_import.py
+++ b/machxo2/facade_import.py
@@ -181,14 +181,7 @@ def process_pio_db(rg, device):
for name, pinloc in sorted(pkgdata.items()):
x = pinloc["col"]
y = pinloc["row"]
- if x == 0 or x == max_col:
- # FIXME: Oversight in read_pinout.py. We use 0-based
- # columns for 0 and max row, but we otherwise extract
- # the names from the CSV, and...
- loc = pytrellis.Location(x, y)
- else:
- # Lattice uses 1-based columns!
- loc = pytrellis.Location(x - 1, y)
+ loc = pytrellis.Location(x, y)
pio = "PIO" + pinloc["pio"]
bel_idx = get_bel_index(rg, loc, pio)
if bel_idx is not None:
@@ -197,10 +190,7 @@ def process_pio_db(rg, device):
for metaitem in piodb["pio_metadata"]:
x = metaitem["col"]
y = metaitem["row"]
- if x == 0 or x == max_col:
- loc = pytrellis.Location(x, y)
- else:
- loc = pytrellis.Location(x - 1, y)
+ loc = pytrellis.Location(x, y)
pio = "PIO" + metaitem["pio"]
bank = metaitem["bank"]
if "function" in metaitem: