|
1 | | -# Wave Loop 417 — hygiene, reland W415/W416, and next-variant gate |
| 1 | +# Wave Loop 418 — FPGA physical capture, real relay gate, or further formal tooling |
2 | 2 |
|
3 | | -**Issue:** #1350 |
4 | | -**Branch:** `wave-loop-417` |
5 | | -**Milestone:** Close out the W415/W416 reland mess and set up the next FPGA boot-evidence wave. |
| 3 | +**Issue:** #1353 |
| 4 | +**Branch:** `wave-loop-418` |
| 5 | +**Milestone:** Continue the FPGA boot-evidence line from W417. |
6 | 6 |
|
7 | 7 | --- |
8 | 8 |
|
9 | 9 | ## Goal |
10 | 10 |
|
11 | | -Wave 415 and Wave 416 were stuck on a dirty PR (#1346) and a branch that had |
12 | | -fallen behind `master`. Wave 417 lands the hygiene work: close/replace stale |
13 | | -PRs, fix the branch target to `master` (Strategy P), repair the CI blocker |
14 | | -introduced by the Russian cross-walk file, and produce the W417 report plus |
15 | | -W418 cooperation variants. |
| 11 | +Wave 417 closed the W415/W416 hygiene loop. Wave 418 re-evaluates the bench |
| 12 | +state and executes the first available variant. |
| 13 | + |
| 14 | +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 | + - Import the captures with `tri fpga measured-to-lean --csv/--vcd --raw-ns |
| 18 | + --standalone --validate --pvt-context <ctx.json>` and commit the generated |
| 19 | + Lean theorems. |
| 20 | + - Document the measured frequencies/duty cycles and PVT context in |
| 21 | + `fpga/HARDWARE_SSOT.md`. |
| 22 | + |
| 23 | +2. **Variant B (if relay hardware is available):** |
| 24 | + - Implement a real `--relay-port` backend for `tri fpga cold-por` |
| 25 | + (e.g. serial or TCP relay controlling board power). |
| 26 | + - Perform an automated cold-POR power-cycle and capture STAT without |
| 27 | + operator intervention. |
| 28 | + - Document relay wiring in `fpga/HARDWARE_SSOT.md`. |
| 29 | + |
| 30 | +3. **Variant C (fallback if bench still blocked):** |
| 31 | + - Add a regression test that the PVT envelope stays ≥ the nominal bound |
| 32 | + across the full operating rectangle. |
| 33 | + - Extend instrument import for VCD `$date`/`$version`/`$comment` headers and |
| 34 | + analog CSV voltage columns. |
| 35 | + - Build a standalone Lean proof integration test from a synthetic CSV. |
| 36 | + - Document the first-real-capture checklist in `fpga/HARDWARE_SSOT.md`. |
16 | 37 |
|
17 | 38 | --- |
18 | 39 |
|
19 | 40 | ## Decomposed plan |
20 | 41 |
|
| 42 | +See `docs/reports/FPGA_LOOP_COOPERATION_W418_2026-07-04.md`. |
| 43 | + |
21 | 44 | | Step | File(s) | Deliverable | |
22 | 45 | |------|---------|-------------| |
23 | | -| 1 | GitHub PRs/issues | Close superseded #1351; confirm stale wave-loop PRs/issues are closed | |
24 | | -| 2 | `docs/BRANCHING_MODEL.md` | Document Strategy P: wave-loop PR target is `master` | |
25 | | -| 3 | `docs/.legacy-non-english-docs` | Allowlist `conformance/vectors/CROSSWALK_sw_hw.md` until translated | |
26 | | -| 4 | `docs/NOW.md` | Update W417 section to in-progress / close-out state | |
27 | | -| 5 | `docs/reports/*` | `WAVE_LOOP_417_REPORT.md`, `FPGA_LOOP_EVIDENCE_W417_2026-07-04.md`, `FPGA_LOOP_COOPERATION_W418_2026-07-04.md` | |
28 | | -| 6 | `.trinity/experience.md` | Capture W417 learnings | |
29 | | -| 7 | git/PR | Open PR from `wave-loop-417` to `master`, close #1350, create #1353 for W418 | |
| 46 | +| 1 | `cli/tri/src/fpga.rs` | Variant A import, B relay backend, or C regression/integration tests | |
| 47 | +| 2 | `proofs/lean4/Trinity/TernaryFPGABoot.lean` | PVT envelope regression lemma or new measured theorems | |
| 48 | +| 3 | `fpga/HARDWARE_SSOT.md` | Updated capture / relay / integration protocol | |
| 49 | +| 4 | `docs/reports/*` | W418 report, evidence, W419 cooperation | |
| 50 | +| 5 | `.trinity/experience.md` | W418 learnings | |
| 51 | +| 6 | git/PR | squash-merge to `master`, close #1353, open #? for W419 | |
30 | 52 |
|
31 | 53 | --- |
32 | 54 |
|
33 | 55 | ## Acceptance criteria |
34 | 56 |
|
35 | | -- [ ] AC-1: `docs/BRANCHING_MODEL.md` clearly states wave-loop PRs target `master`. |
36 | | -- [ ] AC-2: `cargo build --release` in `bootstrap/` no longer panics on the Russian cross-walk file. |
37 | | -- [ ] AC-3: `./scripts/tri test` parse/typecheck/gen/seal phases pass. |
38 | | -- [ ] AC-4: W417 report and W418 cooperation files exist and are linked from `docs/NOW.md`. |
39 | | -- [ ] AC-5: PR from `wave-loop-417` to `master` is opened with `Closes #1350`. |
| 57 | +### Bundle A |
| 58 | +- [ ] AC-A1: P12 is wired to a logic-analyzer channel and real CCLK capture files exist for `OSCFSEL=6` and `OSCFSEL=7`. |
| 59 | +- [ ] AC-A2: `tri fpga measured-to-lean --csv/--vcd --raw-ns --standalone` generated Lean files build with `lake build`. |
| 60 | +- [ ] AC-A3: Measured CCLK is within the N25Q128_3V spec, or any exceedance is explicitly explained. |
| 61 | + |
| 62 | +### Bundle B |
| 63 | +- [ ] AC-B1: `tri fpga cold-por <bit> --relay-port <real>` performs an automated power-cycle and captures STAT. |
| 64 | +- [ ] AC-B2: The resulting log has `relay_mock: false` and a real STAT raw value. |
| 65 | +- [ ] AC-B3: `fpga/HARDWARE_SSOT.md` documents relay wiring and port mapping. |
| 66 | + |
| 67 | +### Bundle C |
| 68 | +- [ ] AC-C1: A regression test verifies the PVT envelope lower bound across the operating rectangle. |
| 69 | +- [ ] AC-C2: Instrument import handles VCD `$date`/`$version`/`$comment` headers or analog CSV voltage columns. |
| 70 | +- [ ] AC-C3: A standalone `.lean` file generated from the CLI type-checks in a temporary `lake` package. |
| 71 | + |
| 72 | +### Invariant checks |
| 73 | +- [ ] `./scripts/tri test` parse/typecheck/gen/seal-verify phases pass. |
| 74 | +- [ ] `lake build Trinity.TernaryFPGABoot` passes. |
| 75 | +- [ ] `cargo test -p tri fpga::tests` passes. |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## Default variant |
| 80 | + |
| 81 | +Execute **Variant A** if the analyzer is wired. Otherwise try **Variant B** if a |
| 82 | +relay is available. Otherwise fall back to **Variant C**. |
40 | 83 |
|
41 | 84 | --- |
42 | 85 |
|
|
0 commit comments