aboutsummaryrefslogtreecommitdiffstats
path: root/generic/examples/report.py
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-04-01 20:16:29 +0100
committerDavid Shah <dave@ds0.me>2019-04-02 15:30:01 +0100
commit32327b761ab8b8c438bd91d6c32f061ffaed3454 (patch)
tree22d0674b10e29634cf072058ae0bafcd3e2d9149 /generic/examples/report.py
parent6a383cd4c57db1f8bab6416daffdb24c0eb093c6 (diff)
downloadnextpnr-32327b761ab8b8c438bd91d6c32f061ffaed3454.tar.gz
nextpnr-32327b761ab8b8c438bd91d6c32f061ffaed3454.tar.bz2
nextpnr-32327b761ab8b8c438bd91d6c32f061ffaed3454.zip
generic: Simple working example
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic/examples/report.py')
-rw-r--r--generic/examples/report.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/generic/examples/report.py b/generic/examples/report.py
new file mode 100644
index 00000000..c43367fa
--- /dev/null
+++ b/generic/examples/report.py
@@ -0,0 +1,13 @@
+with open("blinky.txt", "w") as f:
+ for nname, net in ctx.nets:
+ print("# Net %s" % nname, file=f)
+ # FIXME: Pip ordering
+ for wire, pip in net.wires:
+ if pip.pip != "":
+ print("%s" % pip.pip, file=f)
+ print("", file=f)
+ for cname, cell in ctx.cells:
+ print("# Cell %s at %s" % (cname, cell.bel), file=f)
+ for param, val in cell.params:
+ print("%s.%s %s" % (cell.bel, param, val), file=f)
+ print("", file=f) \ No newline at end of file