Skip to content

fix(gen-verilog): rust-style [T; N] reaches the packed-array machinery - #1952

Merged
gHashTag merged 1 commit into
masterfrom
fix/verilog-array-params
Aug 8, 2026
Merged

fix(gen-verilog): rust-style [T; N] reaches the packed-array machinery#1952
gHashTag merged 1 commit into
masterfrom
fix/verilog-array-params

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Refs #1948

parse_array_type only understood the legacy [N]T spelling — every rust-style [u32; 4] fn param lowered as a single 32-bit input, arr[i] was a bit-select (one bit!), returns declared 32-bit for a 128-bit value. [T; N] now parses: packed widths, part-select indexing (#1745 path), literal packing; primitive-scalar [T; N] params are excluded from the W458 module-array binding (they are packed values).

tri-net: 60-spec icarus gate green, no regression; fn-side emission correct (input [127:0], array[(i*32) +: 32]). Remaining blockers are TB-side (commented-out test assignments; param-built array literals render as zeros) — next tail. Only unit red is pre-existing bitnet_layer. FROZEN_HASH resealed; NOW.md entries added.

🤖 Generated with Claude Code

Refs #1948

parse_array_type only understood the legacy [N]T spelling, so every
rust-style [u32; 4] function parameter lowered as a SINGLE 32-BIT input,
arr[i] was a bit-select reading one bit, and array returns were declared
32-bit for a 128-bit value. [T; N] now parses: packed widths,
part-select element indexing (the #1745 path) and literal packing all
light up, and primitive-scalar [T; N] params are excluded from the W458
module-array binding machinery (they are packed values, not module
arrays).

tri-net corpus: the 60-spec icarus gate is green with no regression;
function-side emission is now correct (input [127:0],
array[(i*32) +: 32]). Remaining blockers for the array-heavy specs are
TB-side (test-block assignments are commented out; fn-internal array
literals built from params render as zeros) -- the next tail.

FROZEN_HASH resealed; only unit red is the pre-existing bitnet_layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 17:32
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 17:32:32 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 1
PRs with All Checks Green 13
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=f46a0b1aa2b1 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 148898b into master Aug 8, 2026
21 of 22 checks passed
gHashTag added a commit that referenced this pull request Aug 8, 2026
…updated (#1958)

* fix(gen-verilog): W458 keeps the legacy [N]T binding; unit contracts updated

Refs #1948

Follow-up landing the two pieces auto-merge raced past in #1952/#1957:

- The W458 array-param exclusion narrows to rust-style [T; N] primitives
  only: the legacy [N]T spelling keeps its module-array ROM binding
  contract (array_param_read_emitted asserts it)
- nested_return_lowers_as_early_exit's discriminator includes the
  early-return guard assignment introduced by #1950

Unit suite back to a single pre-existing red (bitnet_layer iverilog).
FROZEN_HASH resealed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: NOW entries for the W458 follow-up

Refs #1948

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant