aboutsummaryrefslogtreecommitdiffstats
path: root/python/dump_design.py
blob: 22d4ab1724766994454bb24409c1a3dc98c353f3 (plain)
1
2
3
4
5
6
# Run ./nextpnr-ice40 --json ice40/blinky.json --run python/dump_design.py
for cell in sorted(design.cells, key=lambda x: x.first):
    print("Cell {} : {}".format(cell.first, cell.second.type))
    for port in sorted(cell.second.ports, key=lambda x: x.first):
        dir = (" <-- ", " --> ", " <-> ")[int(port.second.type)]
        print("    {} {} {}".format(port.first, dir, port.second.net.name))