forked from llvm/circt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIRRTL] Fix SRAM instance paths in OMIR (llvm#2039)
Fix an issue in `EmitOMIR` where the instance paths of SRAMs would be incorrectly rendered as `OMMemberReferenceTarget` instead of the correct `OMMemberInstanceTarget`. This also includes figuring out the module name that the final SRAM is going to have, which in the case of a `firrtl.mem` is a bit tricky/fragile: the actual module name for the memory is only generated after lowering to the HW dialect, at which point the OMIR has long been emitted. This change "predicts" the name that the memory is going to have by querying `getFirMemoryName()`, which looks like it's going to be accurate in most cases we currently care about. In the long run, we'll want better ways to encode this formulation of an instance path and ideally dealy it until `ExportVerilog` time. Co-authored-by: Schuyler Eldridge <schuyler.eldridge@gmail.com>
- Loading branch information
1 parent
edd8956
commit 98303db
Showing
3 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters