nextpnr/python/dump_design.py
David Shah 6236a10427 Fixing file->run renaming
Signed-off-by: David Shah <davey1576@gmail.com>
2018-06-07 13:08:18 +02:00

7 lines
402 B
Python

# 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))