1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-01-31 05:52:32 +00:00

Global design object working

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah
2018-06-07 12:57:52 +02:00
parent a5249da02d
commit b0e66d441c
4 changed files with 14 additions and 4 deletions

View File

@@ -1,2 +1,6 @@
for cell in design.cells:
print(cell.first)
# Run ./nextpnr-ice40 --json ice40/blinky.json --file 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))