fix(gen-verilog): rust-style [T; N] reaches the packed-array machinery - #1952
Merged
Conversation
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
enabled auto-merge (squash)
August 8, 2026 17:32
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1948
parse_array_typeonly understood the legacy[N]Tspelling — 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