-
Notifications
You must be signed in to change notification settings - Fork 299
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
[Emit] Group file header ops into emit.fragment
#6789
Conversation
e935c73
to
e37736d
Compare
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.
Just some drive-by comments
e37736d
to
c49ee95
Compare
Thanks for the comments, addressed. |
auto it = fragmentMapping.find(sym.getAttr()); | ||
if (it == fragmentMapping.end()) { | ||
encounteredError = true; | ||
op->emitError("cannot find referenced fragment ") << sym; |
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.
Shouldn't this be caught during validation?
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.
Specifically the generic symbol use verifier from SymbolUserOpInterface
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.
Is there a reason not to make a dialect attribute declared in the td files for the fragment referencing array?
c49ee95
to
db9965c
Compare
This is a stopgap measure that improves replicated ops a bit to better group them until we sanitize the downstream flows sufficiently to be able to include them from a header, so I wouldn't want to make it a first-class attribute on modules, similarly to the |
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.
Let's get this unblocked. Sorry for the delay.
How is this being tested for the LowerToHW
changes? Is there enough coverage already with end-to-end tests? I was surprised that this did not need changes to existing LowerToHW
tests. Can you include some tests of this if it is not already covered.
ecf647d
to
dd122d7
Compare
Instead of using the replicated op mechanism, fragments of SV code which must precede certain modules are grouped into fragment ops. Modules which rely on them reference them through a `emit.fragment` attribute. The fragments are printed through ExportVerilog. Subsequent PRs will fully replace replaced ops using fragments.
dd122d7
to
495ede5
Compare
Instead of using the replicated op mechanism, fragments of SV code which must precede certain modules are grouped into fragment ops. Modules which rely on them reference them through a
emit.fragment
attribute. The fragments are printed through ExportVerilog.Subsequent PRs will fully replace replicated ops using fragments.