Skip to content

Commit

Permalink
feat(ECC): add ECC for coupledL2 and bump coupledL2 & openLLC (#3808)
Browse files Browse the repository at this point in the history
* add optional ECC for L2 Cache tag & data
* add Poison & (optional) DataCheck for CHI
  • Loading branch information
Ma-YX authored Dec 5, 2024
1 parent 189833a commit 4aa305e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openLLC
5 changes: 5 additions & 0 deletions src/main/scala/top/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ class WithNKBL2
)),
reqField = Seq(utility.ReqSourceField()),
echoField = Seq(huancun.DirtyField()),
tagECC = Some("secded"),
dataECC = Some("secded"),
enableTagECC = true,
enableDataECC = true,
dataCheck = Some("oddparity"),
prefetch = Seq(BOPParameters()) ++
(if (tp) Seq(TPParameters()) else Nil) ++
(if (p.prefetcher.nonEmpty) Seq(PrefetchReceiverParams()) else Nil),
Expand Down
8 changes: 7 additions & 1 deletion src/main/scala/xiangshan/L2Top.scala
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule

val resetDelayN = Module(new DelayN(UInt(PAddrBits.W), 5))

beu.module.io.errors <> io.beu_errors
beu.module.io.errors.icache := io.beu_errors.icache
beu.module.io.errors.dcache := io.beu_errors.dcache
resetDelayN.io.in := io.reset_vector.fromTile
io.reset_vector.toCore := resetDelayN.io.out
io.hartId.toCore := io.hartId.fromTile
Expand Down Expand Up @@ -240,6 +241,9 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
io.chi.get <> l2.io_chi
case l2cache: TL2TLCoupledL2 =>
}

beu.module.io.errors.l2.ecc_error.valid := l2.io.error.valid
beu.module.io.errors.l2.ecc_error.bits := l2.io.error.address
} else {
io.l2_hint := 0.U.asTypeOf(io.l2_hint)
io.debugTopDown <> DontCare
Expand All @@ -249,6 +253,8 @@ class L2TopInlined()(implicit p: Parameters) extends LazyModule
io.l2_tlb_req.req_kill := DontCare
io.l2_tlb_req.resp.ready := true.B
io.perfEvents := DontCare

beu.module.io.errors.l2 := 0.U.asTypeOf(beu.module.io.errors.l2)
}
}

Expand Down

0 comments on commit 4aa305e

Please sign in to comment.