Skip to content

Commit

Permalink
fix(LSU): rfwen should not be set when WakeUp is cancelled or not…
Browse files Browse the repository at this point in the history
… need `WakeUp`
  • Loading branch information
Anzooooo committed Dec 9, 2024
1 parent 691119f commit ddf3803
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ class LoadMisalignBuffer(implicit p: Parameters) extends XSModule
io.writeBack.bits.uop := req.uop
io.writeBack.bits.uop.exceptionVec := DontCare
LduCfg.exceptionOut.map(no => io.writeBack.bits.uop.exceptionVec(no) := (globalMMIO || globalException) && exceptionVec(no))
io.writeBack.bits.uop.rfWen := !globalException && !globalMMIO && req.uop.rfWen
io.writeBack.bits.uop.fuType := FuType.ldu.U
io.writeBack.bits.uop.flushPipe := false.B
io.writeBack.bits.uop.replayInst := false.B
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/xiangshan/mem/pipeline/LoadUnit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,8 @@ class LoadUnit(implicit p: Parameters) extends XSModule
(s3_out.valid && !s3_vecout.isvec && !s3_mis_align && !s3_frm_mabuf))
io.ldout.bits.uop.exceptionVec := ExceptionNO.selectByFu(s3_ld_wb_meta.uop.exceptionVec, LduCfg)
io.ldout.bits.isFromLoadUnit := true.B
// TODO vector?
io.ldout.bits.uop.rfWen := !io.ldCancel.ld2Cancel && s3_ld_wb_meta.uop.rfWen
io.ldout.bits.uop.fuType := Mux(
s3_valid && s3_isvec,
FuType.vldu.U,
Expand Down

0 comments on commit ddf3803

Please sign in to comment.