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

BEU report Corrupt+Denied on I-Fetch #2482

Merged
merged 2 commits into from
May 21, 2020
Merged
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
3 changes: 3 additions & 0 deletions src/main/scala/rocket/ICache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ICacheErrors(implicit p: Parameters) extends CoreBundle()(p)
with CanHaveErrors {
val correctable = (cacheParams.tagCode.canDetect || cacheParams.dataCode.canDetect).option(Valid(UInt(width = paddrBits)))
val uncorrectable = (cacheParams.itimAddr.nonEmpty && cacheParams.dataCode.canDetect).option(Valid(UInt(width = paddrBits)))
val bus = Valid(UInt(width = paddrBits))
}

class ICache(val icacheParams: ICacheParams, val hartId: Int)(implicit p: Parameters) extends LazyModule {
Expand Down Expand Up @@ -220,6 +221,8 @@ class ICacheModule(outer: ICache) extends LazyModuleImp(outer)

ccover(tl_out.d.bits.corrupt, "D_CORRUPT", "I$ D-channel corrupt")
}
io.errors.bus.valid := tl_out.d.fire() && (tl_out.d.bits.denied || tl_out.d.bits.corrupt)
io.errors.bus.bits := (refill_paddr >> blockOffBits) << blockOffBits

val vb_array = Reg(init=Bits(0, nSets*nWays))
when (refill_one_beat) {
Expand Down
7 changes: 4 additions & 3 deletions src/main/scala/tile/BusErrorUnit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ class L1BusErrors(implicit p: Parameters) extends CoreBundle()(p) with BusErrors
val icache = new ICacheErrors
val dcache = new DCacheErrors

def toErrorList = List(None, None,
icache.correctable.map((_, "I_CORRECTABLE", "Instruction cache or ITIM correctable ECC error ")),
def toErrorList = List(None,
Some((icache.bus, "IBUS", "Instruction cache TileLink bus error")),
icache.correctable.map((_, "I_CORRECTABLE", "Instruction cache or ITIM correctable ECC error")),
icache.uncorrectable.map((_, "I_UNCORRECTABLE", "ITIM uncorrectable ECC error")),
None,
Some((dcache.bus, "DBUS", "Load or store TileLink bus error")),
Some((dcache.bus, "DBUS", "Load/Store/PTW TileLink bus error")),
dcache.correctable.map((_, "D_CORRECTABLE", "Data cache correctable ECC error")),
dcache.uncorrectable.map((_, "D_UNCORRECTABLE", "Data cache uncorrectable ECC error")))
}
Expand Down