File: delay_vs_fanout.py

package info (click to toggle)
nextpnr 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 45,032 kB
  • sloc: cpp: 218,128; python: 24,276; ansic: 10,907; pascal: 1,328; sh: 849; makefile: 563; vhdl: 44; objc: 42; tcl: 41
file content (10 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (3)
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)