提交 8d9d4161 编写于 作者: Y Yinan Xu

roq: always set io.commitRoqIndex.valid in s_idle state

The roqIdx produced by storeQueue may not always be older than roq
since store instructions writeback to store queue and roq at the same cycle.
After that, if roq commits some instructions after the store, roqIdx given by Roq
will be older than that given by the store queue.
Thus, we set valid for roq.io.commitRoqIndex when roq is not in walking
to ensure that roq always gives the oldest roqIdx
上级 ca0e911a
......@@ -281,7 +281,7 @@ class Roq extends XSModule with HasCircularQueuePtrHelper {
val retireCounter = Mux(state === s_idle, commitCnt, 0.U)
XSInfo(retireCounter > 0.U, "retired %d insts\n", retireCounter)
val commitOffset = PriorityEncoder((validCommit :+ false.B).map(!_))
io.commitRoqIndex.valid := io.commits(0).valid && !io.commits(0).bits.isWalk
io.commitRoqIndex.valid := state === s_idle
io.commitRoqIndex.bits := deqPtrExt + commitOffset
// commit branch to brq
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册