未验证 提交 a83da9eb 编写于 作者: W William Wang 提交者: GitHub

Lsu: fix store retire logic

上级 0c96de66
......@@ -127,7 +127,7 @@ class LsExeUnit extends Exu(Exu.lsuExeUnitCfg){
}
// if store, add it to store queue
val stqEnqueue = validIn && isStoreIn && !stqFull && !retiringStore && !io.redirect.valid
val stqEnqueue = validIn && isStoreIn && !stqFull && !retiringStore && !io.redirect.valid && state === s_idle
when(stqEnqueue){
stqPtr(stqHead - stqDequeue) := emptySlot
stqData(emptySlot).src1 := src1In
......@@ -144,8 +144,7 @@ class LsExeUnit extends Exu(Exu.lsuExeUnitCfg){
// have to say it seems better to rebuild FSM instead of using such ugly wrapper
val needRetireStore = stqCommited > 0.U && stqValid(stqTail)
when(
needRetireStore && !retiringStore && state === s_idle && !io.in.valid ||
needRetireStore && !retiringStore && io.in.valid && isStoreIn
needRetireStore && !retiringStore && state === s_idle && (!io.in.valid || isStoreIn)
){
retiringStore := true.B
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册