This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 177
Fix invalid references generated by VerilogMemDelays #2588
Merged
Merged
Conversation
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
Transformation of mem readwriters whose address contain references to readwriters of mems declared before it would contain invalid references to untransformed memory readwriter, as the connection is not transformed. This commit fixes this issue.
Would @jackkoenig or someone review this? |
jackkoenig
approved these changes
Feb 3, 2023
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 Thank you!
Sorry for missing this originally and thank you for the fix!
jackkoenig
added
the
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
label
Feb 3, 2023
mergify bot
pushed a commit
that referenced
this pull request
Feb 3, 2023
Transformation of mem readwriters whose address contain references to readwriters of mems declared before it would contain invalid references to untransformed memory readwriter, as the connection is not transformed. This commit fixes this issue. (cherry picked from commit 94d425f)
mergify bot
pushed a commit
that referenced
this pull request
Feb 3, 2023
Transformation of mem readwriters whose address contain references to readwriters of mems declared before it would contain invalid references to untransformed memory readwriter, as the connection is not transformed. This commit fixes this issue. (cherry picked from commit 94d425f)
mergify
bot
added
the
Backported
This PR has been backported to marked stable branch
label
Feb 3, 2023
mergify bot
added a commit
that referenced
this pull request
Feb 3, 2023
Transformation of mem readwriters whose address contain references to readwriters of mems declared before it would contain invalid references to untransformed memory readwriter, as the connection is not transformed. This commit fixes this issue. (cherry picked from commit 94d425f) Co-authored-by: Alan L <gh@symb.olic.link>
@Alan-Liang: Would you be able to also sign the CLA of the Chisel repository? (There should be a link in this comment: chipsalliance/chisel#2982 (comment)). I'm in the process of pulling all of this repository into Chisel and I just grabbed this change. Thanks! |
Done! |
Perfect. Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Backported
This PR has been backported to marked stable branch
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Transformation of mem readwriters whose address contain references to readwriters of mems declared before it would contain invalid references to untransformed memory readwriter, as the connection is not transformed. This commit fixes this issue.
In MemDelayAndReadwriteTransformer, the transform method traverses all memories in the module and finds connections to them. Other statements are checked for references of the old readwriters and these references will be swapped out for the new refs. However, the port connections of the memories themselves are not checked, while they may contain references to readwriters of other memories. For example:
Prior to this change, firrtl would generate
which contains
m2.rw1.rdata
, a reference to the old readwriter, and would generate invalid Verilog code. This change swaps out these references after all other statements are generated, so these references are updated to use the reader that we just splitted out.This might have other side effects on codegen that I am not aware of, as I am really new to Chisel/FIRRTL.
Contributor Checklist
Type of Improvement
bug fix
API Impact
None
Backend Code Generation Impact
Generated code may change when the driver of connections on readwriters contained references to readwriters of other memories.
Desired Merge Strategy
Release Notes
Fix invalid references generated by VerilogMemDelays
Reviewer Checklist (only modified by reviewer)
Please Merge
?