diff options
author | David Shah <davey1576@gmail.com> | 2018-06-07 12:57:52 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-07 12:57:52 +0200 |
commit | b0e66d441cf584e7e48049d4f07afcc8e743309a (patch) | |
tree | b74e2ff57532f59fac5bd5246b6312d3f8ec739d /python/dump_design.py | |
parent | a5249da02d2a55d4b838dd8c29e159513dd71418 (diff) | |
download | nextpnr-b0e66d441cf584e7e48049d4f07afcc8e743309a.tar.gz nextpnr-b0e66d441cf584e7e48049d4f07afcc8e743309a.tar.bz2 nextpnr-b0e66d441cf584e7e48049d4f07afcc8e743309a.zip |
Global design object working
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'python/dump_design.py')
-rw-r--r-- | python/dump_design.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/dump_design.py b/python/dump_design.py index 9d8ade3e..b8436288 100644 --- a/python/dump_design.py +++ b/python/dump_design.py @@ -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)) |