nextpnr/python/delay_vs_fanout.py
gatecat de311e052f python: Allow querying route delays
Signed-off-by: gatecat <gatecat@ds0.me>
2021-08-23 20:51:53 +01:00

11 lines
374 B
Python

with open("delay_vs_fanout.csv", "w") as f:
print("fanout,delay", file=f)
for net_name, net in ctx.nets:
if net.driver.cell is None:
continue
if net.driver.cell.type == "DCCA":
continue # ignore global clocks
for user in net.users:
print(f"{len(net.users)},{ctx.getNetinfoRouteDelay(net, user)}", file=f)