From b2e1df618c01194011926b3e42b07a2257c249a6 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Tue, 3 Jul 2018 10:28:09 -0700 Subject: icebox_vlog: Better information about drivers for nets. --- icebox/icebox_vlog.py | 19 ++++++++++--------- 1 file 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 -- cgit v1.2.3