aboutsummaryrefslogtreecommitdiffstats
path: root/icebox
diff options
context:
space:
mode:
authorTim 'mithro' Ansell <me@mith.ro>2018-07-03 10:28:09 -0700
committerTim 'mithro' Ansell <me@mith.ro>2018-07-03 11:21:07 -0700
commitb2e1df618c01194011926b3e42b07a2257c249a6 (patch)
treede69fb6244206ece8d26161cf4876ecdebdd5f23 /icebox
parent16a9962fb16d50683a7b69835194703c48bc1759 (diff)
downloadicestorm-b2e1df618c01194011926b3e42b07a2257c249a6.tar.gz
icestorm-b2e1df618c01194011926b3e42b07a2257c249a6.tar.bz2
icestorm-b2e1df618c01194011926b3e42b07a2257c249a6.zip
icebox_vlog: Better information about drivers for nets.
Diffstat (limited to 'icebox')
-rwxr-xr-xicebox/icebox_vlog.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/icebox/icebox_vlog.py b/icebox/icebox_vlog.py
index a86f11e..21ffb12 100755
--- a/icebox/icebox_vlog.py
+++ b/icebox/icebox_vlog.py
@@ -345,21 +345,21 @@ for segs in sorted(ic.group_segments(extra_connections=extra_connections, extra_
else:
net_segs.add(s)
- count_drivers = 0
+ count_drivers = []
for s in segs:
- if re.match(r"ram/RDATA_", s[2]): count_drivers += 1
- if re.match(r"io_./D_IN_", s[2]): count_drivers += 1
- if re.match(r"lutff_./out", s[2]): count_drivers += 1
- if re.match(r"lutff_./lout", s[2]): count_drivers += 1
+ if re.match(r"ram/RDATA_", s[2]): count_drivers.append(s[2])
+ if re.match(r"io_./D_IN_", s[2]): count_drivers.append(s[2])
+ if re.match(r"lutff_./out", s[2]): count_drivers.append(s[2])
+ if re.match(r"lutff_./lout", s[2]): count_drivers.append(s[2])
- if count_drivers != 1 and check_driver:
- failed_drivers_check.append(n)
+ if len(count_drivers) != 1 and check_driver:
+ failed_drivers_check.append((n, count_drivers))
if not strip_comments:
for s in sorted(net_segs):
text_wires.append("// %s" % (s,))
if count_drivers != 1 and check_driver:
- text_wires.append("// Number of drivers: %d" % count_drivers)
+ text_wires.append("// Number of drivers: %d %s" % (len(count_drivers), count_drivers))
text_wires.append("")
def seg_to_net(seg, default=None):
@@ -942,6 +942,7 @@ print()
if failed_drivers_check:
print("// Single-driver-check failed for %d nets:" % len(failed_drivers_check))
- print("// %s" % " ".join(failed_drivers_check))
+ for net, drivers in failed_drivers_check:
+ print("// %s has %d drivers: %s" % (net, len(drivers), drivers))
assert False