|
| 1 | +## 2026-07-24 — Wave Loop 770 (module-scope `[359][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 359. |
| 5 | + The `[359][2]^6 Pt` witness is 735,232 bits (~0.701 MiBit), still well under the 4-MiBit |
| 6 | + cliff, and required no compiler changes. |
| 7 | +- A module-level `pub var dst : [359][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 359, 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 = 359`, `MID_IDX = 179`; the frame-condition element is |
| 14 | + `[179][1][0][0][0][0][0]`, element number `179*64 + 32 = 11,488`. |
| 15 | +- Updated weak-point audit: 44 of 53 30-day commits include `Closes #N` (≈83%). |
| 16 | + Clean non-worktree scan: 57 of 873 `.t27` specs lack `test`/`invariant`/`bench` |
| 17 | + (≈6.5%). 19 `scripts/*.sh` remain under `scripts/`. |
| 18 | +- Fresh 2025-2026 literature scan surfaced ternary FPGA LLM accelerators (TeLLMe, |
| 19 | + TerEffic), ternary HDL/ISA work (Ternary VHDL, Setnex, REBEL-6, xTern, T-SAR), |
| 20 | + and memristor/FeFET ternary logic-in-memory arrays. |
| 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/w770_bench_module_359x2p6_aos_var_call_write.t27` (~1,572 KB / |
| 27 | + ~68,271 lines) with seal and Icarus baseline. |
| 28 | +- Added integration test `accepts_w770_bench_module_359x2p6_aos_var_call_write`. |
| 29 | +- Added generator script `scripts/gen_w770.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`: 230 passed; 0 failed. |
| 36 | +- Direct `t27c parse` W770: PASS. |
| 37 | +- Direct `t27c icarus-lowerable` W770: PASS (`lowerable`). |
| 38 | +- Direct `t27c icarus-simulate` W770: PASS (17 cycles, PASSED). |
| 39 | +- Direct `t27c icarus-cocotb` W770: 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 | + 735,232-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 | + - TeLLMe — energy-efficient ternary LLM accelerator on edge FPGAs with |
| 55 | + table-lookup MatMul and fused attention (arXiv 2025). |
| 56 | + - TerEffic — highly efficient ternary LLM inference on FPGA with 1.6-bit |
| 57 | + compression and LUT-based TMat Core (arXiv 2025). |
| 58 | + - Ternary VHDL — IEEE 1076-2008 extension for balanced ternary mixed-radix |
| 59 | + VLSI design and GHDL simulation (IEEE ISMVL 2026). |
| 60 | + - Setnex ISA v0.8 — clean-slate balanced-ternary ISA with 27-trit words and |
| 61 | + configurable three-valued logics (2026). |
| 62 | + - REBEL-6 — 32-trit balanced ternary ISA binary-compatible with RV32I |
| 63 | + (IEEE ISMVL 2025). |
| 64 | + - xTern — RISC-V ISA extension with packed-SIMD ternary MAC for edge NN |
| 65 | + inference (arXiv 2024). |
| 66 | + - T-SAR — CPU-only ternary LLM inference via in-place SIMD ALU |
| 67 | + reorganization, extensible to RISC-V Vector (arXiv 2025). |
| 68 | + - Memristor-based balanced ternary logic gates, decoders, full adders, and |
| 69 | + Łukasiewicz logic using tri-valued resistance states (EPJP 2026, Phil. |
| 70 | + Trans. R. Soc. A 2025, IJCTA 2026). |
| 71 | + - FeFET-based non-volatile comparator with built-in less-than operation |
| 72 | + (IEICE ELEX 2025). |
| 73 | + - OpenXC7 / nextpnr-xilinx / Project X-Ray — fully open-source Xilinx |
| 74 | + 7-series toolchain, used for QMTech XC7A100T ternary projects without Vivado. |
| 75 | + |
| 76 | +--- |
| 77 | + |
1 | 78 | ## 2026-07-23 — Wave Loop 769 (module-scope `[357][2]^6 Pt` non-power-of-two outer-dimension AoS variable) |
2 | 79 |
|
3 | 80 | ### What worked |
|
0 commit comments