From aeb8d6b64585a91f41bf0aa0090486c624f364cc Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 2 Aug 2015 23:29:50 +0200 Subject: Improved icebox_colbuf --- icebox/icebox_colbuf.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'icebox') diff --git a/icebox/icebox_colbuf.py b/icebox/icebox_colbuf.py index ac4e6c4..2e3e4b0 100755 --- a/icebox/icebox_colbuf.py +++ b/icebox/icebox_colbuf.py @@ -131,18 +131,23 @@ def set_colbuf(ic, tile, bit, value): assert False error_count = 0 -for tile, bits in used_glbs_map.items(): +correct_count = 0 +for tile, bits in sorted(used_glbs_map.items()): for bit in bits: if tile not in driven_glbs_map or bit not in driven_glbs_map[tile]: print("Missing driver for glb_netwk_%d in tile %s" % (bit, tile)) set_colbuf(ic, tile, bit, "1") error_count += 1 -for tile, bits in driven_glbs_map.items(): +for tile, bits in sorted(driven_glbs_map.items()): for bit in bits: if tile not in used_glbs_map or bit not in used_glbs_map[tile]: print("Unused driver for glb_netwk_%d in tile %s" % (bit, tile)) set_colbuf(ic, tile, bit, "0") error_count += 1 + else: + # print("Correct driver for glb_netwk_%d in tile %s" % (bit, tile)) + correct_count += 1 +print("Found %d correct driver bits." % correct_count) if error_count != 0: if not fixup_mode: print("Found %d errors!" % error_count) -- cgit v1.2.3