Error grants (#1025)
* CacheCork: an error Grant still says 'toT' even though it is transient Grants with errors must be handled by a client as though no actual permissions were obtained, so that two clients do not both end up believing that they own a block which is only temporarily offline. However, the Grant MESSAGE should still match the request; ie. if you did Acquire.NtoT, the response must be Grant.toT, even though the 'error' bit signals that the Grant actually grants no permissions. This keeps the implementation of request-response tracking in interstitial adapters and FSMs simple, consistent with the way multibeat errors must include all their beats. * Error: handle permissions properly
This commit is contained in:
committed by
GitHub
parent
723af5e6b6
commit
a2dc13669a
@ -100,10 +100,7 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
|
||||
|
||||
when (out.d.bits.opcode === AccessAckData && out.d.bits.source(0)) {
|
||||
d_d.bits.opcode := GrantData
|
||||
// On Grant error, you do NOT get the permissions you asked for.
|
||||
// We only enter this case from NtoT or NtoB, so that means use toN.
|
||||
// (the BtoT case was handled by a_d)
|
||||
d_d.bits.param := Mux(out.d.bits.error, TLPermissions.toN, TLPermissions.toT)
|
||||
d_d.bits.param := TLPermissions.toT
|
||||
}
|
||||
when (out.d.bits.opcode === AccessAck && !out.d.bits.source(0)) {
|
||||
d_d.bits.opcode := ReleaseAck
|
||||
|
Reference in New Issue
Block a user