File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ class HuanCun(implicit p: Parameters) extends LazyModule with HasHuanCunParamete
260260 val robHeadPaddr = Vec (cacheParams.hartIds.length, Flipped (Valid (UInt (36 .W ))))
261261 val addrMatch = Vec (cacheParams.hartIds.length, Output (Bool ()))
262262 }
263+ val l3Miss = Output (Bool ())
263264 })
264265
265266 val sizeBytes = cacheParams.toCacheParams.capacity.toDouble
@@ -459,6 +460,8 @@ class HuanCun(implicit p: Parameters) extends LazyModule with HasHuanCunParamete
459460 t.io.debugTopDown <> io.debugTopDown
460461 case None => io.debugTopDown.addrMatch.foreach(_ := false .B )
461462 }
463+
464+ io.l3Miss := RegNext (slices.map(_.io.l3Miss).reduce(_ || _))
462465 }
463466
464467}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class Slice()(implicit p: Parameters) extends HuanCunModule {
3838 val ctl_req = Flipped (DecoupledIO (new CtrlReq ()))
3939 val ctl_resp = DecoupledIO (new CtrlResp ())
4040 val ctl_ecc = DecoupledIO (new EccInfo ())
41+ val l3Miss = Output (Bool ())
4142 })
4243 println(s " clientBits: $clientBits" )
4344
@@ -657,6 +658,12 @@ class Slice()(implicit p: Parameters) extends HuanCunModule {
657658 io.dir_result.get := directory.io.result
658659 }
659660 )
661+ io.l3Miss := Cat (ms.init.init.map { m =>
662+ m.io.status.valid && m.io.status.bits.channel(0 ) && (
663+ m.io.status.bits.reqSource === MemReqSource .CPULoadData .id.U ||
664+ m.io.status.bits.reqSource === MemReqSource .CPUStoreData .id.U
665+ )
666+ }).orR
660667
661668 val perfinfo = IO (Output (Vec (numPCntHc, (UInt (6 .W )))))
662669 perfinfo := DontCare
You can’t perform that action at this time.
0 commit comments