aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-08-23 20:51:53 +0100
committergatecat <gatecat@ds0.me>2021-08-23 20:51:53 +0100
commitde311e052fdb749d4acfd6608f6b416a4206e6ae (patch)
tree6b4b34b50d53018b6efaaa8f39bb4b75a64ea99f /python
parent897a2fccb64ac52ec4d3ce728fad91c3a5a96ff1 (diff)
downloadnextpnr-de311e052fdb749d4acfd6608f6b416a4206e6ae.tar.gz
nextpnr-de311e052fdb749d4acfd6608f6b416a4206e6ae.tar.bz2
nextpnr-de311e052fdb749d4acfd6608f6b416a4206e6ae.zip
python: Allow querying route delays
Signed-off-by: gatecat <gatecat@ds0.me>
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)
+