Skip to content

Commit 9b94d86

Browse files
oharboeclaude
andcommitted
flow/designs: add per-PDK WNS plots and README from rules-base.json
Add flow/util/plot_wns.py, a local (no-bazel) script that reads the committed rules-base.json baselines and regenerates, per PDK, a worst-setup-slack bar chart (wns.png) and a "## WNS" README section between generated markers. It covers all 9 PDKs that ship timing baselines (76 designs); the bar is finish-stage WNS, with cts and globalroute drawn as markers so stage-to-stage movement is visible. No OpenROAD/ORFS run is required -- the data already lives in the tree, so the plots are deterministic and the committed PNGs + tables render on GitHub with nothing to run. asap7/README.md additionally carries a hand-written findings section discussing the results. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent c9c22ca commit 9b94d86

19 files changed

Lines changed: 463 additions & 0 deletions

File tree

flow/designs/asap7/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# asap7 designs
2+
3+
## Findings: worst negative slack (WNS) across asap7
4+
5+
These notes read the committed `rules-base.json` baselines — the worst setup slack each
6+
design reaches at clock-tree synthesis (`cts`), global route (`globalroute`) and `finish`.
7+
The plot and table below are regenerated from that data by
8+
[`flow/util/plot_wns.py`](../../util/plot_wns.py); no flow run is needed, so the numbers
9+
are exactly what CI checks against.
10+
11+
What stands out:
12+
13+
- **Every asap7 design closes with negative setup slack.** All 18 baselines have
14+
`finish` WNS < 0, so the committed asap7 constraints target clocks the flow does not
15+
actually meet — these baselines track *how far short* each design lands, not timing
16+
closure. `swerv_wrapper` (≈ −318) and `mock-alu` (≈ −300) are the extreme cases, an
17+
order of magnitude worse than the cluster around −15 … −50 (`aes*`, `mock-cpu`,
18+
`uart`, `jpeg`).
19+
20+
- **Worst slack is often not stable across stages.** Some designs pin their critical
21+
path early and barely move (`cva6`, `jpeg`, `mock-cpu`: `cts ≈ globalroute ≈ finish`).
22+
Others move a lot: `swerv_wrapper` degrades from −80 at cts/globalroute to −318 at
23+
finish, and `riscv32i`/`riscv32i-mock-sram` slip from ≈ −47 (cts) to ≈ −81 (finish) —
24+
routing and final extraction make the path materially worse than CTS predicted.
25+
26+
- **Global route is sometimes more pessimistic than finish.** For `gcd`
27+
(cts −85.9 → globalroute −110 → finish −96.7) and `aes-block`
28+
(cts −84 → globalroute −31 → finish −57) the worst-slack estimate swings between
29+
stages rather than monotonically worsening. This is the same GRT-vs-post-route
30+
estimate gap explored in [`flow/docs/rcx`](../../docs/rcx/README.md) (PR #4302), here
31+
visible at the design level rather than per net.
32+
33+
The takeaway for anyone using cts-stage slack as a proxy for the final result: for asap7
34+
it is a usable rank ordering but not a reliable magnitude — several designs move tens of
35+
units (and `swerv_wrapper` hundreds) between cts and finish.
36+
37+
<!-- BEGIN WNS (generated by flow/util/plot_wns.py) -->
38+
## WNS
39+
40+
Worst setup slack per design at three flow stages — clock-tree synthesis (`cts`), global route (`globalroute`) and `finish` — read from each design's `rules-base.json`. Negative means setup timing is not met. Values are in this PDK's native timing unit (ps for `asap7`, ns for most others), so they are comparable within this PDK but not across PDKs.
41+
42+
The bar is the `finish` slack; the markers show the `cts` and `globalroute` slack for the same design, so stage-to-stage movement is visible.
43+
44+
![WNS by design — asap7](wns.png)
45+
46+
| design | cts | globalroute | finish |
47+
| --- | ---: | ---: | ---: |
48+
| swerv_wrapper | -80 | -80 | -318 |
49+
| mock-alu | -289 | -303 | -300 |
50+
| gcd | -85.9 | -110 | -96.7 |
51+
| gcd-ccs | -101 | -93.7 | -96.4 |
52+
| ethmac | -88.6 | -103 | -93.3 |
53+
| riscv32i-mock-sram | -47.5 | -52.8 | -81.3 |
54+
| riscv32i | -47.5 | -49.8 | -81.2 |
55+
| jpeg_lvt | -30 | -30 | -63.9 |
56+
| aes-block | -84.1 | -31.1 | -56.6 |
57+
| ibex | -79.4 | -74.3 | -52.5 |
58+
| cva6 | -50 | -50 | -50 |
59+
| uart | -47.6 | -58.7 | -49.1 |
60+
| jpeg | -34 | -34 | -34 |
61+
| aes_lvt | -18 | -18 | -26.1 |
62+
| aes | -28.9 | -28 | -24.2 |
63+
| aes-mbff | -20.8 | -19 | -20.8 |
64+
| mock-cpu | -16.6 | -16.6 | -16.6 |
65+
| ethmac_lvt | -19 | -29.5 | -15.2 |
66+
67+
_Generated by `flow/util/plot_wns.py` from `rules-base.json`; regenerate with `python3 flow/util/plot_wns.py`._
68+
<!-- END WNS -->

flow/designs/asap7/wns.png

93 KB
Loading

flow/designs/gf12/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# gf12 designs
2+
3+
<!-- BEGIN WNS (generated by flow/util/plot_wns.py) -->
4+
## WNS
5+
6+
Worst setup slack per design at three flow stages — clock-tree synthesis (`cts`), global route (`globalroute`) and `finish` — read from each design's `rules-base.json`. Negative means setup timing is not met. Values are in this PDK's native timing unit (ps for `asap7`, ns for most others), so they are comparable within this PDK but not across PDKs.
7+
8+
The bar is the `finish` slack; the markers show the `cts` and `globalroute` slack for the same design, so stage-to-stage movement is visible.
9+
10+
![WNS by design — gf12](wns.png)
11+
12+
| design | cts | globalroute | finish |
13+
| --- | ---: | ---: | ---: |
14+
| bp_single | -632 | -470 | -227 |
15+
| bp_quad | -375 | -223 | -225 |
16+
| ariane | -257 | -214 | -212 |
17+
| coyote | -200 | -200 | -200 |
18+
| bp_dual | -758 | -100 | -165 |
19+
| ca53 | -100 | -100 | -100 |
20+
| swerv_wrapper | -75 | -75 | -75 |
21+
| ibex | -51 | -51 | -51 |
22+
| tinyRocket | -40 | -40 | -40 |
23+
| jpeg | -96 | -53.2 | -25 |
24+
| aes | -21 | -21 | -21 |
25+
| gcd | -21.5 | -26.3 | -14 |
26+
| ariane133 | -20.2409 | 0 | 0 |
27+
28+
_Generated by `flow/util/plot_wns.py` from `rules-base.json`; regenerate with `python3 flow/util/plot_wns.py`._
29+
<!-- END WNS -->

flow/designs/gf12/wns.png

75.1 KB
Loading

flow/designs/gf180/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# gf180 designs
2+
3+
<!-- BEGIN WNS (generated by flow/util/plot_wns.py) -->
4+
## WNS
5+
6+
Worst setup slack per design at three flow stages — clock-tree synthesis (`cts`), global route (`globalroute`) and `finish` — read from each design's `rules-base.json`. Negative means setup timing is not met. Values are in this PDK's native timing unit (ps for `asap7`, ns for most others), so they are comparable within this PDK but not across PDKs.
7+
8+
The bar is the `finish` slack; the markers show the `cts` and `globalroute` slack for the same design, so stage-to-stage movement is visible.
9+
10+
![WNS by design — gf180](wns.png)
11+
12+
| design | cts | globalroute | finish |
13+
| --- | ---: | ---: | ---: |
14+
| aes-hybrid | -0.967 | -1.1 | -1.1 |
15+
| aes | -0.789 | -0.876 | -0.918 |
16+
| riscv32i | -0.586 | -0.659 | -0.63 |
17+
| ibex | -0.5 | -0.5 | -0.539 |
18+
| jpeg | -0.375 | -0.375 | -0.375 |
19+
| uart-blocks | -0.3 | -0.3 | -0.3 |
20+
21+
_Generated by `flow/util/plot_wns.py` from `rules-base.json`; regenerate with `python3 flow/util/plot_wns.py`._
22+
<!-- END WNS -->

flow/designs/gf180/wns.png

48.4 KB
Loading

flow/designs/gf55/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# gf55 designs
2+
3+
<!-- BEGIN WNS (generated by flow/util/plot_wns.py) -->
4+
## WNS
5+
6+
Worst setup slack per design at three flow stages — clock-tree synthesis (`cts`), global route (`globalroute`) and `finish` — read from each design's `rules-base.json`. Negative means setup timing is not met. Values are in this PDK's native timing unit (ps for `asap7`, ns for most others), so they are comparable within this PDK but not across PDKs.
7+
8+
The bar is the `finish` slack; the markers show the `cts` and `globalroute` slack for the same design, so stage-to-stage movement is visible.
9+
10+
![WNS by design — gf55](wns.png)
11+
12+
| design | cts | globalroute | finish |
13+
| --- | ---: | ---: | ---: |
14+
| aes | | | 0 |
15+
16+
_Generated by `flow/util/plot_wns.py` from `rules-base.json`; regenerate with `python3 flow/util/plot_wns.py`._
17+
<!-- END WNS -->

flow/designs/gf55/wns.png

30.6 KB
Loading

flow/designs/gt2n/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# gt2n designs
2+
3+
<!-- BEGIN WNS (generated by flow/util/plot_wns.py) -->
4+
## WNS
5+
6+
Worst setup slack per design at three flow stages — clock-tree synthesis (`cts`), global route (`globalroute`) and `finish` — read from each design's `rules-base.json`. Negative means setup timing is not met. Values are in this PDK's native timing unit (ps for `asap7`, ns for most others), so they are comparable within this PDK but not across PDKs.
7+
8+
The bar is the `finish` slack; the markers show the `cts` and `globalroute` slack for the same design, so stage-to-stage movement is visible.
9+
10+
![WNS by design — gt2n](wns.png)
11+
12+
| design | cts | globalroute | finish |
13+
| --- | ---: | ---: | ---: |
14+
| aes | -25 | -75.2 | -75.2 |
15+
| jpeg | -50 | -50 | -50 |
16+
| gcd | -25 | -25 | -25 |
17+
18+
_Generated by `flow/util/plot_wns.py` from `rules-base.json`; regenerate with `python3 flow/util/plot_wns.py`._
19+
<!-- END WNS -->

flow/designs/gt2n/wns.png

36.7 KB
Loading

0 commit comments

Comments
 (0)