Skip to content

Commit

Permalink
fix: probeQueue
Browse files Browse the repository at this point in the history
1. probePerm width from bdWidth to cWidth
2. remove useless assertion
  • Loading branch information
miaochenlu committed Jan 14, 2025
1 parent 81e2d39 commit b7c185a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/grapecoveDcache/MSHRIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MSHREntryIO extends Bundle() {
// probe permission
val probeValid = Input(Bool())
val probeLineAddrMatch = Output(Bool())
val probePermission = Input(UInt(TLPermissions.bdWidth.W))
val probePermission = Input(UInt(TLPermissions.cWidth.W))
val probeState = Output(UInt(ProbeMSHRState.width.W))
}

Expand Down Expand Up @@ -127,7 +127,7 @@ class RefillMSHRFile extends Bundle() {

class ProbeMSHRFile extends Bundle() {
val valid = Input(Bool())
val probePermission = Input(UInt(TLPermissions.bdWidth.W))
val probePermission = Input(UInt(TLPermissions.cWidth.W))
val lineAddr = Input(UInt(lineAddrWidth.W))

val pass = Output(Bool())
Expand Down
9 changes: 4 additions & 5 deletions src/main/scala/grapecoveDcache/ProbeQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ class ProbeQueue(
io.wbReq.bits.data := DontCare // FIXME
io.wbReq.bits.hasData := false.B

io.memProbe.ready := (state === s_invalid) &&
(!io.lrscAddr.valid ||
io.lrscAddr.bits =/= getLineAddr(io.memProbe.bits.address))

assert(io.memProbe.bits.opcode === TLMessages.Probe || ~io.memProbe.valid)
io.memProbe.ready :=
(state === s_invalid) &&
(!io.lrscAddr.valid ||
io.lrscAddr.bits =/= getLineAddr(io.memProbe.bits.address))
}

0 comments on commit b7c185a

Please sign in to comment.