Skip to content

Commit

Permalink
fix(L1TLB, RVH): fix the bug that no tlbreplay for a long time in L1T…
Browse files Browse the repository at this point in the history
…LB because of getGpa (#3528)
  • Loading branch information
pxk27 committed Sep 10, 2024
1 parent 65e844f commit 497660c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/xiangshan/cache/mmu/TLB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ class TLB(Width: Int, nRespDups: Int = 1, Block: Seq[Boolean], q: TLBParameters)
val ptw_resp_bits_reg = RegEnable(ptw.resp.bits, ptw.resp.valid)
val ptw_already_back = GatedValidRegNext(ptw.resp.fire) && req_s2xlate === ptw_resp_bits_reg.s2xlate && ptw_resp_bits_reg.hit(get_pn(req_out(idx).vaddr), io.csr.satp.asid, io.csr.vsatp.asid, io.csr.hgatp.vmid, allType = true)
val ptw_getGpa = req_need_gpa && hitVec(idx)
io.ptw.req(idx).valid := req_out_v(idx) && missVec(idx) && !(ptw_just_back || ptw_already_back) && !(req_out_v(idx) && need_gpa && !resp_gpa_refill && ptw_getGpa) // TODO: remove the regnext, timing
io.tlbreplay(idx) := req_out_v(idx) && missVec(idx) && (ptw_just_back || ptw_already_back)
io.ptw.req(idx).valid := req_out_v(idx) && missVec(idx) && !(ptw_just_back || ptw_already_back || (req_out_v(idx) && need_gpa && !resp_gpa_refill && ptw_getGpa)) // TODO: remove the regnext, timing
io.tlbreplay(idx) := req_out_v(idx) && missVec(idx) && (ptw_just_back || ptw_already_back || (req_out_v(idx) && need_gpa && !resp_gpa_refill && ptw_getGpa))
when (io.requestor(idx).req_kill && GatedValidRegNext(io.requestor(idx).req.fire)) {
io.ptw.req(idx).valid := false.B
io.tlbreplay(idx) := true.B
Expand Down

0 comments on commit 497660c

Please sign in to comment.