|
1 | | -# Wave Loop 419 — physical CCLK capture, real relay gate, or instrument-import parity |
| 1 | +# Wave Loop 426 — FPGA boot-evidence next variant (physical CCLK / XADC readout / formal fallback) |
2 | 2 |
|
3 | | -**Issue:** #1357 |
4 | | -**Branch:** `wave-loop-419` |
5 | | -**Milestone:** Continue the FPGA boot-evidence line from W418. |
| 3 | +**Issue:** #1376 |
| 4 | +**Branch:** `wave-loop-426` |
| 5 | +**Milestone:** Continue the FPGA boot-evidence line from Wave Loop 425. |
6 | 6 |
|
7 | 7 | --- |
8 | 8 |
|
9 | 9 | ## Goal |
10 | 10 |
|
11 | | -Wave 418 closed the Variant C fallback (formal tooling and instrument import). |
12 | | -Wave 419 re-evaluates the bench state and executes the first available variant. |
| 11 | +Wave 425 hardened the FPGA CLI and formal model while the bench was blocked |
| 12 | +(P12 unwired, no relay gate). Wave 426 executes the first available variant from |
| 13 | +`docs/reports/FPGA_LOOP_COOPERATION_W426_2026-07-05.md`. |
13 | 14 |
|
14 | 15 | 1. **Variant A (preferred when bench becomes available):** |
15 | | - - Wire P12 to a logic-analyzer channel and capture real CCLK for |
16 | | - `OSCFSEL=6` and `OSCFSEL=7`. |
17 | | - - Program each variant to SPI flash and perform a true cold-POR boot. |
18 | | - - Import the captures with `tri fpga measured-to-lean --csv/--vcd --raw-ns |
19 | | - --standalone --validate --pvt-context <ctx.json>` and commit the generated |
20 | | - Lean theorems. |
21 | | - - Document the measured frequencies/duty cycles and PVT context in |
22 | | - `fpga/HARDWARE_SSOT.md`. |
23 | | - |
24 | | -2. **Variant B (if relay hardware is available, no CCLK probe):** |
25 | | - - Implement a real `--relay-port` backend for `tri fpga cold-por` |
26 | | - (e.g. serial or TCP relay controlling board power). |
27 | | - - Perform an automated cold-POR power-cycle and capture STAT without |
28 | | - operator intervention. |
29 | | - - Document relay wiring and port syntax in `fpga/HARDWARE_SSOT.md`. |
| 16 | + - Confirm P12 is wired to a logic-analyzer channel. |
| 17 | + - Program SPI flash with OSCFSEL=6 and OSCFSEL=7 variants. |
| 18 | + - Capture real CCLK during cold-POR boot for both variants. |
| 19 | + - Import with `tri fpga measured-to-lean --csv/--vcd --raw-ns --standalone |
| 20 | + --validate --pvt-context <ctx.json>` and commit generated Lean theorems. |
| 21 | + - Document frequencies/duty cycles and PVT context in |
| 22 | + `fpga/HARDWARE_SSOT.md` §3.6.21. |
| 23 | + |
| 24 | +2. **Variant B (if board is reachable or external capture available):** |
| 25 | + - Add real XADC readout to `tri fpga boot-log` / `cclk-sweep` / `cold-por` |
| 26 | + over the existing JTAG path, so JSON `xadc` has `source: "xadc"` and live |
| 27 | + temp/vccint/vccaux values. |
| 28 | + - Alternatively, import at least one external CSV/VCD capture end-to-end. |
| 29 | + - Run dry-run cold-POR boot-log for OSCFSEL 6/7 variants with |
| 30 | + `--pvt-context`. |
| 31 | + - Document the recipe in `fpga/HARDWARE_SSOT.md` §3.6.21. |
30 | 32 |
|
31 | 33 | 3. **Variant C (fallback if bench still blocked):** |
32 | | - - Extend instrument-import parity: additional VCD/CSV formats and hardened |
33 | | - `$comment` sections. |
34 | | - - Add PVT envelope monotonicity/antitonicity tests in Rust and Lean. |
35 | | - - Document the standalone `lake`-package workflow end-to-end in |
36 | | - `fpga/HARDWARE_SSOT.md`. |
| 34 | + - Extend the PVT formal model with an operating-rectangle grid theorem or a |
| 35 | + measured-CCLK link theorem for every OSCFSEL 0–7 variant. |
| 36 | + - Land one safe gen-verilog #1245 sub-fix from the remaining 7 failures, if |
| 37 | + narrow and regression-free; otherwise explicitly defer. |
| 38 | + - Harden `tri fpga` JSON schema / decision-tree output. |
| 39 | + - Refresh `docs/reports/T27_VS_FORMAL_HDL_2026.md` if new 2026 competitor |
| 40 | + developments surface. |
37 | 41 |
|
38 | 42 | --- |
39 | 43 |
|
40 | 44 | ## Decomposed plan |
41 | 45 |
|
42 | | -See `docs/reports/FPGA_LOOP_COOPERATION_W419_2026-07-04.md` and |
43 | | -`.claude/plans/wave-loop-419.md`. |
44 | | - |
45 | 46 | | Step | File(s) | Deliverable | |
46 | 47 | |------|---------|-------------| |
47 | | -| 1 | `cli/tri/src/fpga.rs` | Variant A import, B relay backend, or C parity/monotonicity tests | |
48 | | -| 2 | `proofs/lean4/Trinity/TernaryFPGABoot.lean` | PVT monotonicity lemmas or new measured theorems | |
49 | | -| 3 | `fpga/HARDWARE_SSOT.md` | Updated capture / relay / integration protocol | |
50 | | -| 4 | `docs/reports/*` | W419 report, evidence, W420 cooperation | |
51 | | -| 5 | `.trinity/experience.md` | W419 learnings | |
52 | | -| 6 | git/PR | squash-merge to `master`, close #1357, open #? for W420 | |
| 48 | +| 1 | `cli/tri/src/fpga.rs` or `proofs/lean4/Trinity/TernaryFPGABoot.lean` or `bootstrap/src/compiler.rs` | Variant A capture import, B XADC readout/capture import, or C formal/gen-verilog hardening | |
| 49 | +| 2 | `fpga/HARDWARE_SSOT.md` / `docs/reports` | Updated protocol or comparison note | |
| 50 | +| 3 | `docs/reports/*` | W426 report, evidence, W427 cooperation | |
| 51 | +| 4 | `.trinity/experience.md` | W426 learnings | |
| 52 | +| 5 | git/PR | squash-merge to `master`, close issue, open #? for W427 | |
53 | 53 |
|
54 | 54 | --- |
55 | 55 |
|
56 | 56 | ## Acceptance criteria |
57 | 57 |
|
58 | 58 | ### Bundle A |
59 | | -- [ ] AC-A1: P12 is wired to a logic-analyzer channel and real CCLK capture files exist for `OSCFSEL=6` and `OSCFSEL=7`. |
| 59 | +- [ ] AC-A1: Real CCLK capture for `OSCFSEL=6` and `OSCFSEL=7` exists. |
60 | 60 | - [ ] AC-A2: `tri fpga measured-to-lean --csv/--vcd --raw-ns --standalone` generated Lean files build with `lake build`. |
61 | 61 | - [ ] AC-A3: Measured CCLK satisfies the PVT-aware flash spec, or any exceedance is explicitly explained. |
| 62 | +- [ ] AC-A4: Cold-POR SPI flash boot for OSCFSEL 6/7 is documented with STAT reads. |
62 | 63 |
|
63 | 64 | ### Bundle B |
64 | | -- [ ] AC-B1: `tri fpga cold-por <bit> --relay-port <real>` performs an automated power-cycle and captures STAT. |
65 | | -- [ ] AC-B2: The resulting log has `relay_mock: false` and a real STAT raw value. |
66 | | -- [ ] AC-B3: `fpga/HARDWARE_SSOT.md` documents relay wiring and port syntax. |
| 65 | +- [ ] AC-B1: Real XADC readout lands, OR at least one external capture is imported end-to-end. |
| 66 | +- [ ] AC-B2: The import/readout path exposes no unhandled unit, voltage-unit, or noise cases. |
| 67 | +- [ ] AC-B3: Dry-run boot-log artifacts exist for OSCFSEL 6/7 and include PVT/XADC context. |
67 | 68 |
|
68 | 69 | ### Bundle C |
69 | | -- [x] AC-C1: At least one additional instrument-import unit test lands (VCD `$comment` hardening + CSV `--csv-channel` explicit select). |
70 | | -- [x] AC-C2: Rust and Lean tests verify PVT envelope monotonicity/antitonicity. |
71 | | -- [x] AC-C3: The standalone lake-package workflow is documented end-to-end. |
| 70 | +- [ ] AC-C1: At least one new PVT grid / envelope / OSCFSEL-link theorem is added and builds. |
| 71 | +- [ ] AC-C2: One safe gen-verilog #1245 sub-fix lands without increasing the 7-failure yosys smoke count, or is explicitly deferred if unsafe. |
| 72 | +- [ ] AC-C3: `boot-log` / `cold-por` / `cclk-sweep` tooling is measurably more robust or better documented. |
| 73 | +- [ ] AC-C4: Competitor snapshot is updated if any new 2026 developments are found. |
72 | 74 |
|
73 | 75 | ### Invariant checks |
74 | | -- [x] `./scripts/tri test` parse/typecheck/gen/seal-verify phases pass. |
75 | | -- [x] `lake build Trinity.TernaryFPGABoot` passes. |
76 | | -- [x] `cargo test -p tri fpga::tests` passes. |
| 76 | +- [ ] `./scripts/tri test` parse/typecheck/gen/seal-verify phases pass. |
| 77 | +- [ ] `lake build Trinity.TernaryFPGABoot` passes. |
| 78 | +- [ ] `cargo test -p tri fpga::tests` passes. |
77 | 79 |
|
78 | 80 | --- |
79 | 81 |
|
80 | 82 | ## PR |
| 83 | + |
81 | 84 | - Target: `master` |
82 | | -- PR: #1360 |
83 | | -- Body: `Closes #1357` |
84 | | -- Report: `docs/reports/WAVE_LOOP_419_REPORT.md` |
85 | | -- Evidence: `docs/reports/FPGA_LOOP_EVIDENCE_W419_2026-07-05.md` |
86 | | -- Cooperation W420: `docs/reports/FPGA_LOOP_COOPERATION_W420_2026-07-05.md` |
| 85 | +- PR: to open after work |
| 86 | +- Body: `Closes #1376` |
| 87 | +- Report: `docs/reports/WAVE_LOOP_426_REPORT.md` |
| 88 | +- Evidence: `docs/reports/FPGA_LOOP_EVIDENCE_W426_YYYY-MM-DD.md` |
| 89 | +- Cooperation W427: `docs/reports/FPGA_LOOP_COOPERATION_W427_YYYY-MM-DD.md` |
87 | 90 |
|
88 | 91 | --- |
89 | 92 |
|
90 | 93 | ## Default variant |
91 | 94 |
|
92 | | -Execute **Variant A** if the analyzer and DLC10 cable are available. Otherwise |
93 | | -try **Variant B** if a relay and DLC10 cable are available. Otherwise fall back |
94 | | -to **Variant C**. |
| 95 | +Execute **Variant A** if P12 is wired and the analyzer is ready. |
| 96 | +Otherwise execute **Variant B** if the board is reachable for real XADC readout |
| 97 | +or an external capture is available. |
| 98 | +Otherwise fall back to **Variant C**. |
95 | 99 |
|
96 | 100 | --- |
97 | 101 |
|
|
0 commit comments