aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-08-23 21:56:42 +0100
committerGitHub <noreply@github.com>2021-08-23 21:56:42 +0100
commit42166f2e3e4a319e0519e52ae1905db7761e322e (patch)
tree6b4b34b50d53018b6efaaa8f39bb4b75a64ea99f /python
parent897a2fccb64ac52ec4d3ce728fad91c3a5a96ff1 (diff)
parentde311e052fdb749d4acfd6608f6b416a4206e6ae (diff)
downloadnextpnr-42166f2e3e4a319e0519e52ae1905db7761e322e.tar.gz
nextpnr-42166f2e3e4a319e0519e52ae1905db7761e322e.tar.bz2
nextpnr-42166f2e3e4a319e0519e52ae1905db7761e322e.zip
Merge pull request #802 from YosysHQ/gatecat/python-rt-dly
python: Allow querying route delays
Diffstat (limited to 'python')
-rw-r--r--python/delay_vs_fanout.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/delay_vs_fanout.py b/python/delay_vs_fanout.py
new file mode 100644
index 00000000..c417ac78
--- /dev/null
+++ b/python/delay_vs_fanout.py
@@ -0,0 +1,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)
+