Skip to content

Commit

Permalink
chore(MMU): Remove timeout assertion (OpenXiangShan#3603)
Browse files Browse the repository at this point in the history
With CHI enabled and CMN connected, a transaction may last over
timeoutThreshold. So this commit removes it (also since L2 Cache will
detect timeout)
  • Loading branch information
good-circle authored Sep 19, 2024
1 parent e0c1f27 commit f3640a5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions src/main/scala/xiangshan/cache/mmu/L2TLB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,6 @@ class L2TLBImp(outer: L2TLB)(implicit p: Parameters) extends PtwModule(outer) wi
// print configs
println(s"${l2tlbParams.name}: a ptw, a llptw with size ${l2tlbParams.llptwsize}, miss queue size ${MissQueueSize} l2:${l2tlbParams.l2Size} fa l1: nSets ${l2tlbParams.l1nSets} nWays ${l2tlbParams.l1nWays} l0: ${l2tlbParams.l0nSets} nWays ${l2tlbParams.l0nWays} blockBytes:${l2tlbParams.blockBytes}")

// time out assert
for (i <- 0 until MemReqWidth) {
TimeOutAssert(waiting_resp(i), timeOutThreshold, s"ptw mem resp time out wait_resp${i}")
TimeOutAssert(flush_latch(i), timeOutThreshold, s"ptw mem resp time out flush_latch${i}")
}


val perfEvents = Seq(llptw, cache, ptw).flatMap(_.getPerfEvents)
generatePerfEvent()

Expand Down
6 changes: 0 additions & 6 deletions src/main/scala/xiangshan/cache/mmu/PageTableWalker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ class PTW()(implicit p: Parameters) extends XSModule with HasPtwConst with HasPe
XSPerfAccumulate("mem_cycle", BoolStopWatch(mem.req.fire, mem.resp.fire, true))
XSPerfAccumulate("mem_blocked", mem.req.valid && !mem.req.ready)

TimeOutAssert(!idle, timeOutThreshold, "page table walker time out")

val perfEvents = Seq(
("fsm_count ", io.req.fire ),
("fsm_busy ", !idle ),
Expand Down Expand Up @@ -781,10 +779,6 @@ class LLPTW(implicit p: Parameters) extends XSModule with HasPtwConst with HasPe
XSPerfAccumulate("mem_cycle", PopCount(is_waiting) =/= 0.U)
XSPerfAccumulate("blocked_in", io.in.valid && !io.in.ready)

for (i <- 0 until l2tlbParams.llptwsize) {
TimeOutAssert(state(i) =/= state_idle, timeOutThreshold, s"missqueue time out no out ${i}")
}

val perfEvents = Seq(
("tlbllptw_incount ", io.in.fire ),
("tlbllptw_inblock ", io.in.valid && !io.in.ready),
Expand Down
9 changes: 0 additions & 9 deletions src/main/scala/xiangshan/cache/mmu/Repeater.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class PTWRepeater(Width: Int = 1, FenceDelay: Int)(implicit p: Parameters) exten
XSError(io.ptw.req(0).valid && io.ptw.resp.valid && !flush, "ptw repeater recv resp when sending")
XSError(io.ptw.resp.valid && (req.vpn =/= io.ptw.resp.bits.s1.entry.tag), "ptw repeater recv resp with wrong tag")
XSError(io.ptw.resp.valid && !io.ptw.resp.ready, "ptw repeater's ptw resp back, but not ready")
TimeOutAssert(sent && !recv, timeOutThreshold, "Repeater doesn't recv resp in time")
}

/* dtlb
Expand Down Expand Up @@ -334,10 +333,6 @@ class PTWFilterEntry(Width: Int, Size: Int, hasHint: Boolean = false)(implicit p
XSPerfAccumulate(s"counter${i}", counter === i.U)
}

for (i <- 0 until Size) {
TimeOutAssert(v(i), timeOutThreshold, s"Filter ${i} doesn't recv resp in time")
}

}

class PTWNewFilter(Width: Int, Size: Int, FenceDelay: Int)(implicit p: Parameters) extends XSModule with HasPtwConst {
Expand Down Expand Up @@ -645,10 +640,6 @@ class PTWFilter(Width: Int, Size: Int, FenceDelay: Int)(implicit p: Parameters)
for (i <- 0 until Size + 1) {
XSPerfAccumulate(s"counter${i}", counter === i.U)
}

for (i <- 0 until Size) {
TimeOutAssert(v(i), timeOutThreshold, s"Filter ${i} doesn't recv resp in time")
}
}

object PTWRepeater {
Expand Down
7 changes: 0 additions & 7 deletions src/main/scala/xiangshan/cache/mmu/TLB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ class TLB(Width: Int, nRespDups: Int = 1, Block: Seq[Boolean], q: TLBParameters)
need_gpa := false.B
}

TimeOutAssert(need_gpa && !resp_gpa_refill, timeOutThreshold, s"port${i} need gpa long time not refill.")

val hit = e_hit || p_hit
val miss = (!hit && enable) || hasGpf(i) && !p_hit && !(resp_gpa_refill && need_gpa_vpn_hit) && !isOnlys2xlate
hit.suggestName(s"hit_read_${i}")
Expand Down Expand Up @@ -471,11 +469,6 @@ class TLB(Width: Int, nRespDups: Int = 1, Block: Seq[Boolean], q: TLBParameters)
(p_hit, p_ppn, p_pbmt, p_perm, p_gvpn, p_g_pbmt, p_g_perm, p_s2xlate, p_s1_level, p_s1_isLeaf, p_s1_isFakePte)
}

// assert
for(i <- 0 until Width) {
TimeOutAssert(req_out_v(i) && !resp(i).valid, timeOutThreshold, s"{q.name} port{i} long time no resp valid.")
}

// perf event
val result_ok = req_in.map(a => GatedValidRegNext(a.fire))
val perfEvents =
Expand Down

0 comments on commit f3640a5

Please sign in to comment.