File: delay_vs_fanout.py

package info (click to toggle)
nextpnr 0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 23,908 kB
  • sloc: cpp: 219,642; python: 21,427; ansic: 10,274; sh: 779; makefile: 493; tcl: 116; vhdl: 44; objc: 42
file content (10 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
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)