Skip to content

Commit

Permalink
mergeA: fix bug about merge permission_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Cai Luoshan committed Oct 20, 2023
1 parent 2994420 commit 75a6a38
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/scala/coupledL2/RequestBuffer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ class RequestBuffer(flow: Boolean = true, entries: Int = 4)(implicit p: Paramete
s.valid && s.bits.isPrefetch && sameAddr(a, s.bits) && !s.bits.willFree &&
a.fromA && (a.opcode === AcquireBlock || a.opcode === AcquirePerm)
)).asUInt.orR
def mergeA_latepf(a: TaskBundle): Bool = VecInit(io.mshrInfo.map(s =>
s.valid && s.bits.isPrefetch && sameAddr(a, s.bits) && !s.bits.willFree && !s.bits.dirHit && !s.bits.s_refill &&
a.fromA && (a.opcode === AcquireBlock || a.opcode === AcquirePerm) && !s.bits.mergeA && !(in.param === NtoT && s.bits.param === NtoB)
)).asUInt.orR

// count ways
// def countWaysOH(cond: (MSHRInfo => Bool)): UInt = {
Expand Down Expand Up @@ -133,7 +129,7 @@ class RequestBuffer(flow: Boolean = true, entries: Int = 4)(implicit p: Paramete
val canFlow = flow.B && !full && !conflict(in) && !chosenQValid && !Cat(io.mainPipeBlock).orR
val doFlow = canFlow && io.out.ready
io.hasLatePF := latePrefetch(in) && io.in.valid && !sameAddr(in, RegNext(in))
io.hasMergeA := mergeA_latepf(in) && io.in.valid && !sameAddr(in, RegNext(in))
io.hasMergeA := mergeA && io.in.valid && !sameAddr(in, RegNext(in))

// val depMask = buffer.map(e => e.valid && sameAddr(io.in.bits, e.task))
// remove duplicate prefetch if same-addr A req in MSHR or ReqBuf
Expand Down

0 comments on commit 75a6a38

Please sign in to comment.