nextpnr/generic/examples/report.py
David Shah 32327b761a generic: Simple working example
Signed-off-by: David Shah <dave@ds0.me>
2019-04-02 15:30:01 +01:00

13 lines
421 B
Python

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)