|
| 1 | +## 2026-07-23 — Wave Loop 769 (module-scope `[357][2]^6 Pt` non-power-of-two outer-dimension AoS variable) |
| 2 | + |
| 3 | +### What worked |
| 4 | +- Variant A extended the module-scope packed AoS odd outer-dimension ladder to 357. |
| 5 | + The `[357][2]^6 Pt` witness is 731,136 bits (~0.697 MiBit), still well under the 4-MiBit |
| 6 | + cliff, and required no compiler changes. |
| 7 | +- A module-level `pub var dst : [357][2]^6 Pt` can be initialized from a function |
| 8 | + call and exercised with indexed signed field writes, with zero compiler changes. |
| 9 | +- The cocotb/Python reference model correctly mirrored the row-major flattening |
| 10 | + with outer stride 357, confirming the layout is preserved end-to-end. |
| 11 | +- Reused the corrected W632 element-index formula for mid-row expected values: |
| 12 | + `[r][a5][a4][a3][a2][a1][a0]` is element `r*64 + a5*32 + a4*16 + a3*8 + a2*4 + a1*2 + a0`. |
| 13 | +- For `OUTER = 357`, `MID_IDX = 178`; the frame-condition element is |
| 14 | + `[178][1][0][0][0][0][0]`, element number `178*64 + 32 = 11,424`. |
| 15 | +- Updated weak-point audit: 43 of 52 30-day commits include `Closes #N` (≈83%). |
| 16 | + Clean non-worktree scan: 53 of 896 `.t27` specs lack `test`/`invariant`/`bench` |
| 17 | + (≈5.9%). 19 `scripts/*.sh` remain under `scripts/`. |
| 18 | +- Fresh 2025-2026 literature scan surfaced photonic ternary logic, ternary RISC-V |
| 19 | + extensions, in-memory ternary MAC arrays, ternary approximate computing, and |
| 20 | + superconducting ternary arithmetic units. |
| 21 | + |
| 22 | +### What changed behavior |
| 23 | +- No changes to `bootstrap/src/compiler.rs`. |
| 24 | +- No changes to `bootstrap/stage0/FROZEN_HASH`. |
| 25 | +- No changes to `scripts/cocotb_ref_model.py`. |
| 26 | +- Added `specs/scratch/w769_bench_module_357x2p6_aos_var_call_write.t27` (~1,563 KB / |
| 27 | + ~67,891 lines) with seal and Icarus baseline. |
| 28 | +- Added integration test `accepts_w769_bench_module_357x2p6_aos_var_call_write`. |
| 29 | +- Added generator script `scripts/gen_w769.py`. |
| 30 | + |
| 31 | +### Validation |
| 32 | +- `cargo build --release -p t27c`: OK. |
| 33 | +- `cargo test -p t27c --bin t27c`: 1494 passed; 0 failed; 2 ignored. |
| 34 | +- `cargo test -p tri`: 78 passed; 0 failed. |
| 35 | +- `cargo test -p t27c --test icarus_lowerable`: 229 passed; 0 failed. |
| 36 | +- Direct `t27c parse` W769: PASS. |
| 37 | +- Direct `t27c icarus-lowerable` W769: PASS (`lowerable`). |
| 38 | +- Direct `t27c icarus-simulate` W769: PASS (17 cycles, PASSED). |
| 39 | +- Direct `t27c icarus-cocotb` W769: PASS (`reference-model OK`). |
| 40 | + |
| 41 | +### Scientific / engineering background |
| 42 | +- IEEE 1800-2017 7.4.1/7.4.3 define packed-array total width as the product of |
| 43 | + packed dimensions, with no power-of-two restriction. Variant A emits a single |
| 44 | + 731,136-bit packed vector, which is legal SystemVerilog. |
| 45 | +- Lutsig verified array lowering and CIRCT `HWLegalizeModules` show that |
| 46 | + flattening nested arrays to wide packed vectors is a well-founded compiler |
| 47 | + discipline, even when outer dimensions are non-power-of-two. |
| 48 | +- Icarus issue #1134 documents assertion failures for unpacked arrays of packed |
| 49 | + structs; t27 scalar flattening avoids that construct entirely. |
| 50 | +- Yosys issue #2677 / #4653 confirm that arrays of packed structs remain |
| 51 | + unsupported in the native frontend; t27 packed-vector lowering avoids the |
| 52 | + gap. |
| 53 | +- 2025-2026 ternary/MVL literature scan found: |
| 54 | + - Photonic ternary logic gates using Mach-Zehnder interferometers for |
| 55 | + high-speed multi-value data processing (IEEE PTCL 2026). |
| 56 | + - Ternary RISC-V ISA extension proposals for 1.58-bit LLM inference |
| 57 | + acceleration (arXiv 2026). |
| 58 | + - In-memory ternary multiply-accumulate arrays based on FeFET and RRAM |
| 59 | + crossbars (IEEE TED 2026). |
| 60 | + - Ternary approximate computing with quality-configurable stochastic |
| 61 | + computing kernels (IEEE TC 2026). |
| 62 | + - Superconducting ternary full adder and multiplier units in RSFQ/ERSFQ |
| 63 | + logic families (IEEE Trans. Appl. Supercond. 2025). |
| 64 | + - OpenXC7 / nextpnr-xilinx / Project X-Ray — fully open-source Xilinx |
| 65 | + 7-series toolchain, used for QMTech XC7A100T ternary projects without Vivado. |
| 66 | + |
| 67 | +--- |
| 68 | + |
1 | 69 | ## 2026-07-23 — Wave Loop 765 (module-scope `[349][2]^6 Pt` non-power-of-two outer-dimension AoS variable) |
2 | 70 |
|
3 | 71 | ### What worked |
|
0 commit comments