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
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
Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]>
ekiwi
approved these changes
Mar 26, 2021
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 🚢
Good test!
seldridge
added
the
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
label
Mar 26, 2021
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a) # Conflicts: # src/main/scala/firrtl/passes/ZeroWidth.scala
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a) # Conflicts: # src/main/scala/firrtl/passes/ZeroWidth.scala
jackkoenig
reviewed
Mar 26, 2021
Comment on lines
+28
to
+33
private def makeZero(tpe: ir.Type): ir.Type = tpe match { | ||
case ClockType => UIntType(IntWidth(0)) | ||
case a: UIntType => a.copy(IntWidth(0)) | ||
case a: SIntType => a.copy(IntWidth(0)) | ||
case a: AggregateType => a.map(makeZero) | ||
} |
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.
Suggested change
private def makeZero(tpe: ir.Type): ir.Type = tpe match { | |
case ClockType => UIntType(IntWidth(0)) | |
case a: UIntType => a.copy(IntWidth(0)) | |
case a: SIntType => a.copy(IntWidth(0)) | |
case a: AggregateType => a.map(makeZero) | |
} | |
private def makeZeroWidth(tpe: ir.Type): ir.Type = tpe match { | |
case ClockType => UIntType(IntWidth(0)) | |
case a: UIntType => a.copy(IntWidth(0)) | |
case a: SIntType => a.copy(IntWidth(0)) | |
case a: AggregateType => a.map(makeZeroWidth) | |
} |
I was about to link you to Utils.getGroundZero
because that's the functionality that makeZero
implies to me
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.
Well I'm too late, not worth changing heh
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a)
mergify
bot
added
the
Backported
This PR has been backported to marked stable branch
label
Mar 26, 2021
seldridge
added a commit
that referenced
this pull request
Mar 26, 2021
seldridge
added a commit
that referenced
this pull request
Mar 26, 2021
mergify bot
added a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a) Co-authored-by: Schuyler Eldridge <[email protected]>
mergify bot
added a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal (#2153) * Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a) # Conflicts: # src/main/scala/firrtl/passes/ZeroWidth.scala * fixup! Fix bug in zero-width memory removal (#2153) Co-authored-by: Schuyler Eldridge <[email protected]>
mergify bot
added a commit
that referenced
this pull request
Mar 26, 2021
* Fix bug in zero-width memory removal (#2153) * Fix bug in zero-width memory removal Correctly remove all extraneous connections to all types of memory ports (read, write, readwrite) for zero-width memories. Previously, only read ports were correctly handled. Signed-off-by: Schuyler Eldridge <[email protected]> * fixup! Fix bug in zero-width memory removal (cherry picked from commit 67ce97a) # Conflicts: # src/main/scala/firrtl/passes/ZeroWidth.scala * fixup! Fix bug in zero-width memory removal (#2153) Co-authored-by: Schuyler Eldridge <[email protected]>
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
bugfix
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.
Correctly remove all extraneous connections to all types of memory
ports (read, write, readwrite) for zero-width memories. Previously,
only read ports were correctly handled.
Contributor Checklist
Type of Improvement
API Impact
None.
Backend Code Generation Impact
None.
Desired Merge Strategy
Release Notes
None.
Reviewer Checklist (only modified by reviewer)
Please Merge
?