|
75 | 75 | - OpenXC7 / nextpnr-xilinx / Project X-Ray — fully open-source Xilinx |
76 | 76 | 7-series toolchain, used for QMTech XC7A100T ternary projects without Vivado. |
77 | 77 |
|
| 78 | +--- |
| 79 | + |
| 80 | +## 2026-07-23 — Wave Loop 766 (module-scope `[351][2]^6 Pt` non-power-of-two outer-dimension AoS variable) |
| 81 | + |
| 82 | +### What worked |
| 83 | +- Variant A extended the module-scope packed AoS odd outer-dimension ladder to 351. |
| 84 | + The `[351][2]^6 Pt` witness is 718,848 bits (~0.686 MiBit), still well under the 4-MiBit |
| 85 | + cliff, and required no compiler changes. |
| 86 | +- A module-level `pub var dst : [351][2]^6 Pt` can be initialized from a function |
| 87 | + call and exercised with indexed signed field writes, with zero compiler changes. |
| 88 | +- The cocotb/Python reference model correctly mirrored the row-major flattening |
| 89 | + with outer stride 351, confirming the layout is preserved end-to-end. |
| 90 | +- Reused the corrected W632 element-index formula for mid-row expected values: |
| 91 | + `[r][a5][a4][a3][a2][a1][a0]` is element `r*64 + a5*32 + a4*16 + a3*8 + a2*4 + a1*2 + a0`. |
| 92 | +- For `OUTER = 351`, `MID_IDX = 175`; the frame-condition element is |
| 93 | + `[175][1][0][0][0][0][0]`, element number `175*64 + 32 = 11,232`. |
| 94 | +- Updated weak-point audit: 40 of 49 30-day commits include `Closes #N` (≈82%). |
| 95 | + Clean non-worktree scan: 53 of 893 `.t27` specs lack `test`/`invariant`/`bench` |
| 96 | + (≈5.9%). 19 `scripts/*.sh` remain under `scripts/`. |
| 97 | +- Fresh 2025-2026 literature scan surfaced TeLLMe/TeLLMe v2, TerEffic, the |
| 98 | + ISPASS 2026 LUT-based ternary accelerator generator, 5500FP/GargantuRAM, |
| 99 | + Trinity v2.0.x, and recent CNTFET ternary full-adder work in IEEE TCAD/AEU. |
| 100 | + |
| 101 | +### What changed behavior |
| 102 | +- No changes to `bootstrap/src/compiler.rs`. |
| 103 | +- No changes to `bootstrap/stage0/FROZEN_HASH`. |
| 104 | +- No changes to `scripts/cocotb_ref_model.py`. |
| 105 | +- Added `specs/scratch/w766_bench_module_351x2p6_aos_var_call_write.t27` (~1,536 KB / |
| 106 | + ~66,751 lines) with seal and Icarus baseline. |
| 107 | +- Added integration test `accepts_w766_bench_module_351x2p6_aos_var_call_write`. |
| 108 | +- Added generator script `scripts/gen_w766.py`. |
| 109 | + |
| 110 | +### Validation |
| 111 | +- `cargo build --release -p t27c`: OK. |
| 112 | +- `cargo test -p t27c --bin t27c`: 1494 passed; 0 failed; 2 ignored. |
| 113 | +- `cargo test -p tri`: 78 passed; 0 failed. |
| 114 | +- `cargo test -p t27c --test icarus_lowerable`: 226 passed; 0 failed. |
| 115 | +- Direct `t27c parse` W766: PASS. |
| 116 | +- Direct `t27c icarus-lowerable` W766: PASS (`lowerable`). |
| 117 | +- Direct `t27c icarus-simulate` W766: PASS (17 cycles, PASSED). |
| 118 | +- Direct `t27c icarus-cocotb` W766: PASS (`reference-model OK`). |
| 119 | + |
| 120 | +### Scientific / engineering background |
| 121 | +- IEEE 1800-2017 7.4.1/7.4.3 define packed-array total width as the product of |
| 122 | + packed dimensions, with no power-of-two restriction. Variant A emits a single |
| 123 | + 718,848-bit packed vector, which is legal SystemVerilog. |
| 124 | +- Lutsig verified array lowering and CIRCT `HWLegalizeModules` show that |
| 125 | + flattening nested arrays to wide packed vectors is a well-founded compiler |
| 126 | + discipline, even when outer dimensions are non-power-of-two. |
| 127 | +- Icarus issue #1134 documents assertion failures for unpacked arrays of packed |
| 128 | + structs; t27 scalar flattening avoids that construct entirely. |
| 129 | +- Yosys issue #2677 / #4653 confirm that arrays of packed structs remain |
| 130 | + unsupported in the native frontend; t27 packed-vector lowering avoids the |
| 131 | + gap. |
| 132 | +- 2025-2026 ternary/MVL literature scan found: |
| 133 | + - TeLLMe v2 / TeLLMe — end-to-end ternary LLM accelerators on AMD KV260 using |
| 134 | + table-lookup matmul (25/143 tok/s decode/prefill under 5 W; arXiv 2025). |
| 135 | + - TerEffic — Alveo U280 ternary LLM accelerator, 16,300 tok/s at 455 tok/s/W |
| 136 | + for 370M model (arXiv 2025). |
| 137 | + - Hardware Generation and Exploration of LUT-Based Accelerators for 1.58-bit |
| 138 | + LLM Inference — open-source generator + cost model, TSMC 16 nm, accepted at |
| 139 | + IEEE ISPASS 2026 (arXiv 2026). |
| 140 | + - 5500FP / GargantuRAM — 24-trit balanced ternary RISC processor on Efinix |
| 141 | + Trion FPGA at 20 MHz, 120-instruction ISA, real ±3.3 V ternary I/O, |
| 142 | + CERN-OHL-P v2 board, commercially available (Zenodo/GitHub 2026). |
| 143 | + - Trinity B002 / Trinity v2.0.x — zero-DSP ternary-weight autoregressive LLM |
| 144 | + inference on Xilinx Artix-7 via OpenXC7, ~63 tok/s @ ~1 W, QMTech XC7A100T |
| 145 | + (Zenodo 2026). |
| 146 | + - Unbalanced ternary full adder in CNTFET — 42-transistor multi-threshold |
| 147 | + design with 35.8–75.2% power reduction (IEEE TCAD 2026). |
| 148 | + - CNTFET-based ternary full adder — 76/55 CNTFET complete/partial adders with |
| 149 | + ~24% delay improvement (IEEE TCAD 2025). |
| 150 | + - Energy-optimized ternary full adder using capacitive threshold logic and |
| 151 | + CNTFETs for DSP (AEU 2026). |
| 152 | + - OpenXC7 / nextpnr-xilinx / Project X-Ray — fully open-source Xilinx |
| 153 | + 7-series toolchain, used for QMTech XC7A100T ternary projects without Vivado. |
| 154 | + |
| 155 | +--- |
| 156 | + |
78 | 157 | ## 2026-07-23 — Wave Loop 764 (module-scope `[347][2]^6 Pt` non-power-of-two outer-dimension AoS variable) |
79 | 158 |
|
80 | 159 | ### What worked |
|
0 commit comments