Skip to content

[circt-reduce] Add domain field remover#10062

Draft
seldridge wants to merge 1 commit intomainfrom
dev/seldridge/firrtl-more-reductions
Draft

[circt-reduce] Add domain field remover#10062
seldridge wants to merge 1 commit intomainfrom
dev/seldridge/firrtl-more-reductions

Conversation

@seldridge
Copy link
Copy Markdown
Member

Add a reduction that removes fields from domain definitions and updates
all uses. Try to remove each individual field from all domains that
exist. If a domain field has uses, then replace these with unknown value.

AI-assisted-by: Augment (Claude Sonnet 4.5)

Note: I have not had time to review this, yet! This is draft until I
can come back to it.

Add a reduction that removes fields from domain definitions and updates
all uses. This reduction uses the multiple matches feature where each
domain field generates a separate match, allowing circt-reduce to try
different combinations of field removals.

The reduction performs the following steps:
1. Generates one match per field in each domain
2. Removes the specified fields from domain definitions
3. Replaces domain.subfield operations with unknown values when their
   accessed fields are removed
4. Updates all DomainType references throughout the circuit to reflect
   the new field structure

This is useful for reducing circuits that use domains to model clocks,
power domains, or other design aspects, allowing the reducer to
simplify the domain structure while maintaining a valid circuit.

AI-assisted-by: Augment (Claude Sonnet 4.5)
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@fabianschuiki
Copy link
Copy Markdown
Contributor

Results of circt-tests run for 82c2b1b compared to results for 39ea723: no change to test results.

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.

2 participants