Skip to content

Commit

Permalink
LoadQueueReplay: initialize oldestSel(i)_valid (#2831)
Browse files Browse the repository at this point in the history
Co-authored-by: Haoyuan Feng <fenghaoyuan19@mails.ucas.ac.cn>
  • Loading branch information
Tang-Haojin and good-circle authored Apr 3, 2024
1 parent 4a8a734 commit 3953b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/xiangshan/mem/lsqueue/LoadQueueReplay.scala
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class LoadQueueReplay(implicit p: Parameters) extends XSModule
uop(s1_oldestSel(i).bits).robIdx.needFlush(io.redirect) ||
uop(s1_oldestSel(i).bits).robIdx.needFlush(RegNext(io.redirect))
val s0_oldestSelIndexOH = s0_oldestSel(i).bits // one-hot
s1_oldestSel(i).valid := RegEnable(s0_oldestSel(i).valid, s0_can_go)
s1_oldestSel(i).valid := RegEnable(s0_oldestSel(i).valid, false.B, s0_can_go)
s1_oldestSel(i).bits := RegEnable(OHToUInt(s0_oldestSel(i).bits), s0_can_go)

for (j <- 0 until LoadQueueReplaySize) {
Expand All @@ -488,7 +488,7 @@ class LoadQueueReplay(implicit p: Parameters) extends XSModule
uop(s1_oldestSel(i).bits).robIdx.needFlush(RegNext(io.redirect))
val s1_oldestSelV = s1_oldestSel(i).valid && !s1_cancel
s1_can_go(i) := replayCanFire(i) && (!s2_oldestSel(i).valid || io.replay(i).fire) || s2_cancelReplay(i)
s2_oldestSel(i).valid := RegEnable(Mux(s1_can_go(i), s1_oldestSelV, false.B), (s1_can_go(i) || io.replay(i).fire))
s2_oldestSel(i).valid := RegEnable(Mux(s1_can_go(i), s1_oldestSelV, false.B), false.B, (s1_can_go(i) || io.replay(i).fire))
s2_oldestSel(i).bits := RegEnable(s1_oldestSel(i).bits, s1_can_go(i))

vaddrModule.io.ren(i) := s1_oldestSel(i).valid && s1_can_go(i)
Expand Down

0 comments on commit 3953b70

Please sign in to comment.