diff --git a/src/main/scala/coupledL2/RequestBuffer.scala b/src/main/scala/coupledL2/RequestBuffer.scala index 6c09e8d3..dd12e0c7 100644 --- a/src/main/scala/coupledL2/RequestBuffer.scala +++ b/src/main/scala/coupledL2/RequestBuffer.scala @@ -99,10 +99,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 - )).asUInt.orR // count ways // def countWaysOH(cond: (MSHRInfo => Bool)): UInt = { @@ -122,7 +118,7 @@ class RequestBuffer(flow: Boolean = true, entries: Int = 4)(implicit p: Paramete // incoming Acquire can be merged with late_pf MSHR block val mergeAMask = VecInit(io.mshrInfo.map(s => s.valid && s.bits.isPrefetch && sameAddr(in, s.bits) && !s.bits.willFree && !s.bits.dirHit && !s.bits.s_refill && - in.fromA && (in.opcode === AcquireBlock || in.opcode === AcquirePerm) && !s.bits.mergeA && !(in.param === toT && s.bits.param === toB) + in.fromA && (in.opcode === AcquireBlock || in.opcode === AcquirePerm) && !s.bits.mergeA && !(in.param === NtoT && s.bits.param === NtoB) )).asUInt val mergeA = mergeAMask.orR val mergeAId = OHToUInt(mergeAMask) @@ -134,7 +130,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