diff options
author | ZipCPU <dgisselq@ieee.org> | 2018-06-07 07:45:22 -0400 |
---|---|---|
committer | ZipCPU <dgisselq@ieee.org> | 2018-06-07 07:45:22 -0400 |
commit | 1ed5c641c16bffabe96ffd2ef8499dd3ae740050 (patch) | |
tree | e7b9417cb4faf44956859289dd6b9dfb579f96d9 /python | |
parent | d7bb30cc66f2ba39c77a979b809a6e6bdfcb5097 (diff) | |
parent | ed0c44891fb510c8181c2ae9332d7a030f0aaaff (diff) | |
download | nextpnr-1ed5c641c16bffabe96ffd2ef8499dd3ae740050.tar.gz nextpnr-1ed5c641c16bffabe96ffd2ef8499dd3ae740050.tar.bz2 nextpnr-1ed5c641c16bffabe96ffd2ef8499dd3ae740050.zip |
Merge branch 'master' into gqtech
Diffstat (limited to 'python')
-rw-r--r-- | python/dump_design.py | 6 | ||||
-rw-r--r-- | python/functions.py | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/python/dump_design.py b/python/dump_design.py new file mode 100644 index 00000000..22d4ab17 --- /dev/null +++ b/python/dump_design.py @@ -0,0 +1,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)) diff --git a/python/functions.py b/python/functions.py new file mode 100644 index 00000000..4f005456 --- /dev/null +++ b/python/functions.py @@ -0,0 +1,2 @@ +def test_function(): + print("Hello World!") |