aboutsummaryrefslogtreecommitdiffstats
path: root/icebox
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2017-12-04 14:23:58 +0000
committerDavid Shah <davey1576@gmail.com>2018-01-16 15:17:12 +0000
commit0932c559a781c261c6d7f10f54faeb27aef4b702 (patch)
tree3cf99d1f19ed1e26dd3ea10df4fa019d0257f965 /icebox
parentec3ad586835ec13cd5b3c32f6c2b7580247c562b (diff)
downloadicestorm-0932c559a781c261c6d7f10f54faeb27aef4b702.tar.gz
icestorm-0932c559a781c261c6d7f10f54faeb27aef4b702.tar.bz2
icestorm-0932c559a781c261c6d7f10f54faeb27aef4b702.zip
Misc routing tweaks
Diffstat (limited to 'icebox')
-rw-r--r--icebox/icebox.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/icebox/icebox.py b/icebox/icebox.py
index 37f7767..13f8641 100644
--- a/icebox/icebox.py
+++ b/icebox/icebox.py
@@ -419,7 +419,7 @@ class iceconfig:
def do_direction(name, nx, ny):
if (0 < nx < self.max_x or self.is_ultra()) and 0 < ny < self.max_y:
neighbours.add((nx, ny, "neigh_op_%s_%d" % (name, func)))
- if nx in (0, self.max_x) and 0 < ny < self.max_y and nx != x:
+ if nx in (0, self.max_x) and 0 < ny < self.max_y and nx != x and (not self.is_ultra()):
neighbours.add((nx, ny, "logic_op_%s_%d" % (name, func)))
if ny in (0, self.max_y) and 0 < nx < self.max_x and ny != y:
neighbours.add((nx, ny, "logic_op_%s_%d" % (name, func)))
@@ -463,7 +463,7 @@ class iceconfig:
else:
assert False
- elif pos == "x" and npos in ("l", "r", "t", "b"):
+ elif pos == "x" and ((npos in ("t", "b")) or ((not self.is_ultra()) and (npos in ("l", "r")))):
if func in (0, 4): return (nx, ny, "io_0/D_IN_0")
if func in (1, 5): return (nx, ny, "io_0/D_IN_1")
if func in (2, 6): return (nx, ny, "io_1/D_IN_0")
@@ -650,7 +650,7 @@ class iceconfig:
vert_net = netname.replace("_l_", "_t_").replace("_r_", "_b_").replace("_horz_", "_vert_")
horz_net = netname.replace("_t_", "_l_").replace("_b_", "_r_").replace("_vert_", "_horz_")
- if self.is_ultra():
+ if self.is_ultra():
# Might have sp4 not span4 here
vert_net = vert_net.replace("_h_", "_v_")
horz_net = horz_net.replace("_v_", "_h_")
@@ -1194,6 +1194,8 @@ def pos_follow_net(pos, direction, netname, is_ultra):
if direction == "t":
n = re.sub("_t_", "_b_", n)
n = sp12v_normalize(n)
+ elif direction == "T" and pos in ("l", "r"):
+ pass
else:
n = re.sub("_t_", "_", n)
n = re.sub("sp12_v_", "span12_vert_", n)
@@ -1204,6 +1206,8 @@ def pos_follow_net(pos, direction, netname, is_ultra):
if direction == "b":
n = re.sub("_b_", "_t_", n)
n = sp12v_normalize(n)
+ elif direction == "B" and pos in ("l", "r"):
+ pass
else:
n = re.sub("_b_", "_", n)
n = re.sub("sp12_v_", "span12_vert_", n)