Skip to content

[DSLX] Support aliased state types and channel arrays in impl-style procs. - #5146

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_998333556
Oct 27, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_998333556

Conversation

@copybara-service

Copy link
Copy Markdown

[DSLX] Support aliased state types and channel arrays in impl-style procs.

Converting legacy procs to impl-style syntax fails when a proc's state type is a type alias over a constant-sized array or when a proc declares channel arrays. Type unification against the built-in proc state wrapper evaluates array dimensions in the built-in stubs module rather than the user module, causing a span validation failure when the dimension references a user-defined constant. Additionally, constexpr evaluation and IR conversion of impl-style proc constructors assume scalar channel declarations and drop caller parametric bindings, causing crashes on channel arrays and parametric proc hierarchies.

Evaluate type alias targets in their defining module during type reference unification, generalize constexpr channel creation and IR channel array expansion to handle arbitrary array dimensions while preserving caller parametric bindings, and include impl-style procs when resolving top-level Verilog generation entries. This unblocks converting the memory_proc and matmul_4x4 examples to impl-style proc syntax.

@copybara-service
copybara-service Bot force-pushed the test_998333556 branch 3 times, most recently from 7fdbf91 to e1c2933 Compare October 27, 2026 11:08
…rocs.

Converting legacy procs to impl-style syntax fails when a proc's state type is a type alias over a constant-sized array or when a proc declares channel arrays. Type unification against the built-in proc state wrapper evaluates array dimensions in the built-in stubs module rather than the user module, causing a span validation failure when the dimension references a user-defined constant. Additionally, constexpr evaluation and IR conversion of impl-style proc constructors assume scalar channel declarations and drop caller parametric bindings, causing crashes on channel arrays and parametric proc hierarchies.

Evaluate type alias targets in their defining module during type reference unification, generalize constexpr channel creation and IR channel array expansion to handle arbitrary array dimensions while preserving caller parametric bindings, and include impl-style procs when resolving top-level Verilog generation entries. This unblocks converting the memory_proc and matmul_4x4 examples to impl-style proc syntax.

PiperOrigin-RevId: 1008013383
@copybara-service
copybara-service Bot merged commit 079e0f2 into main Oct 27, 2026
5 checks passed
@copybara-service
copybara-service Bot deleted the test_998333556 branch October 27, 2026 12:15

This branch was successfully deployed

1 active deployment
github-pages — 079e0f26 Deployed Oct 27, 2026 by copybara-service[bot] via deploy #13638
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