Skip to content

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Oct 1, 2025

Add support for creating domains and domain types. Add a built-in
ClockDomain type.

This is very basic support initially and many things will not work, namely
connections or compilation of these to anything meaningful.

Release Notes

Add initial support for creating domains. These are intended to model things like clock, reset, and power domains and their associations to ports in the design.

@seldridge seldridge added the Feature New feature, will be included in release notes label Oct 1, 2025
@seldridge seldridge force-pushed the dev/seldridge/domains branch 2 times, most recently from ce1f528 to 74f1910 Compare October 15, 2025 20:14
Extend the allowed binary incompatibility for more problems in
`chisel3.internal.firrtl.ir*` and the same set of problems in
`firrtl.ir*`.  This is in support of allowing breakages that are necessary
to represent domain associations.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge force-pushed the dev/seldridge/domains branch from 74f1910 to e40332d Compare October 15, 2025 20:28
Add support for creating domains and domain types.  Add a built-in
ClockDomain type.

This is very basic support initially and many things will not work, namely
connections or compilation of these to anything meaningful.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge force-pushed the dev/seldridge/domains branch from e40332d to 92af846 Compare October 15, 2025 21:04
@seldridge seldridge marked this pull request as ready for review October 15, 2025 21:04
@seldridge seldridge requested a review from jackkoenig October 15, 2025 21:04
/** A [[Data]] that is used to communicate information of a specific domain
* kind.
*/
final class Type private (val domain: Domain) extends Element { self =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a domain.Type really need to be an Element or Data at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They do need to be ports, so I think it would either be changing the type that IO accepts or adding a new IO creation method just for domain.Type. Either of these is doable.

The more critical thing would be that I expect libraries that assume everything in Chisel can be shoved into a Wire, like diplomacy, will want to put domain.Type into a wire. We might be able to avoid this with changes to libraries so that they don't use a single Wire. (This is related to what I was talking to you offline about assuming everything can go into a Bundle is making things hard.) WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, then I think Element is right. If these need to be ports and wired through then I think they run into the same needs as other things like Properties. As in the larger conversation about Bundles, maybe there's a better way out there but there has to be some way to compose these things together and Bundle (well Record) remains the only existing avenue.

@seldridge
Copy link
Member Author

Changes addressed and I added support for a new domain.define operation (which maps to domain_define in FIRRTL and is a static-single-connect operation to forward domains around, analogous to a property assign or a probe define).

@seldridge seldridge requested a review from jackkoenig October 22, 2025 03:37
@seldridge seldridge requested a review from jackkoenig October 22, 2025 18:10
@seldridge seldridge enabled auto-merge (squash) October 22, 2025 19:31
@seldridge seldridge merged commit 11695bb into main Oct 22, 2025
16 checks passed
@seldridge seldridge deleted the dev/seldridge/domains branch October 22, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants