|
1 | | -# Wave Loop 405 — FPGA boot loop closure (variant A/B/C) |
| 1 | +# Wave Loop 411 — real P12 + OSCFSEL 6/7 retry, relay CI gate, or auto-proof tooling |
2 | 2 |
|
3 | | -**Issue:** #1311 |
4 | | -**Branch:** `wave-loop-405` |
5 | | -**Milestone:** W404 closed the SRAM hardware smoke gate. W405 should close one |
6 | | -of the remaining gaps: real CCLK measurement, flash-boot cold-POR gate, or |
7 | | -formal CCLK timing-safety. |
| 3 | +**Issue:** #1329 |
| 4 | +**Branch:** `wave-loop-411` |
| 5 | +**Milestone:** W410 completed the measured-duty formal link but both physical |
| 6 | +paths (real P12 capture and DLC10-based `OSCFSEL=6,7` boot) remain blocked. W411 |
| 7 | +either finally connects the bench or uses the extra cycle to build automation / |
| 8 | +formal tooling. |
8 | 9 |
|
9 | 10 | --- |
10 | 11 |
|
11 | 12 | ## Goal |
12 | 13 |
|
13 | | -1. **Variant A** — Capture the actual CCLK frequency/duty cycle on pin P12 and |
14 | | - record it in `fpga/HARDWARE_SSOT.md` §3.5. |
15 | | -2. **Variant B** — Extend `tri fpga smoke-gate --require-cable` to flash boot: |
16 | | - program flash, prompt for power-cycle, capture cold-POR STAT, assert |
17 | | - `boot_success`. |
18 | | -3. **Variant C** — Extend the Lean 4 model with `OSCFSEL` constants, nominal |
19 | | - CCLK ranges, and a `cclk_within_flash_spec` predicate; prove the canonical |
20 | | - config is timing-safe. |
21 | | -4. Update close-out reports and open W406 cooperation variants. |
| 14 | +1. **Variant A** — Real P12 CCLK capture + physical `OSCFSEL=6,7` cold-POR |
| 15 | + boot. Wire P12 to ADBUS4 (or a DSLogic/scope channel), connect the DLC10 |
| 16 | + cable, capture the real CCLK, run the 6/7 sweep, and turn the measured |
| 17 | + values into a `measured_cclk_satisfies_flash_spec` proof. |
| 18 | +2. **Variant B** — Relay-controlled cold-POR hardware CI gate. Build the |
| 19 | + relay + tri-stateable JTAG automation infrastructure so the flash-boot gate |
| 20 | + can run unattended. |
| 21 | +3. **Variant C** — Auto-proof tooling + PVT margins. Add a subcommand that |
| 22 | + generates a Lean theorem from a `--json` measurement, and extend the formal |
| 23 | + model with conservative process/voltage/temperature margins. |
| 24 | + |
| 25 | +Default recommendation: **Variant A + C bundle**. If the bench is still |
| 26 | +unavailable, pick **Variant B** or **Variant C alone**. |
22 | 27 |
|
23 | 28 | --- |
24 | 29 |
|
25 | 30 | ## Decomposed plan |
26 | 31 |
|
27 | | -See `.claude/plans/wave-loop-405.md` for the full weak-point / competitor scan |
28 | | -and detailed decomposition. |
| 32 | +See `docs/reports/FPGA_LOOP_COOPERATION_W411_2026-07-04.md` for the full |
| 33 | +weak-point / competitor scan and detailed decomposition. |
29 | 34 |
|
30 | 35 | | Step | File(s) | Deliverable | |
31 | | -|------|---------|-------------| |
32 | | -| 1 | `.claude/plans/wave-loop-405.md` | Decomposed plan + weak-point + competitor scan | |
33 | | -| 2 | `fpga/HARDWARE_SSOT.md` (Variant A) | Measured CCLK frequency/duty cycle on P12 | |
34 | | -| 3 | `cli/tri/src/fpga.rs` (Variant B) | `--flash-boot` flag + program/reset/capture flow | |
35 | | -| 4 | `proofs/lean4/Trinity/TernaryFPGABoot.lean` (Variant C) | OSCFSEL/CCLK-bound lemmas | |
36 | | -| 5 | `docs/reports/*` | W405 report, evidence, W406 cooperation | |
37 | | -| 6 | `.trinity/experience.md` | W405 learnings | |
38 | | -| 7 | git/PR | squash-merge to master, close #1311, open #W406 | |
| 36 | +|---|---|---| |
| 37 | +| 1 | `docs/reports/FPGA_LOOP_COOPERATION_W411_2026-07-04.md` | Cooperation variants | |
| 38 | +| 2 | `fpga/HARDWARE_SSOT.md` §3.6.1/§3.6.9 (Variant A) | Real measured CCLK and 6/7 boot status | |
| 39 | +| 3 | `build/fpga/` + `docs/reports/` (Variant A) | Real capture CSV + boot-log JSON | |
| 40 | +| 4 | `proofs/lean4/Trinity/TernaryFPGABoot.lean` (Variant A/C) | `measured_*_satisfies_flash_spec` instance from real data | |
| 41 | +| 5 | `cli/tri/src/fpga.rs` (Variant B/C) | Relay trait + auto-power-cycle mode, or `measured-to-lean` subcommand | |
| 42 | +| 6 | `docs/reports/*` | W411 report, evidence, W412 cooperation | |
| 43 | +| 7 | `.trinity/experience.md` | W411 learnings | |
| 44 | +| 8 | `docs/NOW.md` | W411 entry | |
| 45 | +| 9 | git/PR | squash-merge to master, close #1329, open #W412 | |
39 | 46 |
|
40 | 47 | --- |
41 | 48 |
|
42 | 49 | ## Acceptance criteria |
43 | 50 |
|
44 | | -- [ ] AC-A1 (Variant A): a physical CCLK trace is captured and the dominant |
45 | | - frequency is recorded. |
46 | | -- [ ] AC-A2 (Variant A): `fpga/HARDWARE_SSOT.md` §3.5 contains the measured value. |
47 | | -- [ ] AC-B1 (Variant B): `tri fpga smoke-gate --require-cable --flash-boot` |
48 | | - programs flash and asserts `boot_success` after a cold POR. |
49 | | -- [ ] AC-C1 (Variant C): new Lean 4 lemmas link `OSCFSEL`/CCLK bounds to the |
50 | | - documented decision trees. |
51 | | -- [ ] AC-D1: `./scripts/tri test` passes. |
52 | | -- [ ] AC-D2: W405 report + evidence + W406 cooperation variants committed. |
| 51 | +- [ ] AC-A1: real P12 CCLK capture CSV exists (or blocker documented). **Blocked — P12 not wired.** |
| 52 | +- [ ] AC-A2: `OSCFSEL=6,7` boot logs exist (PASS or documented failure). **Blocked — DLC10 cable missing.** |
| 53 | +- [ ] AC-A3: a Lean theorem links the captured `(frequency, duty)` pair to |
| 54 | + `transaction_satisfies_flash_spec`. **Delivered via `measured-to-lean` generated theorems on synthetic data.** |
| 55 | +- [ ] AC-B1: relay auto-power-cycle mode exists behind a trait with a board-less |
| 56 | + mock path, or explicitly deferred. **Deferred to W412.** |
| 57 | +- [x] AC-C1: `measured-to-lean` subcommand generates a type-correct theorem |
| 58 | + skeleton from `--json`. |
| 59 | +- [x] AC-C2: PVT margin predicate exists in Lean 4 and implies |
| 60 | + `measured_cclk_satisfies_flash_spec`. |
| 61 | +- [x] AC-C3: A Lean theorem proves that the PVT margin predicate implies |
| 62 | + `transaction_satisfies_flash_spec`. |
| 63 | +- [x] AC-D1: `lake build Trinity.TernaryFPGABoot` passes. |
| 64 | +- [x] AC-D2: `cargo test -p tri fpga::tests` passes. |
| 65 | +- [x] AC-D3: `./scripts/tri test` parse/typecheck/gen/seal-verify phases pass. |
| 66 | +- [x] AC-D4: gen-verilog-yosys-smoke failures remain tracked separately. |
| 67 | +- [x] AC-D5: W411 report + evidence + W412 cooperation variants committed. |
53 | 68 |
|
54 | 69 | --- |
55 | 70 |
|
56 | | -## Default variant |
| 71 | +## Close-out note |
| 72 | + |
| 73 | +W411 implemented **Variant C alone** because the bench blockers persisted. The |
| 74 | +`tri fpga measured-to-lean` subcommand and the PVT-margin predicate close two |
| 75 | +real weak points in the measured-to-formal pipeline. Variant A and the physical |
| 76 | +half of any bundle remain blocked until P12 is wired and the DLC10 cable is |
| 77 | +connected. |
57 | 78 |
|
58 | | -The bench cable and board are reachable, so the recommended default is |
59 | | -**Variant B** (flash-boot cold-POR smoke gate). It directly extends the W404 |
60 | | -SRAM gate and closes the boot loop end-to-end. |
| 79 | +--- |
| 80 | + |
| 81 | +## Default variant |
61 | 82 |
|
62 | | -If the manual power-cycle step proves too awkward, fall back to **Variant C** |
63 | | -(no hardware) and pursue Variant B in W406. If a logic analyzer / oscilloscope |
64 | | -becomes available before implementation starts, switch to **Variant A**. |
| 83 | +**Variant A + C bundle**: physical measurement and 6/7 boot, with auto-proof |
| 84 | +tooling. If the bench is still unavailable, fall back to **Variant B** (relay |
| 85 | +CI gate) or **Variant C alone** (formal-tooling improvements). |
65 | 86 |
|
66 | 87 | --- |
67 | 88 |
|
68 | | -*φ² + φ⁻² = 3 | TRINITY* |
| 89 | +*phi^2 + phi^-2 = 3 | TRINITY* |
0 commit comments