Skip to content

feat(gen-verilog): resolve const-name array dimensions before codegen - #2402

Merged
gHashTag merged 1 commit into
masterfrom
fix/mac-aos
Aug 22, 2026
Merged

feat(gen-verilog): resolve const-name array dimensions before codegen#2402
gHashTag merged 1 commit into
masterfrom
fix/mac-aos

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #2275. One pass unblocks the whole packed-array machinery for symbolic dims; mac.v elaborates with zero iverilog errors for the first time — the vvp lane's (#2241) blocker module is open. 32/32 yosys smoke; blast radius 13 specs measured before landing.

🤖 Generated with Claude Code

The second half of #2275 was one gate: dimensions spelled as const names
([NUM_MAC_UNITS]MACUnit) never parsed, parse_array_type wants digits, so
the AoS declaration emitted a 32-bit reg plus a TODO and every element
field access flattened to an unbound identifier. resolve_symbolic_dims
substitutes integer-literal module consts into every type and dimension
string once, before codegen: mac_units becomes reg [1343:0] with
per-element part-select initializers and iverilog elaborates mac.v with
ZERO errors for the first time. The folded zero initializer is exact for
this literal (all fields zero). Blast radius measured first: 13 specs
corpus-wide, 2 under specs/fpga; the 32-module yosys smoke stays 32/32.
M5 performed.

Closes #2275.
@gHashTag
gHashTag enabled auto-merge (squash) August 22, 2026 10:56
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-22 10:57:32 UTC

Summary

Status Count
Total Open PRs 4
PRs with Failing Checks 3
PRs with All Checks Green 1
READY 1
FAILING 3
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=ee73b41dba8f != 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 1ddb288 into master Aug 22, 2026
26 of 29 checks passed
gHashTag added a commit that referenced this pull request Aug 22, 2026
The Rust backend resolved .len() for ages; Verilog emitted the method
call verbatim and iverilog rejected it -- arrays have no methods. One
fold covers the three parse shapes the same source text produces
(method-kind, call-over-field-access, qualified name); the receiver's
length comes from the type registries through parse_array_type, with
symbolic dims already resolved by the #2402 pass. mac self-test drops
13 -> 12 elaboration errors; class (2) of #2413 is dead. 32/32 yosys
smoke unchanged. M5 performed.

Refs #2413.
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.

gen-verilog: mac.v does not elaborate — imported-enum members never declared, struct-param field flattened to an unbound name

1 participant