diff options
author | David Shah <davey1576@gmail.com> | 2018-06-07 12:59:27 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-07 12:59:27 +0200 |
commit | 66b36cdd45532f157d3800bd1ed8078fc5a43950 (patch) | |
tree | 3b22d71f433df04b1945a62109e1a9d1f6ef0653 /python | |
parent | 8bfeaeacedeb09133b8fb157c876fb90f41f5676 (diff) | |
parent | b0e66d441cf584e7e48049d4f07afcc8e743309a (diff) | |
download | nextpnr-66b36cdd45532f157d3800bd1ed8078fc5a43950.tar.gz nextpnr-66b36cdd45532f157d3800bd1ed8078fc5a43950.tar.bz2 nextpnr-66b36cdd45532f157d3800bd1ed8078fc5a43950.zip |
Merge branch 'python'
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'python')
-rw-r--r-- | python/dump_design.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/dump_design.py b/python/dump_design.py new file mode 100644 index 00000000..b8436288 --- /dev/null +++ b/python/dump_design.py @@ -0,0 +1,6 @@ +# 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)) |