tilelink: split Acquire into Acquire{Block,Perm} (#1030)
We had planned for a while to add an 'Overwrite' message which obtains permissions without requiring retrieval of data. This is useful whenever a master knows it will completely replace the contents of a cache block. Instead of calling it Overwrite, we decided to split the Acquire type. If you AcquirePerm, you MUST Release and ProbeAck with Data.
This commit is contained in:
committed by
GitHub
parent
81b9ac42a3
commit
bd045a3b95
@ -47,7 +47,8 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
|
||||
val a_a = Wire(out.a)
|
||||
val a_d = Wire(in.d)
|
||||
val isPut = in.a.bits.opcode === PutFullData || in.a.bits.opcode === PutPartialData
|
||||
val toD = in.a.bits.opcode === Acquire && in.a.bits.param === TLPermissions.BtoT
|
||||
val toD = (in.a.bits.opcode === AcquireBlock && in.a.bits.param === TLPermissions.BtoT) ||
|
||||
(in.a.bits.opcode === AcquirePerm)
|
||||
in.a.ready := Mux(toD, a_d.ready, a_a.ready)
|
||||
|
||||
a_a.valid := in.a.valid && !toD
|
||||
@ -55,7 +56,7 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
|
||||
a_a.bits.source := in.a.bits.source << 1 | Mux(isPut, UInt(1), UInt(0))
|
||||
|
||||
// Transform Acquire into Get
|
||||
when (in.a.bits.opcode === Acquire) {
|
||||
when (in.a.bits.opcode === AcquireBlock || in.a.bits.opcode === AcquirePerm) {
|
||||
a_a.bits.opcode := Get
|
||||
a_a.bits.param := UInt(0)
|
||||
a_a.bits.source := in.a.bits.source << 1 | UInt(1)
|
||||
|
Reference in New Issue
Block a user