diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-08-02 23:29:50 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-08-02 23:29:50 +0200 |
commit | aeb8d6b64585a91f41bf0aa0090486c624f364cc (patch) | |
tree | 1a588da4c880b53d3f851e78f0a361c5314882e0 | |
parent | 266596b31f05eddf81e1da49c76923837b761e94 (diff) | |
download | icestorm-aeb8d6b64585a91f41bf0aa0090486c624f364cc.tar.gz icestorm-aeb8d6b64585a91f41bf0aa0090486c624f364cc.tar.bz2 icestorm-aeb8d6b64585a91f41bf0aa0090486c624f364cc.zip |
Improved icebox_colbuf
-rwxr-xr-x | icebox/icebox_colbuf.py | 9 |
1 files changed, 7 insertions, 2 deletions
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) |