-
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
[FIRRTL][OMIR] Update OMIR SRAM Paths #2024
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.
This is coming together nicely! Some notes throughout.
One thing: this currently requires that the blackbox memory pass is being run. If this runs without blackbox memory, then it'll error out due to emitTrackedTarget
not handling firrtl.mem
: SRAM.scala:38:34: error: invalid target for "OMMemberReferenceTarget" OMIR
. I think this is just a missing case there.
Additionally, if you run with blackbox memory, that appears to be dropping the tracker annotations and you wind up with OMDeleted
in the output. 😬
I think I addressed most of the review comments. |
Extend the `EmitOMIR` pass to handle the conversion of relative targets in the `instancePath` field of `OMSRAM` nodes to absolute targets.
342c699
to
94a736b
Compare
I've updated a few things and added additional test cases to ensure the SRAM path expansion also works on |
// expected-error @+4 {{OMIR node targets ambiguous component `mem`}} | ||
// expected-note @+3 {{may refer to the following paths:}} | ||
// expected-note @+2 {{- $root/sub1:Submodule}} | ||
// expected-note @+1 {{- $root/sub2:Submodule}} |
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.
Nice!
NamedAttrList fields; | ||
fields.append("id", | ||
IntegerAttr::get(IntegerType::get(ctx, 64), annotationID++)); | ||
fields.append("omir.tracker", UnitAttr::get(ctx)); | ||
fields.append("path", StringAttr::get(ctx, path)); |
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.
Good thought to include this for error reporting later.
Thanks for the reviews @seldridge. Going to merge this now. @prithayan has a follow-up PR adding a command line option to |
This PR converts the SRAM paths in the OMIR from local to absolute paths.
OMIR
annotation has the fieldOMString:OMSRAM
, then it is a candidate for path replacement.FIRRTL
node, with the same tracker id.NonLocalAnchor
.NonLocalAnchor
to theSRAM
node.firrtl.nla
after processing.