|
| 1 | +# Wave Loop 433 Decomposed Plan |
| 2 | + |
| 3 | +**Issue:** #1393 |
| 4 | +**Branch:** `wave-loop-433` |
| 5 | +**Date:** 2026-07-01 |
| 6 | +**Anchor:** φ² + φ⁻² = 3 | TRINITY |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## 1. Weak-point analysis |
| 11 | + |
| 12 | +### Physical bench (still blocked) |
| 13 | +- P12 (CFGCLK / CCLK_0) is not wired to a logic-analyzer channel. |
| 14 | +- No relay / remote-power cold-POR gate is wired. |
| 15 | +- The on-board Xilinx DLC10 / Platform Cable USB II is not connected. |
| 16 | +- **Implication:** Variant A (real CCLK capture) and Variant B (live XADC + real board) are not executable unless the user has wired new hardware since W432. |
| 17 | + |
| 18 | +### Master-merge debt (still blocked) |
| 19 | +- W432 probed `origin/master` and found the `gen-verilog` fix set (`701d79b3b`, `507408f47`) is on a divergent `master` lineage not safely reachable from `wave-loop-432`. |
| 20 | +- A direct cherry-pick of `507408f47` conflicts heavily with `bootstrap/src/compiler.rs`, seals, and `docs/NOW.md`. |
| 21 | +- **Implication:** Variant C1 (master-merge to clear #1245) is high-risk and would destabilize the FPGA/formal work. It should only be attempted in a dedicated wave when the boot-evidence line is not the primary focus. |
| 22 | + |
| 23 | +### Formal gap left by W432 |
| 24 | +- W432 added per-process-corner raw-ns OSCFSEL theorems at the **worst-case** envelope corner (temp = +85 °C, vccint = 900 mV). |
| 25 | +- A live `tri fpga read-xadc` measurement will almost always be **inside** the envelope but not exactly at the worst-case corner. |
| 26 | +- The W431 bridge (`xadc_envelope_implies_raw_ns_satisfies_any_in_envelope`) shows that any raw-ns capture safe at the worst-case corner is also safe at any in-envelope point. |
| 27 | +- **Gap:** there is no single theorem that says "for any OSCFSEL and any in-envelope live XADC point, the nominal raw-ns period is safe under the measured PVT context." Closing this gap makes the W432 corner theorem directly usable with real XADC data. |
| 28 | + |
| 29 | +### Tooling/reporting gap |
| 30 | +- `tri fpga sweep-report --json` exists but does not surface per-variant PVT context or process-corner metadata. |
| 31 | +- `docs/reports/T27_VS_FORMAL_HDL_2026.md` needs a late-July 2026 refresh (firtool 1.152.0 published July 4, Sparkle IP.Net PR #66 still open, Clash 1.11 candidate). |
| 32 | +- `docs/reports/GEN_VERILOG_DEFECTS_REPRO.md` needs a W433 triage entry. |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## 2. Competitor research (summary) |
| 37 | + |
| 38 | +- **Sparkle / Verilean:** PR #66 ("IP.Net") remains the headline signal — USB web server + memcached + compiler perf, +27k lines. Last public push 2026-07-03. No new public PRs after that. The RV32 divider proof (commit `9c7809c`, June 25) remains the deepest formal IP-level proof t27 has not yet matched. |
| 39 | +- **Clash 1.11.0:** still a Hackage candidate as of late July 2026; no promoted release. Latest official release remains 1.10.0 (April 2026). |
| 40 | +- **CIRCT / firtool:** `firtool-1.152.0` was published 2026-07-04; it is a maintenance release (ImportVerilog/Moore, Arc dialect, FIRRTL inliner). The major formal-verification expansion was `firtool-1.143.0` (March 2026). PR #10387 (`ifdef SYNTHESIS` guards for SV lowering) was merged in May and later reconsidered. |
| 41 | +- **Aria-HDL / fpga-meta-compiler-public:** Rust-based meta-compiler with `--emit-lean4` proof extraction and `--emit-sby` backend. Recent 2026 updates around Leiserson-Saxe retiming, constraint annotations, and PCIe BAR testing. |
| 42 | +- **CktFormalizer:** arXiv 2605.07782 (autoformalization into dependently-typed Lean 4 HDL) — no new public July signal, but reinforces the "Lean 4 as hardware proof backend" trend. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 3. Selected primary variant |
| 47 | + |
| 48 | +**Variant C3 — formal bridge fallback** |
| 49 | + |
| 50 | +Land a board-less formal lemma that connects a live `XadcOperatingPoint` to the |
| 51 | +W432 per-process-corner raw-ns OSCFSEL theorem. This closes the remaining gap in |
| 52 | +the boot-to-proof pipeline without touching the compiler or requiring physical |
| 53 | +hardware. |
| 54 | + |
| 55 | +### Acceptance criteria |
| 56 | +- New theorem `xadc_envelope_justifies_cclk_variant_raw_ns_pvt` in |
| 57 | + `proofs/lean4/Trinity/TernaryFPGABoot.lean` passes `lake build`. |
| 58 | +- New transaction variant `xadc_envelope_justifies_cclk_variant_transaction_ok`. |
| 59 | +- `cargo test --bin tri fpga::` passes. |
| 60 | +- `./scripts/tri test` passes with the documented 7-failure baseline. |
| 61 | +- `docs/reports/T27_VS_FORMAL_HDL_2026.md` and |
| 62 | + `docs/reports/GEN_VERILOG_DEFECTS_REPRO.md` are refreshed. |
| 63 | +- W433 report, evidence note, and W434 cooperation variants are written. |
| 64 | +- GitHub issue and branch for W434 are created. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## 4. Decomposed tasks |
| 69 | + |
| 70 | +1. **Formal lemma** |
| 71 | + - Add `xadc_envelope_justifies_cclk_variant_raw_ns_pvt`. |
| 72 | + - Add `xadc_envelope_justifies_cclk_variant_transaction_ok`. |
| 73 | + - Build `Trinity.TernaryFPGABoot`. |
| 74 | + |
| 75 | +2. **Rust validation** |
| 76 | + - Run `cargo test --bin tri fpga::`. |
| 77 | + |
| 78 | +3. **Full CI sweep** |
| 79 | + - Run `./scripts/tri test` and record baseline. |
| 80 | + |
| 81 | +4. **Documentation refresh** |
| 82 | + - Refresh `docs/reports/T27_VS_FORMAL_HDL_2026.md`. |
| 83 | + - Add W433 triage to `docs/reports/GEN_VERILOG_DEFECTS_REPRO.md`. |
| 84 | + |
| 85 | +5. **Close-out artifacts** |
| 86 | + - Write `docs/reports/WAVE_LOOP_433_REPORT.md`. |
| 87 | + - Write `docs/reports/FPGA_LOOP_EVIDENCE_W433_2026-07-01.md`. |
| 88 | + - Write `docs/reports/FPGA_LOOP_COOPERATION_W434_2026-07-01.md`. |
| 89 | + |
| 90 | +6. **Next-wave setup** |
| 91 | + - Create GitHub issue #? for W434. |
| 92 | + - Create and push branch `wave-loop-434`. |
| 93 | + - Update `.trinity/current-issue.md` and `docs/NOW.md`. |
| 94 | + - Append W433 learnings to `.trinity/experience.md`. |
| 95 | + - Save persistent memory entry. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## 5. Fallback if formal lemma is blocked |
| 100 | + |
| 101 | +If the Lean composition proves unexpectedly difficult, redirect to one of: |
| 102 | + |
| 103 | +- **C2-bis:** harden `tri fpga sweep-report --json` with per-variant `process_corner` / `pvt_context` fields (when boot-log JSON contains XADC data). |
| 104 | +- **C4:** deeper competitor refresh only, with a clear note that no code changed. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +*φ² + φ⁻² = 3 | TRINITY* |
0 commit comments