-
Notifications
You must be signed in to change notification settings - Fork 603
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
Make Counter emit valid FIRRTL #1408
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
aswaterman
reviewed
Apr 10, 2020
// in a when statement, but still needed to refer to the final value returned by | ||
// c.inc() so we could return cond && wrap. Unless you really, really know what | ||
// you are doing, IGNORE THIS CODE!!!!! | ||
var wrap: Bool = null |
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.
mea culpa, mea culpa, mea maxima culpa
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.
To be fair, there are 2 other issues:
seldridge
approved these changes
Apr 10, 2020
Remove var from object Counter.apply, using a Wire instead. Also improve some ScalaDoc and the class Counter require message.
This fix is also backportable now |
seldridge
added
the
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
label
Apr 10, 2020
mergify bot
pushed a commit
that referenced
this pull request
Apr 10, 2020
Remove var from object Counter.apply, using a Wire instead. Also improve some ScalaDoc and the class Counter require message. (cherry picked from commit a39d0e1)
albert-magyar
added a commit
to chipsalliance/firrtl
that referenced
this pull request
Apr 14, 2020
14 tasks
albert-magyar
added a commit
to chipsalliance/firrtl
that referenced
this pull request
Apr 14, 2020
albert-magyar
added a commit
to chipsalliance/firrtl
that referenced
this pull request
Jul 22, 2020
albert-magyar
added a commit
to chipsalliance/firrtl
that referenced
this pull request
Jul 27, 2020
albert-magyar
added a commit
to chipsalliance/firrtl
that referenced
this pull request
Jul 27, 2020
jackkoenig
pushed a commit
that referenced
this pull request
Feb 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Backported
This PR has been backported
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.
Remove var from object Counter.apply, using a Wire instead. Also improve
some ScalaDoc and the class Counter require message.
EDIT: At @seldridge's suggestion, here is a more minimal fix that doesn't mess with the API of class
Counter.inc()
The one thing I want to highlight:As the comment says, if we did justc.inc(cond)
, it changes the behavior forn == 1
to returntrue.B
rather thancond
.Related issue:
Type of change: bug fix
Impact: API addition (no impact on existing code)
Development Phase: implementation
Release Notes
chisel3.util.Counter
emitted illegal FIRRTL