-
Notifications
You must be signed in to change notification settings - Fork 298
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
[FIRRTL] add DedupGroupAnnotation #5787
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good, can we update docs/Dialects/FIRRTL/FIRRTLAnnotations.md
as well?
I added the suggestions. @uenoku could you take another look to make sure I'm not doing anything dumb with null strings or whatever |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do you have thoughts on behaivor when there are multiple DedupGroupAnno? Currently implementation should pick the first DedupGroupAnno so it would not work as expected. I think it wold be fine to just raise an error if there are annotations.
Co-authored-by: Hideto Ueno <uenoku.tokotoko@gmail.com>
for (auto module : modules) | ||
AnnotationSet::removeAnnotations(module, dedupGroupClass); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems modules
is already invalid here. Probably it should be sufficient to just replace module
with circuit.getOps<FModuleOp>()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This implements
DedupGroupAnnotation
as described by @jackkoenig in this comment chipsalliance/firrtl-spec#116 (comment)