Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TopDown): add TopDown PMU Events #4122

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion huancun
8 changes: 7 additions & 1 deletion src/main/scala/top/Top.scala
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ class XSTop()(implicit p: Parameters) extends BaseXSSoc() with HasSoCParameter
core_with_l2.zip(chi_openllc_opt.get.io.debugTopDown.addrMatch).foreach { case (tile, l3Match) =>
tile.module.io.debugTopDown.l3MissMatch := l3Match
}
core_with_l2.zip(chi_openllc_opt).foreach { case (tile, l3) =>
tile.module.io.l3Miss := l3.io.l3Miss
}
}
}

Expand All @@ -379,11 +382,14 @@ class XSTop()(implicit p: Parameters) extends BaseXSSoc() with HasSoCParameter
}
l3.module.io.debugTopDown.robHeadPaddr := core_with_l2.map(_.module.io.debugTopDown.robHeadPaddr)
core_with_l2.zip(l3.module.io.debugTopDown.addrMatch).foreach { case (tile, l3Match) => tile.module.io.debugTopDown.l3MissMatch := l3Match }
core_with_l2.foreach(_.module.io.l3Miss := l3.module.io.l3Miss)
case None =>
}

(chi_openllc_opt, l3cacheOpt) match {
case (None, None) => core_with_l2.foreach(_.module.io.debugTopDown.l3MissMatch := false.B)
case (None, None) =>
core_with_l2.foreach(_.module.io.debugTopDown.l3MissMatch := false.B)
core_with_l2.foreach(_.module.io.l3Miss := false.B)
case _ =>
}

Expand Down
1 change: 1 addition & 0 deletions src/main/scala/top/XSNoCTop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class XSNoCTop()(implicit p: Parameters) extends BaseXSSoc with HasSoCParameter
core_rst_node.out.head._1 := false.B.asAsyncReset

core_with_l2.module.io.debugTopDown.l3MissMatch := false.B
core_with_l2.module.io.l3Miss := false.B
}

lazy val module = new XSNoCTopImp(this)
Expand Down
12 changes: 12 additions & 0 deletions src/main/scala/xiangshan/Bundle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -783,3 +783,15 @@ class L2ToL1Hint(implicit p: Parameters) extends XSBundle with HasDCacheParamete
val isKeyword = Bool() // miss entry keyword -> L1 load queue replay
}

class TopDownInfo(implicit p: Parameters) extends XSBundle {
val lqEmpty = Input(Bool())
val sqEmpty = Input(Bool())
val l1Miss = Input(Bool())
val noUopsIssued = Output(Bool())
val l2TopMiss = Input(new TopDownFromL2Top)
}

class TopDownFromL2Top(implicit p: Parameters) extends XSBundle {
val l2Miss = Bool()
val l3Miss = Bool()
}
8 changes: 8 additions & 0 deletions src/main/scala/xiangshan/L2Top.scala
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
val robHeadPaddr = Flipped(Valid(UInt(36.W)))
val l2MissMatch = Output(Bool())
}
val l2Miss = Output(Bool())
val l3Miss = new Bundle {
val fromTile = Input(Bool())
val toCore = Output(Bool())
}
val chi = if (enableCHI) Some(new PortIO) else None
val nodeID = if (enableCHI) Some(Input(UInt(NodeIDWidth.W))) else None
val l2_tlb_req = new TlbRequestIO(nRespDups = 2)
Expand All @@ -202,6 +207,7 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
io.hartId.toCore := io.hartId.fromTile
io.cpu_halt.toTile := io.cpu_halt.fromCore
io.cpu_critical_error.toTile := io.cpu_critical_error.fromCore
io.l3Miss.toCore := io.l3Miss.fromTile
// trace interface
val traceToTile = io.traceCoreInterface.toTile
val traceFromCore = io.traceCoreInterface.fromCore
Expand Down Expand Up @@ -245,6 +251,7 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
l2.io.debugTopDown.robHeadPaddr := io.debugTopDown.robHeadPaddr
l2.io.debugTopDown.robTrueCommit := io.debugTopDown.robTrueCommit
io.debugTopDown.l2MissMatch := l2.io.debugTopDown.l2MissMatch
io.l2Miss := l2.io.l2Miss

/* l2 tlb */
io.l2_tlb_req.req.bits := DontCare
Expand Down Expand Up @@ -291,6 +298,7 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
} else {
io.l2_hint := 0.U.asTypeOf(io.l2_hint)
io.debugTopDown <> DontCare
io.l2Miss := false.B

io.l2_tlb_req.req.valid := false.B
io.l2_tlb_req.req.bits := DontCare
Expand Down
12 changes: 12 additions & 0 deletions src/main/scala/xiangshan/XSCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ class XSCoreImp(outer: XSCoreBase) extends LazyModuleImp(outer)
val l2MissMatch = Input(Bool())
val l3MissMatch = Input(Bool())
}
val topDownInfo = Input(new Bundle {
val l2Miss = Bool()
val l3Miss = Bool()
})
})

println(s"FPGAPlatform:${env.FPGAPlatform} EnableDebug:${env.EnableDebug}")
Expand Down Expand Up @@ -253,6 +257,14 @@ class XSCoreImp(outer: XSCoreBase) extends LazyModuleImp(outer)
io.resetInFrontend := memBlock.io.resetInFrontendBypass.toL2Top
memBlock.io.traceCoreInterfaceBypass.fromBackend <> backend.io.traceCoreInterface
io.traceCoreInterface <> memBlock.io.traceCoreInterfaceBypass.toL2Top
memBlock.io.topDownInfo.fromL2Top.l2Miss := io.topDownInfo.l2Miss
memBlock.io.topDownInfo.fromL2Top.l3Miss := io.topDownInfo.l3Miss
memBlock.io.topDownInfo.toBackend.noUopsIssued := backend.io.topDownInfo.noUopsIssued
backend.io.topDownInfo.lqEmpty := memBlock.io.topDownInfo.toBackend.lqEmpty
backend.io.topDownInfo.sqEmpty := memBlock.io.topDownInfo.toBackend.sqEmpty
backend.io.topDownInfo.l1Miss := memBlock.io.topDownInfo.toBackend.l1Miss
backend.io.topDownInfo.l2TopMiss.l2Miss := memBlock.io.topDownInfo.toBackend.l2TopMiss.l2Miss
backend.io.topDownInfo.l2TopMiss.l3Miss := memBlock.io.topDownInfo.toBackend.l2TopMiss.l3Miss


if (debugOpts.ResetGen) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/scala/xiangshan/XSTile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class XSTile()(implicit p: Parameters) extends LazyModule
val robHeadPaddr = Valid(UInt(PAddrBits.W))
val l3MissMatch = Input(Bool())
}
val l3Miss = Input(Bool())
val chi = if (enableCHI) Some(new PortIO) else None
val nodeID = if (enableCHI) Some(Input(UInt(NodeIDWidth.W))) else None
val clintTime = Input(ValidIO(UInt(64.W)))
Expand Down Expand Up @@ -153,6 +154,7 @@ class XSTile()(implicit p: Parameters) extends LazyModule
l2top.module.io.debugTopDown.robTrueCommit := core.module.io.debugTopDown.robTrueCommit
l2top.module.io.l2_pmp_resp := core.module.io.l2_pmp_resp
core.module.io.l2_tlb_req <> l2top.module.io.l2_tlb_req
core.module.io.topDownInfo.l2Miss := l2top.module.io.l2Miss

core.module.io.perfEvents <> l2top.module.io.perfEvents
} else {
Expand All @@ -164,6 +166,7 @@ class XSTile()(implicit p: Parameters) extends LazyModule

core.module.io.l2PfqBusy := false.B
core.module.io.debugTopDown.l2MissMatch := false.B
core.module.io.topDownInfo.l2Miss := false.B

core.module.io.l2_tlb_req.req.valid := false.B
core.module.io.l2_tlb_req.req.bits := DontCare
Expand All @@ -175,6 +178,8 @@ class XSTile()(implicit p: Parameters) extends LazyModule

io.debugTopDown.robHeadPaddr := core.module.io.debugTopDown.robHeadPaddr
core.module.io.debugTopDown.l3MissMatch := io.debugTopDown.l3MissMatch
l2top.module.io.l3Miss.fromTile := io.l3Miss
core.module.io.topDownInfo.l3Miss := l2top.module.io.l3Miss.toCore

io.chi.foreach(_ <> l2top.module.io.chi.get)
l2top.module.io.nodeID.foreach(_ := io.nodeID.get)
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/xiangshan/XSTileWrap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class XSTileWrap()(implicit p: Parameters) extends LazyModule
val robHeadPaddr = Valid(UInt(PAddrBits.W))
val l3MissMatch = Input(Bool())
}
val l3Miss = Input(Bool())
val chi = EnableCHIAsyncBridge match {
case Some(param) => new AsyncPortIO(param)
case None => new PortIO
Expand Down Expand Up @@ -97,6 +98,7 @@ class XSTileWrap()(implicit p: Parameters) extends LazyModule
io.hartIsInReset := tile.module.io.hartIsInReset
io.traceCoreInterface <> tile.module.io.traceCoreInterface
io.debugTopDown <> tile.module.io.debugTopDown
tile.module.io.l3Miss := io.l3Miss
tile.module.io.nodeID.foreach(_ := io.nodeID.get)

// CLINT Async Queue Sink
Expand Down
12 changes: 11 additions & 1 deletion src/main/scala/xiangshan/backend/Backend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@ class BackendInlinedImp(override val wrapper: BackendInlined)(implicit p: Parame
dataPath.io.fromBypassNetwork := bypassNetwork.io.toDataPath
dataPath.io.fromVecExcpMod.r := vecExcpMod.o.toVPRF.r
dataPath.io.fromVecExcpMod.w := vecExcpMod.o.toVPRF.w
dataPath.io.topDownInfo.lqEmpty := DelayN(io.topDownInfo.lqEmpty, 2)
dataPath.io.topDownInfo.sqEmpty := DelayN(io.topDownInfo.sqEmpty, 2)
dataPath.io.topDownInfo.l1Miss := RegNext(io.topDownInfo.l1Miss)
dataPath.io.topDownInfo.l2TopMiss.l2Miss := io.topDownInfo.l2TopMiss.l2Miss
dataPath.io.topDownInfo.l2TopMiss.l3Miss := io.topDownInfo.l2TopMiss.l3Miss

og2ForVector.io.flush := ctrlBlock.io.toDataPath.flush
og2ForVector.io.ldCancel := io.mem.ldCancel
Expand Down Expand Up @@ -851,6 +856,8 @@ class BackendInlinedImp(override val wrapper: BackendInlined)(implicit p: Parame

io.debugRolling := ctrlBlock.io.debugRolling

io.topDownInfo.noUopsIssued := RegNext(dataPath.io.topDownInfo.noUopsIssued)

if(backendParams.debugEn) {
dontTouch(memScheduler.io)
dontTouch(dataPath.io.toMemExu)
Expand Down Expand Up @@ -897,10 +904,12 @@ class BackendInlinedImp(override val wrapper: BackendInlined)(implicit p: Parame
val fpSchedulerPerf = fpScheduler.asInstanceOf[SchedulerArithImp].getPerfEvents
val vecSchedulerPerf = vfScheduler.asInstanceOf[SchedulerArithImp].getPerfEvents
val memSchedulerPerf = memScheduler.asInstanceOf[SchedulerMemImp].getPerfEvents
val dataPathPerf = dataPath.getPerfEvents

val perfBackend = Seq()
// let index = 0 be no event
val allPerfEvents = Seq(("noEvent", 0.U)) ++ ctrlBlockPerf ++ intSchedulerPerf ++ fpSchedulerPerf ++ vecSchedulerPerf ++ memSchedulerPerf ++ perfBackend
val allPerfEvents = Seq(("noEvent", 0.U)) ++ ctrlBlockPerf ++ dataPathPerf ++
intSchedulerPerf ++ fpSchedulerPerf ++ vecSchedulerPerf ++ memSchedulerPerf ++ perfBackend


if (printEventCoding) {
Expand Down Expand Up @@ -1061,4 +1070,5 @@ class BackendIO(implicit p: Parameters, params: BackendParams) extends XSBundle
val fromCore = new CoreDispatchTopDownIO
}
val debugRolling = new RobDebugRollingIO
val topDownInfo = new TopDownInfo
}
12 changes: 12 additions & 0 deletions src/main/scala/xiangshan/backend/MemBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,11 @@ class MemBlockInlinedImp(outer: MemBlockInlined) extends LazyModuleImp(outer)
val fromBackend = Flipped(new TraceCoreInterface(hasOffset = true))
val toL2Top = new TraceCoreInterface
}

val topDownInfo = new Bundle {
val fromL2Top = Input(new TopDownFromL2Top)
val toBackend = Flipped(new TopDownInfo)
}
})

dontTouch(io.inner_hartId)
Expand Down Expand Up @@ -1993,6 +1998,13 @@ class MemBlockInlinedImp(outer: MemBlockInlined) extends LazyModuleImp(outer)
dcache.io.debugTopDown.robHeadOtherReplay := lsq.io.debugTopDown.robHeadOtherReplay
dcache.io.debugRolling := io.debugRolling

lsq.io.noUopsIssued := io.topDownInfo.toBackend.noUopsIssued
io.topDownInfo.toBackend.lqEmpty := lsq.io.lqEmpty
io.topDownInfo.toBackend.sqEmpty := lsq.io.sqEmpty
io.topDownInfo.toBackend.l1Miss := dcache.io.l1Miss
io.topDownInfo.toBackend.l2TopMiss.l2Miss := RegNext(io.topDownInfo.fromL2Top.l2Miss)
io.topDownInfo.toBackend.l2TopMiss.l3Miss := RegNext(io.topDownInfo.fromL2Top.l3Miss)

val hyLdDeqCount = PopCount(io.ooo_to_mem.issueHya.map(x => x.valid && FuType.isLoad(x.bits.uop.fuType)))
val hyStDeqCount = PopCount(io.ooo_to_mem.issueHya.map(x => x.valid && FuType.isStore(x.bits.uop.fuType)))
val ldDeqCount = PopCount(io.ooo_to_mem.issueLda.map(_.valid)) +& hyLdDeqCount
Expand Down
51 changes: 50 additions & 1 deletion src/main/scala/xiangshan/backend/datapath/DataPath.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import xiangshan.backend.issue.{FpScheduler, ImmExtractor, IntScheduler, MemSche
import xiangshan.backend.issue.EntryBundles._
import xiangshan.backend.regfile._
import xiangshan.backend.regcache._
import xiangshan.backend.fu.FuConfig
import xiangshan.backend.fu.FuType.is0latency
import xiangshan.mem.{LqPtr, SqPtr}

Expand All @@ -36,7 +37,7 @@ class DataPath(params: BackendParams)(implicit p: Parameters) extends LazyModule
}

class DataPathImp(override val wrapper: DataPath)(implicit p: Parameters, params: BackendParams)
extends LazyModuleImp(wrapper) with HasXSParameter {
extends LazyModuleImp(wrapper) with HasXSParameter with HasPerfEvents {

val io = IO(new DataPathIO())

Expand Down Expand Up @@ -837,6 +838,52 @@ class DataPathImp(override val wrapper: DataPath)(implicit p: Parameters, params
XSPerfAccumulate(s"MEM_ExuId${exuParams.exuIdx}_src0_dataSource_zero", exu.fire && exu.bits.common.dataSources(0).readZero)
}
})

// Top-Down
def FewUops = 4

val lqEmpty = io.topDownInfo.lqEmpty
val sqEmpty = io.topDownInfo.sqEmpty
val l1Miss = io.topDownInfo.l1Miss
val l2Miss = io.topDownInfo.l2TopMiss.l2Miss
val l3Miss = io.topDownInfo.l2TopMiss.l3Miss

val uopsIssued = fromIQ.flatten.map(_.fire).reduce(_ || _)
val uopsIssuedCnt = PopCount(fromIQ.flatten.map(_.fire))
val fewUopsIssued = (0 until FewUops).map(_.U === uopsIssuedCnt).reduce(_ || _)

val stallLoad = !uopsIssued

val noStoreIssued = !fromMemIQ.flatten.filter(memIq => memIq.bits.exuParams.fuConfigs.contains(FuConfig.StaCfg) ||
memIq.bits.exuParams.fuConfigs.contains(FuConfig.StdCfg)
).map(_.fire).reduce(_ || _)
val stallStore = uopsIssued && noStoreIssued

val stallLoadReg = DelayN(stallLoad, 2)
val stallStoreReg = DelayN(stallStore, 2)

val memStallAnyLoad = stallLoadReg && !lqEmpty
val memStallStore = stallStoreReg && !sqEmpty
val memStallL1Miss = memStallAnyLoad && l1Miss
val memStallL2Miss = memStallL1Miss && l2Miss
val memStallL3Miss = memStallL2Miss && l3Miss

io.topDownInfo.noUopsIssued := stallLoad

XSPerfAccumulate("exec_stall_cycle", fewUopsIssued)
XSPerfAccumulate("mem_stall_store", memStallStore)
XSPerfAccumulate("mem_stall_l1miss", memStallL1Miss)
XSPerfAccumulate("mem_stall_l2miss", memStallL2Miss)
XSPerfAccumulate("mem_stall_l3miss", memStallL3Miss)

val perfEvents = Seq(
("EXEC_STALL_CYCLE", fewUopsIssued),
("MEMSTALL_STORE", memStallStore),
("MEMSTALL_L1MISS", memStallL1Miss),
("MEMSTALL_L2MISS", memStallL2Miss),
("MEMSTALL_L3MISS", memStallL3Miss),
)
generatePerfEvent()
}

class DataPathIO()(implicit p: Parameters, params: BackendParams) extends XSBundle {
Expand Down Expand Up @@ -923,4 +970,6 @@ class DataPathIO()(implicit p: Parameters, params: BackendParams) extends XSBund
val diffV0Rat = if (params.basicDebugEn) Some(Input(Vec(1, UInt(log2Up(V0PhyRegs).W)))) else None
val diffVlRat = if (params.basicDebugEn) Some(Input(Vec(1, UInt(log2Up(VlPhyRegs).W)))) else None
val diffVl = if (params.basicDebugEn) Some(Output(UInt(VlData().dataWidth.W))) else None

val topDownInfo = new TopDownInfo
}
11 changes: 11 additions & 0 deletions src/main/scala/xiangshan/backend/decode/DecodeStage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,20 @@ class DecodeStage(implicit p: Parameters) extends XSModule
io.toCSR.trapInstInfo.valid := hasIllegalInst && !io.redirect
io.toCSR.trapInstInfo.bits.fromDecodedInst(illegalInst)

val recoveryFlag = RegInit(false.B)
when(io.redirect) {
recoveryFlag := true.B
}.elsewhen(io.in.map(_.fire).reduce(_ || _)) {
recoveryFlag := false.B
}

XSPerfAccumulate("in_valid_count", PopCount(io.in.map(_.valid)))
XSPerfAccumulate("in_fire_count", PopCount(io.in.map(_.fire)))
XSPerfAccumulate("in_valid_not_ready_count", PopCount(io.in.map(x => x.valid && !x.ready)))
XSPerfAccumulate("stall_cycle", io.in.head match { case x => x.valid && !x.ready})
XSPerfAccumulate("wait_cycle", !io.in.head.valid && io.out.head.ready)
XSPerfAccumulate("inst_spec", PopCount(io.in.map(_.fire)))
XSPerfAccumulate("recovery_bubble", recoveryFlag)

XSPerfHistogram("in_valid_range", PopCount(io.in.map(_.valid)), true.B, 0, DecodeWidth + 1, 1)
XSPerfHistogram("in_fire_range", PopCount(io.in.map(_.fire)), true.B, 0, DecodeWidth + 1, 1)
Expand All @@ -312,6 +321,8 @@ class DecodeStage(implicit p: Parameters) extends XSModule
("decoder_waitInstr", PopCount(inValidNotReady) ),
("decoder_stall_cycle", hasValid && !io.out(0).ready),
("decoder_utilization", PopCount(io.in.map(_.valid))),
("INST_SPEC", PopCount(io.in.map(_.fire))),
("RECOVERY_BUBBLE", recoveryFlag)
)
generatePerfEvent()

Expand Down
10 changes: 10 additions & 0 deletions src/main/scala/xiangshan/backend/rob/Rob.scala
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class RobImp(override val wrapper: Rob)(implicit p: Parameters, params: BackendP
val redirectWBs = io.writeback.filter(x => x.bits.redirect.nonEmpty).toSeq
val vxsatWBs = io.exuWriteback.filter(x => x.bits.vxsat.nonEmpty).toSeq
val branchWBs = io.exuWriteback.filter(_.bits.params.hasBrhFu).toSeq
val jmpWBs = io.exuWriteback.filter(_.bits.params.hasJmpFu).toSeq
val csrWBs = io.exuWriteback.filter(x => x.bits.params.hasCSR).toSeq

val numExuWbPorts = exuWBs.length
Expand Down Expand Up @@ -611,6 +612,7 @@ class RobImp(override val wrapper: Rob)(implicit p: Parameters, params: BackendP
io.flushOut.bits.ftqOffset := Mux(needModifyFtqIdxOffset, firstVInstrFtqOffset, deqPtrEntry.ftqOffset)
io.flushOut.bits.level := Mux(deqHasReplayInst || intrEnable || deqHasException || needModifyFtqIdxOffset, RedirectLevel.flush, RedirectLevel.flushAfter) // TODO use this to implement "exception next"
io.flushOut.bits.interrupt := true.B
XSPerfAccumulate("flush_num", io.flushOut.valid)
XSPerfAccumulate("interrupt_num", io.flushOut.valid && intrEnable)
XSPerfAccumulate("exception_num", io.flushOut.valid && deqHasException)
XSPerfAccumulate("flush_pipe_num", io.flushOut.valid && isFlushPipe)
Expand Down Expand Up @@ -1560,6 +1562,12 @@ class RobImp(override val wrapper: Rob)(implicit p: Parameters, params: BackendP
}
}

val brhMispred = PopCount(branchWBs.map(wb => wb.valid & wb.bits.redirect.get.valid))
val jmpMispred = PopCount(jmpWBs.map(wb => wb.valid && wb.bits.redirect.get.valid))
val misPred = brhMispred +& jmpMispred

XSPerfAccumulate("br_mis_pred", misPred)

val commitLoadVec = VecInit(commitLoadValid)
val commitBranchVec = VecInit(commitBranchValid)
val commitStoreVec = VecInit(io.commits.commitValid.zip(commitIsStore).map { case (v, t) => v && t })
Expand All @@ -1580,6 +1588,8 @@ class RobImp(override val wrapper: Rob)(implicit p: Parameters, params: BackendP
("rob_2_4_valid ", numValidEntries > (RobSize / 4).U && numValidEntries <= (RobSize / 2).U),
("rob_3_4_valid ", numValidEntries > (RobSize / 2).U && numValidEntries <= (RobSize * 3 / 4).U),
("rob_4_4_valid ", numValidEntries > (RobSize * 3 / 4).U),
("BR_MIS_PRED ", misPred),
("TOTAL_FLUSH ", io.flushOut.valid)
)
generatePerfEvent()

Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/xiangshan/cache/dcache/DCacheWrapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ class DCacheIO(implicit p: Parameters) extends DCacheBundle {
val l2_hint = Input(Valid(new L2ToL1Hint()))
val cmoOpReq = Flipped(DecoupledIO(new CMOReq))
val cmoOpResp = DecoupledIO(new CMOResp)
val l1Miss = Output(Bool())
}

private object ArbiterCtrl {
Expand Down Expand Up @@ -1676,6 +1677,7 @@ class DCacheImp(outer: DCache) extends LazyModuleImp(outer) with HasDCacheParame
XSPerfAccumulate("num_loads", num_loads)

io.mshrFull := missQueue.io.full
io.l1Miss := missQueue.io.l1Miss

// performance counter
// val ld_access = Wire(Vec(LoadPipelineWidth, missQueue.io.debug_early_replace.last.cloneType))
Expand Down
Loading
Loading