Skip to content

Commit fd657fb

Browse files
oharboeclaude
andcommitted
flow/README.md: document host-aware sweep + yosys-idempotency triage
Restore the sweep recipe (per-platform --keep_going, big designs solo, small designs batched) and the triage decision tree for failing _tests. The yosys-environment false-positive check now points at @bazel-orfs//:make-yosys-netlist (and the reverse @bazel-orfs//:yosys-check), which moved upstream in 432edcd63; the full workflow lives in @bazel-orfs//:TESTING.md "Debugging OpenROAD determinism (bazel vs make)". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 3fde4a2 commit fd657fb

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

‎flow/README.md‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,82 @@ the generated targets get `tags = ["manual"]`.
5656
Each OpenROAD invocation takes `-threads <nproc>`. A wildcard
5757
`bazelisk test` runs designs in parallel and overcommits the host. Cap
5858
with `--jobs=N`.
59+
60+
## Running a full sweep without overburdening the host
61+
62+
To verify every design under one or more platforms (e.g. before
63+
bumping `bazel-orfs` or `tools/yosys`), drive `bazelisk test` per
64+
platform with `--keep_going` so one failure doesn't mask the rest,
65+
and split big designs into their own invocations so routing/synth
66+
don't overcommit RAM.
67+
68+
```bash
69+
# 1. Install the make-flow toolchain too, so failures can be
70+
# cross-checked against `make DESIGN_CONFIG=...`.
71+
(cd tools/OpenROAD && bazelisk run //:install)
72+
73+
# 2. List actual test targets per platform (capture before running
74+
# so the sweep is reproducible).
75+
bazelisk query 'tests(//flow/designs/asap7/...)'
76+
bazelisk query 'tests(//flow/designs/sky130hd/...)'
77+
78+
# 3. Small/fast designs in one parallel invocation; each big design
79+
# in its own sequential invocation. 16-core / 30 GiB box:
80+
bazelisk test --keep_going \
81+
//flow/designs/asap7/aes/... //flow/designs/asap7/gcd/... \
82+
//flow/designs/asap7/uart/... //flow/designs/sky130hd/gcd/... # etc.
83+
84+
for big in cva6 ibex jpeg riscv32i swerv_wrapper; do
85+
bazelisk test --keep_going //flow/designs/asap7/${big}/...
86+
done
87+
```
88+
89+
Heuristic: hierarchical / RISC-V cores / image-processing designs
90+
run solo; everything else batches. Use `--jobs=N` to cap parallel
91+
OpenROAD invocations if the host still thrashes.
92+
93+
## Triaging a failing `_test`
94+
95+
For each failing `<design>_test`, decide which bucket it falls into:
96+
97+
1. **Trivial config fix.** Missing variable in
98+
`flow/scripts/variables.yaml`, a typo in `config.mk`, a missing
99+
`exports_files()` for a cross-design SDC/Verilog reference, etc.
100+
Fix in place; `variables.yaml` is the single source of truth
101+
bazel-orfs validates against.
102+
103+
2. **Yosys-environment false positive (OpenROAD is idempotent given
104+
the same netlist).** Bazel-built yosys and make-built yosys
105+
produce different `1_2_yosys.v` for the same RTL, and that
106+
netlist drift can move QoR past `rules-base.json` thresholds
107+
even when OpenROAD itself is bit-deterministic. Confirm with:
108+
109+
```bash
110+
bazelisk run @bazel-orfs//:make-yosys-netlist \
111+
//flow/designs/asap7/<design>:<design>_test
112+
```
113+
114+
All stages MATCH in the `bazel+make-netlist` column → false
115+
positive, ignore (or relax the threshold). Any DIFFER → real
116+
bazel-vs-make OpenROAD divergence — file the per-stage SHA
117+
matrix as an issue. `@bazel-orfs//:yosys-check` is the
118+
reverse-direction wrapper (bazel's netlist into make).
119+
120+
Full workflow + interpretation, the `SYNTH_NETLIST_FILES` manual
121+
override, and the `BLOCKS=` caveat live in
122+
[`@bazel-orfs//:TESTING.md`](https://github.com/The-OpenROAD-Project/bazel-orfs/blob/main/TESTING.md)
123+
under "Debugging OpenROAD determinism (bazel vs make)".
124+
125+
3. **Real bug (both flows fail at the same stage).** `.odb` SHAs may
126+
still differ (yosys version) but the failure mode matches.
127+
Generate an issue tarball from the make flow:
128+
129+
```bash
130+
cd flow
131+
make <stage>_issue DESIGN_CONFIG=designs/<plat>/<design>/config.mk \
132+
ISSUE_TAG=<plat>-<design>-<short>
133+
```
134+
135+
`flow/util/utils.mk` auto-generates `<script>_issue` targets for
136+
every script in `flow/scripts/` (`floorplan_issue`,
137+
`global_route_issue`, `detail_route_issue`, `final_issue`, …).

0 commit comments

Comments
 (0)