Skip to content

Commit

Permalink
ICache: Clock gating optimization OpenXiangShan#1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Siudya committed Aug 16, 2022
1 parent 0f65b04 commit e9ef1b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/scala/xiangshan/cache/CacheInstruction.scala
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,11 @@ class CSRCacheOpDecoder(decoder_name: String, id: Int)(implicit p: Parameters) e
data_transfer_cnt := 0.U
}

val error = DelayN(io.error, 1)
when(error.report_to_beu) {
val error = Wire(io.error.cloneType)
val (error_valid,error_bits) = DelayNWithValid(io.error, io.error.valid, 1)
error <> error_bits
error.valid := error_valid
when(error.report_to_beu && error.valid) {
io.csr.update.w.bits.addr := (CacheInstrucion.CacheInsRegisterList("CACHE_ERROR")("offset").toInt + Scachebase).U
io.csr.update.w.bits.data := error.asUInt
io.csr.update.w.valid := true.B
Expand Down

0 comments on commit e9ef1b0

Please sign in to comment.