Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HW][Seq] Allow typed attr to be an element of aggregate_constant and make seq.const_clock typed attr #7718

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Oct 21, 2024

This fixes #7716. Aggregate constant verifier rejects unknown attributes hence hw.aggregate_constant cannot be used for attributes defined by other dialects (in this case seq.const_clock) was rejected even when hw.aggregate_create allows users to create clock type arrays. This PR loosen the restriction by allowing TypedAttribute.

This PR also adds TypedAttrInterface to seq.const_clock and support its lowering.

@uenoku uenoku requested a review from darthscsi as a code owner October 21, 2024 10:01
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

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

I'm not too familiar with the seq const clock stuff, but this seems reasonable. It doesn't introduce any new circular dependencies or anything like that right?

@uenoku
Copy link
Member Author

uenoku commented Oct 21, 2024

It doesn't introduce any new circular dependencies or anything like that right?

Yes, it uses TypedAttr instead of directly using seq.clock to avoid circular dependency between HW and Seq.

Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me!

@uenoku uenoku merged commit c0e3195 into main Oct 22, 2024
4 checks passed
@uenoku uenoku deleted the dev/hidetou/typed-attr branch October 22, 2024 06:53
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.

[HW] Canonicalization creates invalid aggregate constant
3 participants