未验证 提交 51e7d219 编写于 作者: L Lemover 提交者: GitHub

TLB: fix bug that mixing elsewhen and when causes waiting error (#674)

上级 6654420c
......@@ -481,9 +481,12 @@ class TLB(Width: Int, isDtlb: Boolean) extends TlbModule with HasCSRConst{
val waiting = RegInit(false.B)
when (ptw.req.fire()) {
waiting := true.B
}.elsewhen (sfence.valid || ptw.resp.valid) {
}
when (sfence.valid || ptw.resp.valid) {
waiting := false.B
}
assert(!ptw.resp.valid || waiting)
// ptw <> DontCare // TODO: need check it
ptw.req.valid := hasMissReq && !waiting && !RegNext(refill)
ptw.resp.ready := waiting
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册