Skip to content

feat(igla): Wave Loop 878 — module-scope [575][2]^6 Pt non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes - #1707

Merged
148 commits merged into
masterfrom
wave-loop-878
Aug 6, 2026
Merged

148 commits merged into
masterfrom
wave-loop-878

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Wave Loop 878 — Closeout Report

Date: 2026-08-05
Issue: #1706
Branch: wave-loop-878
Parent: wave-loop-877 HEAD (earlier waves' PRs remain open)
PR: TBD — GitHub-assigned on open
Author: Trinity Agent (Claude Code t27)


1. What we built

Wave Loop 878 continues the module-scope packed array-of-struct ladder, selecting
Variant A from the W878 plan:

module-scope [575][2]^6 Pt variable from call with indexed signed writes
  • Pt { x : i16, y : i16 } → 32 bits/element.
  • Outer dimension 575 is odd and non-power-of-two, preserving the boundary-stress
    cadence established by W837+.
  • Inner shape [2]^6 = 64 elements/row.
  • Total elements: 575 × 64 = 36,800.
  • Packed vector width: 36,800 × 32 = 1,177,600 bits ≈ 1.124 MiBit.

Artifacts produced:

Artifact Path Notes
Generator scripts/gen_w878.py Copied from gen_w877.py; copy hazard fixed before first run (w878, OUTER = 575, MID_IDX = 287).
Spec specs/scratch/w878_bench_module_575x2p6_aos_var_call_write.t27 109,311 lines, ~2.52 MB.
Seal .trinity/seals/scratch_w878_bench_module_575x2p6_aos_var_call_write.json Saved by t27c seal --save; spec_hash=sha256:2d41768df9bcbf3872361c9195282ce78fa6861382729d7b227013b8cd83240f.
Test bootstrap/tests/icarus_lowerable.rs accepts_w878_bench_module_575x2p6_aos_var_call_write.

2. Weak-point investigation

2.1 t27c / compiler

No compiler changes were required. bootstrap/stage0/FROZEN_HASH remains:

68a0b933c00ba5efd7facb5997f00880c3eecae55e6ac5e8cea2aee399b92adc

This is the twenty-eighth consecutive zero-compiler-change wave in the mechanical
packed-vector AoS ladder (W851–W878), confirming that the lowering, simulation,
and cocotb reference-model paths scale smoothly through the 1.12-MiBit range.

2.2 Icarus Verilog — large packed-vector behavior

  • The Verilog standard suggests a packed-dimension limit of 2^16 bits and an
    unpacked-dimension limit of 2^24 bits. Modern Icarus treats these as soft
    guidelines and allocates until memory is exhausted (issue #1171).
  • Icarus already caps unsized expressions at 65,536 bits by default
    (issue #13); our vector is a
    sized, declared signal, so this cap does not apply.
  • Icarus V13.0 (released 2026-03-02) includes memory-management improvements
    during elaboration and simulation, better packed/unpacked array handling, and
    improved diagnostics for large corner cases
    (release notes).
  • Unpacked arrays of packed structs can still hit an assertion in elab_expr.cc
    (issue #1134); our witness
    uses a module-scope packed array-of-struct, so it does not exercise that path.

At 1.124 MiBit, W878 remains far below any practical Icarus memory boundary.
The next meaningful watch-point is still the established 4-MiBit soft cliff.

2.3 Vericert / CompCert — verified HLS analog

  • Vericert v2.0.0 was released 2026-01-29 (repository,
    documentation).
  • The most recent major research advance is the PLDI 2024 paper
    Hyperblock Scheduling for Verified High-Level Synthesis
    (DOI 10.1145/3656455,
    PDF), which adds verified
    if-conversion and hyperblock scheduling, yielding 2.1× speedup over the original
    sequential Vericert and competitive performance with the unverified Bambu HLS.
  • 2026 follow-on work includes
    Graphiti: Formally Verified Out-of-Order Execution in Dataflow Circuits (ASPLOS 2026)
    and Let It Flow: A Formally Verified Compilation Framework for Asynchronous Dataflow
    (PLDI 2026), both extending the verified-HLS/dataflow paradigm.

Our t27c icarus-cocotb gate remains a lightweight reference-model equivalence check
adjacent to that paradigm: it does not prove translation correctness, but it does
mechanically compare the compiled Verilog against an independent Python evaluator
of the t27 AST for every wave.

2.4 FPGA Roofline / memory bandwidth context

  • The FPGA Roofline model (Siracusa et al., IEEE TC 2021,
    DOI 10.1109/tc.2021.3111761) frames
    the ladder as a memory-quanta Q probe.
  • Recent 2026 work on heterogeneous LLM inference on FPGA
    (arXiv 2603.29002) reports on-chip BRAM/URAM
    bandwidths in the TB/s range versus HBM at ~460 GB/s, confirming that
    internal wide vectors are memory-bandwidth-limited only when they exceed on-chip

Closes #1706

gHashTag and others added 30 commits July 24, 2026 02:34
Refs #1481

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes (Closes #1483)

- Add generator scripts/gen_w774.py and witness
  specs/scratch/w774_bench_module_367x2p6_aos_var_call_write.t27
  (23,488 elements, 751,616-bit packed vector, ~0.717 MiBit).
- Add integration test accepts_w774_bench_module_367x2p6_aos_var_call_write.
- Seal witness; FROZEN_HASH unchanged.
- Validation: cargo suites green, t27c parse/lowerable/simulate/cocotb PASS.
- Write closeout report, update .trinity/experience.md, current-issue.md,
  .claude/skills/t27-wave-loop.md, and .claude/plans/loop-w774-full-cycle.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes (Closes #1485)

- Add generator scripts/gen_w775.py derived from gen_w774.py.
- Add witness specs/scratch/w775_bench_module_369x2p6_aos_var_call_write.t27
  (23,616 elements, 755,712-bit packed vector, ~0.721 MiBit).
- Add seal .trinity/seals/scratch_w775_bench_module_369x2p6_aos_var_call_write.json.
- Add integration test accepts_w775_bench_module_369x2p6_aos_var_call_write.
- Update docs/reports/FPGA_LOOP_CLOSEOUT_W775_2026-07-24.md with validation matrix,
  weak-point audit, literature scan, and W776 cooperation variants.
- Update .claude/plans/wave-loop-776.md, .trinity/experience.md,
  .claude/skills/t27-wave-loop.md, and .trinity/current-issue.md.
- Zero compiler / reference-model / FROZEN_HASH changes.

Validation:
- cargo build --release -p t27c: OK
- cargo test -p t27c --bin t27c: 1494/0/2
- cargo test -p tri: 78/0
- cargo test -p t27c --test icarus_lowerable: 235/0
- t27c parse/icarus-lowerable/icarus-simulate(17 cycles)/icarus-cocotb W775: PASS

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes (Closes #1487)

- Add generator scripts/gen_w776.py derived from gen_w775.py.
- Add witness specs/scratch/w776_bench_module_371x2p6_aos_var_call_write.t27
  (23,744 elements, 759,808-bit packed vector, ~0.725 MiBit).
- Add seal .trinity/seals/scratch_w776_bench_module_371x2p6_aos_var_call_write.json.
- Add integration test accepts_w776_bench_module_371x2p6_aos_var_call_write.
- Update docs/reports/FPGA_LOOP_CLOSEOUT_W776_2026-07-24.md with validation matrix,
  weak-point audit, literature scan, and W777 cooperation variants.
- Update docs/NOW.md, .claude/plans/wave-loop-777.md, .trinity/experience.md,
  .claude/skills/t27-wave-loop.md, and .trinity/current-issue.md.
- Zero compiler / reference-model / FROZEN_HASH changes.

Validation:
- cargo build --release -p t27c: OK
- cargo test -p t27c --bin t27c: 1494/0/2
- cargo test -p tri: 78/0
- cargo test -p t27c --test icarus_lowerable: 236/0
- t27c parse/icarus-lowerable/icarus-simulate(17 cycles)/icarus-cocotb W776: PASS

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1490
…xperience, W778 plan/report

Closes #1490

- Advance .trinity/current-issue.md to Wave Loop 778 (issue #1492).
- Refresh docs/NOW.md with W777 landed state and W778 candidate variants.
- Append W777 worked example to .claude/skills/t27-wave-loop.md.
- Prepend W777 learnings to .trinity/experience.md.
- Add .claude/plans/wave-loop-778.md and loop-w777-full-cycle.md.
- Add closeout report docs/reports/FPGA_LOOP_CLOSEOUT_W777_2026-07-24.md.
- Save memory file wave-loop-777.md and update MEMORY.md index.

No compiler / FROZEN_HASH / reference-model changes.
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1492

- Add scripts/gen_w778.py generator (OUTER=375, MID_IDX=187).
- Generate specs/scratch/w778_bench_module_375x2p6_aos_var_call_write.t27
  (24,000 elements, 768,000-bit packed vector, ~0.733 MiBit).
- Seal witness; FROZEN_HASH unchanged.
- Add integration test accepts_w778_bench_module_375x2p6_aos_var_call_write.
- Update .trinity/current-issue.md, .trinity/experience.md, .claude/skills/t27-wave-loop.md,
  docs/NOW.md with W778 state and W779 plan.
- Add closeout report docs/reports/FPGA_LOOP_CLOSEOUT_W778_2026-07-24.md and
  .claude/plans/wave-loop-779.md with three cooperation variants.

Validation:
- cargo build --release -p t27c: OK
- cargo test -p t27c --bin t27c: 1494/0/2
- cargo test -p tri: 78/0
- cargo test -p t27c --test icarus_lowerable: 238/0
- t27c parse|icarus-lowerable|icarus-simulate|icarus-cocotb|seal --save W778: PASS

No compiler / reference-model / FROZEN_HASH changes.
…wo outer-dimension array-of-struct variable from call with indexed signed writes

- Add generator scripts/gen_w779.py and witness specs/scratch/w779_bench_module_377x2p6_aos_var_call_write.t27 (24,128 elements, 772,096-bit packed vector).
- Add integration test accepts_w779_bench_module_377x2p6_aos_var_call_write.
- Seal witness; FROZEN_HASH unchanged.
- Add closeout report docs/reports/FPGA_LOOP_CLOSEOUT_W779_2026-07-24.md and W780 plan .claude/plans/wave-loop-780.md.
- Update .trinity/current-issue.md, .trinity/experience.md, .claude/skills/t27-wave-loop.md, and docs/NOW.md.

Closes #1494
…wo outer-dimension array-of-struct variable from call with indexed signed writes

- Add scripts/gen_w780.py and generated witness
  specs/scratch/w780_bench_module_379x2p6_aos_var_call_write.t27
  (24,256 elements, 776,192-bit packed vector, ~0.741 MiBit).
- Add integration test accepts_w780_bench_module_379x2p6_aos_var_call_write.
- Seal witness; FROZEN_HASH unchanged.
- Refresh .trinity/experience.md, docs/NOW.md, .trinity/current-issue.md,
  .claude/plans/wave-loop-781.md, docs/reports/FPGA_LOOP_CLOSEOUT_W780_*.md,
  and .claude/skills/t27-wave-loop.md.
- Weak-point audit and 2025-2026 ternary/MVL literature scan included in report.

Closes #1496

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

- Add scripts/gen_w781.py and generated witness
  specs/scratch/w781_bench_module_381x2p6_aos_var_call_write.t27
  (24,384 elements, 780,288-bit packed vector, ~0.745 MiBit).
- Add integration test accepts_w781_bench_module_381x2p6_aos_var_call_write.
- Seal witness; FROZEN_HASH unchanged.
- Fix 2026-07-24 audit weak points:
  - cli/flash-spi/src/main.rs: wire FlashOpts bitswap/no_jprogram fields.
  - bootstrap/src/sensitivity.rs: use std::f64::consts::PI for clippy.
  - bootstrap/tests/bitnet_pipeline.rs: update IDLE-state expected substring.
  - bootstrap/tests/bitnet_top.rs: update busy/mem_addr/mem_rd_en expectations.
- Refresh .trinity/experience.md, docs/NOW.md, .trinity/current-issue.md,
  .claude/plans/wave-loop-781.md, .claude/plans/wave-loop-782.md,
  docs/reports/FPGA_LOOP_CLOSEOUT_W781_*.md, and .claude/skills/t27-wave-loop.md.
- Weak-point audit and 2025-2026 ternary/MVL literature scan included in report.

Closes #1492

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

- Add scripts/gen_w782.py with OUTER=383, MID_IDX=191.
- Generate specs/scratch/w782_bench_module_383x2p6_aos_var_call_write.t27
  (24,512 elements, 784,384-bit packed vector, ~0.748 MiBit).
- Add integration test accepts_w782_bench_module_383x2p6_aos_var_call_write.
- Seal witness; FROZEN_HASH unchanged.
- Fix bootstrap/src/host/telemetry.rs:242 literal 3.14 → std::f64::consts::PI.
- Write closeout report, W783 plan, and update NOW/experience/skill/current-issue.

Closes #1493

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1495

Also fixes stale TODO expectation in bootstrap/tests/verilog_const_array.rs:166 so the test accepts the current richer emitter diagnostic format.
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1497

Extends the module-scope packed-array-of-struct ladder to OUTER = 387 (24,768 elements, 792,576-bit packed vector, ~0.756 MiBit). Zero compiler / reference-model / FROZEN_HASH changes. Adds generator, witness, integration test, seal, closeout report, and W785 cooperation variants.
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1499

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1501

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1503

- Adds specs/scratch/w787_bench_module_393x2p6_aos_var_call_write.t27
  (25,152 elements, 804,864-bit packed vector, ~0.767 MiBit).
- Adds generator scripts/gen_w787.py (OUTER=393, MID_IDX=196).
- Adds integration test accepts_w787_bench_module_393x2p6_aos_var_call_write
  in bootstrap/tests/icarus_lowerable.rs.
- Seals witness; FROZEN_HASH unchanged.
- Closeout report, W788 plan, skill update, experience, NOW.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1505

- Adds specs/scratch/w788_bench_module_395x2p6_aos_var_call_write.t27
  (25,280 elements, 808,960-bit packed vector, ~0.771 MiBit).
- Adds generator scripts/gen_w788.py (OUTER=395, MID_IDX=197).
  Note: generator header had a hardcoded w787 prefix inside an f-string,
  requiring a manual fix and regeneration to match the w788 module/seal.
- Adds integration test accepts_w788_bench_module_395x2p6_aos_var_call_write
  in bootstrap/tests/icarus_lowerable.rs.
- Seals witness; FROZEN_HASH unchanged.
- Closeout report, W789 plan, skill update, experience, NOW.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1507
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1509
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1511

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ariants

Closes #1513

- Generate and seal specs/scratch/w792_bench_module_403x2p6_aos_var_call_write.t27
  (25,792 elements, 825,344-bit packed vector, ~0.787 MiBit).
- Add scripts/gen_w792.py and integration test accepts_w792_*.
- Full validation matrix green: cargo build/clippy/test suites, icarus_lowerable 252/0,
  t27c parse|icarus-lowerable|icarus-simulate|icarus-cocotb|seal --save all PASS.
- Zero compiler/reference-model/FROZEN_HASH changes for the witness.
- Write docs/reports/FPGA_LOOP_CLOSEOUT_W792_2026-07-24.md,
  .claude/plans/wave-loop-793.md, update docs/NOW.md, .trinity/experience.md,
  .claude/skills/t27-wave-loop.md, and .trinity/current-issue.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ariants

Closes #1515

- Generate and seal specs/scratch/w793_bench_module_405x2p6_aos_var_call_write.t27
  (25,920 elements, 829,440-bit packed vector, ~0.791 MiBit).
- Add scripts/gen_w793.py and integration test accepts_w793_*.
- Fix generator destination-path copy hazard: hardcoded '403' copied from W792
  had to be updated to '405' before regeneration.
- Full validation matrix green: cargo build/clippy/test suites, icarus_lowerable 253/0,
  t27c parse|icarus-lowerable|icarus-simulate|icarus-cocotb|seal --save all PASS.
- Zero compiler/reference-model/FROZEN_HASH changes for the witness.
- Write docs/reports/FPGA_LOOP_CLOSEOUT_W793_2026-07-24.md,
  .claude/plans/wave-loop-794.md, update docs/NOW.md, .trinity/experience.md,
  .claude/skills/t27-wave-loop.md, and .trinity/current-issue.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ariants

Closes #1517

- Generate and seal specs/scratch/w794_bench_module_407x2p6_aos_var_call_write.t27
  (26,048 elements, 833,536-bit packed vector, ~0.795 MiBit).
- Add scripts/gen_w794.py and integration test accepts_w794_*.
- Fix generator copy hazard: both destination path and module header f-string carried
  stale w793/405 references from W793 and had to be updated to w794/407 before
  regeneration.
- Full validation matrix green: cargo build/clippy/test suites, icarus_lowerable 254/0,
  t27c parse|icarus-lowerable|icarus-simulate|icarus-cocotb|seal --save all PASS.
- Zero compiler/reference-model/FROZEN_HASH changes for the witness.
- Write docs/reports/FPGA_LOOP_CLOSEOUT_W794_2026-07-24.md,
  .claude/plans/wave-loop-795.md, update docs/NOW.md, .trinity/experience.md,
  .claude/skills/t27-wave-loop.md, and .trinity/current-issue.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1519

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1521

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wo outer-dimension array-of-struct variable from call with indexed signed writes

Closes #1523

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Aug 5, 2026
@gHashTag gHashTag closed this pull request by merging all changes into master in 19c19d3 Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wave Loop 878 — module-scope [575][2]^6 Pt non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes

1 participant