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
Add assertion on CEASE line #2420
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
LGTM as a notional follow-up to #2419, but this isn't rebased on that and FYI they touch literally the same lines of code |
oh i thought #2419 was already merged, my bad |
mwachs5
commented
Apr 25, 2020
chisel assertions indeed are disabled during reset - it’s literally
implemented as assert(reset || cond), IIRC
…On Sat, Apr 25, 2020 at 4:49 PM Megan Wachs ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/main/scala/tile/Interrupts.scala
<#2420 (comment)>
:
> @@ -102,7 +102,13 @@ trait SourcesExternalNotifications { this: BaseTile =>
saturated
}
val (cease, _) = ceaseNode.out(0)
- cease(0) := could_cease.map(waitForQuiescence(_)).getOrElse(false.B)
+ cease(0) := could_cease.map{ c =>
+ val cease = (waitForQuiescence(c))
+ // Test-Only Code --
+ val prev_cease = RegNext(c, false.B)
+ assert((!(prev_cease & !c) | reset.asBool), "CEASE line can not glitch once raised")
⬇️ Suggested change
- assert((!(prev_cease & !c) | reset.asBool), "CEASE line can not glitch once raised")
+ assert(!(prev_cease & !c), "CEASE line can not glitch once raised")
I *think* assertions are already disabled during reset? @jchang0
<https://github.com/jchang0> ?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#2420 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3XQSDPU2OYLLA5JZQ3LLRONZG5ANCNFSM4MK4MGUQ>
.
|
@jchang0 can I get a review on this? |
SandeepRajendran
approved these changes
Apr 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issue:
Follow-up to #2419
Type of change: other enhancement
Impact: API addition (no impact on existing code)
Development Phase: implementation
Release Notes
Add an assertion that CEASE will not go low once raised until after reset