aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chipdb.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-10 17:08:14 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-10 17:08:14 +0200
commit458a13456a2ebea77da496a6a9ba9ed1aba7d5b2 (patch)
treeb2aed7c8f100528465bfa212e83a8390d84ff610 /ice40/chipdb.py
parent602e6fab1e1d90a00b868733953a0d25632d8414 (diff)
downloadnextpnr-458a13456a2ebea77da496a6a9ba9ed1aba7d5b2.tar.gz
nextpnr-458a13456a2ebea77da496a6a9ba9ed1aba7d5b2.tar.bz2
nextpnr-458a13456a2ebea77da496a6a9ba9ed1aba7d5b2.zip
Fix iCE40 routing graph
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chipdb.py')
-rw-r--r--ice40/chipdb.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/ice40/chipdb.py b/ice40/chipdb.py
index 3c3dc078..a756203a 100644
--- a/ice40/chipdb.py
+++ b/ice40/chipdb.py
@@ -137,7 +137,7 @@ with open(sys.argv[1], "r") as f:
wire_xy[mode[1]].append((int(line[0]), int(line[1])))
continue
- if mode[0] == "buffer":
+ if mode[0] in ("buffer", "routing"):
wire_a = int(line[1])
wire_b = mode[1]
if wire_a not in wire_downhill:
@@ -149,27 +149,6 @@ with open(sys.argv[1], "r") as f:
pip_xy[(wire_a, wire_b)] = (mode[2], mode[3], int(line[0], 2), len(switches) - 1)
continue
- if mode[0] == "routing":
- wire_a = int(line[1])
- wire_b = mode[1]
-
- if wire_a not in wire_downhill:
- wire_downhill[wire_a] = set()
- if wire_b not in wire_uphill:
- wire_uphill[wire_b] = set()
- wire_downhill[wire_a].add(wire_b)
- wire_uphill[wire_b].add(wire_a)
- pip_xy[(wire_a, wire_b)] = (mode[2], mode[3], int(line[0], 2), len(switches) - 1)
-
- if wire_b not in wire_downhill:
- wire_downhill[wire_b] = set()
- if wire_a not in wire_uphill:
- wire_uphill[wire_a] = set()
- wire_downhill[wire_b].add(wire_a)
- wire_uphill[wire_a].add(wire_b)
- pip_xy[(wire_b, wire_a)] = (mode[2], mode[3], int(line[0], 2), len(switches) - 1)
- continue
-
if mode[0] == "bits":
name = line[0]
bits = []