Skip to content

[core] Reject domain association with subfields of wires - #5548

Merged
jackkoenig merged 2 commits into
chipsalliance:mainfrom
anirudh12032008:domain-subfield-reject
Nov 13, 2026
Merged

jackkoenig merged 2 commits into
chipsalliance:mainfrom
anirudh12032008:domain-subfield-reject

Conversation

@anirudh12032008

Copy link
Copy Markdown
Contributor

Summary

Module.associate decided whether the target was a wire with topBindingOpt, which resolves a child of a wire to the wire's own binding. So a subfield like wire.clock was accepted and then silently dropped on emission, since only top-level ports and wires carry associations. Check the direct binding instead, so subfields (bundle fields, Vec elements, nested fields) get the existing "not a port or wire in this module" error, the same as port subfields already do.

Adds tests for the rejected subfield case and for associating a whole aggregate wire. DomainSpec passes on Scala 2.13 and 3.

Fixes #5507.

Release Notes

Associating a domain with a subfield of a wire is now an elaboration error instead of being silently ignored.

Development notes

  • AI tool(s) used: Claude Code (claude-sonnet-5-5)

Module.associate used topBindingOpt to detect wires, which resolves a
child of a wire to the wire's binding. A subfield of a wire was therefore
accepted and the association silently dropped on emission. Check the
direct binding instead so subfields hit the existing "not a port or wire"
error, matching what already happens for port subfields.

Fixes chipsalliance#5507

Assisted-by: Claude Code:claude-sonnet-5-5
@seldridge seldridge added the Bugfix Fixes a bug, will be included in release notes label Nov 13, 2026
@jackkoenig
jackkoenig enabled auto-merge (squash) November 13, 2026 21:40
@jackkoenig
jackkoenig merged commit 2a75ff9 into chipsalliance:main Nov 13, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a bug, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subfield domain association to wires should be rejected

3 participants