You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a living worklog for DFT scan insertion + scan-chain stitching/optimization in ORFS. For historical comparisons, **OpenROAD `7bc521f36a` is treated as the “baseline DFT”** (often yields 0 chains due to scan-pin recognition failures). All work here assumes a **vanilla OpenSTA** requirement (no `src/sta` parser changes required).
4
4
5
-
## Workspace snapshot (2026-02-07)
5
+
## Workspace snapshot (2026-02-12)
6
6
7
-
- ORFS (this repo): `e3fd2753805f` (dirty)
8
-
- OpenROAD submodule: `9d5965b56818` (dirty; local patches under `tools/OpenROAD/src/dft/`)
-`SCANOPT` solver integrates UCLA ScanOptpack (`UCLApack-3-010411`), and the repo-root UCLApack sources match OpenROAD’s vendored copy used by DFT.
37
+
- For A/B comparisons, fix `DFT_SCANOPT_SEED` and increase `DFT_SCANOPT_TIME_LIMIT` to reduce run-to-run variance from tight time budgets.
38
+
- ORFS scan-chain tooling (cost + plotting + bundled external solver I/O) uses pin-level asymmetric costs (scan-out → scan-in) and includes Begin/End terms when endpoints are known.
39
+
- Scan enable fanout control is handled in OpenROAD as `buffer_scan_enable`; ORFS calls it by default via `DFT_BUFFER_SCAN_ENABLE=1` (falls back to legacy `insert_buffer` if the command is unavailable).
40
+
-`polarity_mode=strict` is the default (so mixed-edge flops are split across chains unless explicitly overridden).
41
+
- ORFS `final_report.tcl` no longer hard-requires `orfs_write_db` (falls back to `write_db`), avoiding fork regressions.
42
+
- When `DFT_SCAN_ORDER_CONSTRAINTS_FILE` is set, ORFS keeps OpenROAD’s ordering (does not apply external `scanopt_next` reorder) so groups/paths/before/fixed_edge constraints are preserved.
43
+
- Verification smoke tests completed:
44
+
- ORFS `nangate45/gcd` runs end-to-end through `finish` with `DFT_ENABLE=1` on `ORFS-clean-DFT`.
45
+
- “DFT-only” planning on a pre-done `sky130hd/jpeg` placement validates with 0 broken links (including a multi-chain run).
46
+
-`dft-verifier/DFTRepro` outputs were backed up and regenerated cleanly; prior invalid pin placement issues were traced to harness pin/endpoints setup and fixed.
47
+
48
+
## Verification (quick sanity)
49
+
50
+
### 0) Confirm the OpenROAD binary you are using
51
+
52
+
In this workstream there are often multiple OpenROAD builds in play. For DFT runs, the minimal sanity check is that your OpenROAD build has Python enabled and exposes the DFT commands you expect.
### 1) ORFS end-to-end smoke test (Nangate45 `gcd`)
70
+
71
+
```bash
72
+
make -C flow DESIGN_CONFIG=./designs/nangate45/gcd/config.mk FLOW_VARIANT=dft_gcd_smoke DFT_ENABLE=1 finish
73
+
```
24
74
25
-
- ORFS hooks support `DFT_ENABLE=1` end-to-end: scan replace, scan port creation, optional scan port placement, chain stitching, and reporting.
26
-
-`execute_dft_plan` supports multi-chain planning with hard feasibility checks (`chain_count`, `max_length`, `max_imbalance`) and a constraints file for chain naming/endpoints/grouping/ordering/exclusion.
27
-
- Multi-chain “big jumps” are reduced by (a) including Begin/End costs in ordering, (b) selecting between K-means vs X/Y/Hilbert sweep partitions using a “worst within-chain Manhattan diameter” objective (tie-break by worst X/Y gap), and (c) a stronger `SCANOPT` long-edge penalty + worst-edge local moves (including direction-preserving 3-opt segment swap).
28
-
- Regressions + visualization live under `dft_artifacts/` plus convenience plots under `new_highlighter/` and `highlighter_flattened/`.
75
+
### 2) “DFT-only” sanity on an existing `sky130hd/jpeg` placement (do not re-run the full flow)
- Instance tokens in constraints must match OpenDB instance names exactly. In DEF/ODB, bus indices are typically escaped (e.g. `foo\\[0\\]`), so a Verilog-style token like `foo[0]` will not match.
216
+
- For `inst/pin` terms, escape literal slashes as `\\/` (OpenROAD treats unescaped `/` as the inst/pin separator).
217
+
123
218
Planner sanity:
124
219
- If the constraints file defines chain names, their count must match the DFT plan’s total chain count (after domain splitting), otherwise `execute_dft_plan` errors instead of silently producing fewer chains.
125
220
@@ -252,7 +347,7 @@ Routing robustness:
252
347
253
348
### OpenROAD executables used
254
349
255
-
- OpenROAD under test: `tools/OpenROAD/build/bin/openroad` (build of `tools/OpenROAD`, currently `9d5965b56818` + local patches)
350
+
- OpenROAD under test: `$(pwd)/tools/OpenROAD/build/bin/openroad` (build of the `tools/OpenROAD` submodule pinned by your ORFS checkout; use `ORFS-clean-DFT` for the clean baseline pinned to `b64941f4c9`)
256
351
- Baseline OpenROAD (historical): build OpenROAD at `7bc521f36a` (ideally in a separate clone/worktree/build dir) and point `OPENROAD_EXE` at that binary
Copy file name to clipboardExpand all lines: doc.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,15 @@ Validation:
72
72
- Preplaced regress: `python3 flow/util/dft_preplaced_regress.py ...` (see `doc-DFT.md`)
73
73
- Plots: `python3 highlighter.py --def ... --verilog ... --output-plot ...` (dashed black edges are scan I/O port→chain-endpoint “stems”, not intra-chain edges; use `flow/util/scan_chain_plot.py --no-io-edges` to hide them)
74
74
75
-
Status (2026-02-07):
76
-
- Multi-chain “big jumps” reduced via Hilbert/axis sweep partition selection + SCANOPT worst-edge direction-preserving 3-opt; k=22 example plots are in `dft_artifacts/preplaced_runs/ibex_k22_hilbert_20260207/` (see `doc-DFT.md`).
- ORFS: `ORFS-clean-DFT` (pins `tools/OpenROAD` to `b64941f4c9`, guards `orfs_write_db`, prefers local `tools/OpenROAD/build/bin/openroad`)
79
+
-`UCLApack-3-010411` (repo root) matches OpenROAD’s vendored copy under `tools/OpenROAD/src/dft/third_party/UCLApack-3-010411` for the ScanOpt sources used by DFT.
80
+
- ORFS end-to-end DFT smoke test passes: `nangate45/gcd` completes `finish` with `DFT_ENABLE=1` on `ORFS-clean-DFT`.
81
+
- “DFT-only” sanity on a pre-done `sky130hd/jpeg` placement passes: `scan_replace + execute_dft_plan` validates with 0 broken links (including a 4-chain run).
82
+
-`dft-verifier/DFTRepro`: backed up old outputs, fixed harness pin placement + endpoint constraints + scan_enable buffering; suite regenerates without the prior `GRT-0080 Invalid pin placement` failures.
83
+
- Multi-chain “big jumps” remain reduced via Hilbert/axis sweep partition selection + SCANOPT worst-edge direction-preserving 3-opt (see `dft_artifacts/preplaced_runs/ibex_k22_hilbert_20260207/`).
0 commit comments