Skip to content

Commit

Permalink
fix(rv64v): not modify fflags when vl is zero (#3658)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziyue-Zhang authored Sep 27, 2024
1 parent d275ad0 commit 97e37a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/backend/fu/wrapper/VFALU.scala
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ class VFAlu(cfg: FuConfig)(implicit p: Parameters) extends VecPipedFuncUnit(cfg)
val outFFlags = allFFlagsEn.zip(allFFlags).map{
case(en,fflags) => Mux(en, fflags, 0.U(5.W))
}.reduce(_ | _)
io.out.bits.res.fflags.get := outFFlags


val cmpResultOldVd = Wire(UInt(cmpResultWidth.W))
Expand Down Expand Up @@ -498,6 +497,7 @@ class VFAlu(cfg: FuConfig)(implicit p: Parameters) extends VecPipedFuncUnit(cfg)
resultFpMask := Mux(isFclass || isCmp, Fill(16, 1.U(1.W)), Fill(VLEN, 1.U(1.W)))
// when dest is mask, the result need to be masked by mgtu
io.out.bits.res.data := Mux(notModifyVd, outOldVd, Mux(outVecCtrl.isDstMask, mgtu.io.out.vd, mgu.io.out.vd) & resultFpMask)
io.out.bits.res.fflags.get := Mux(notModifyVd, 0.U(5.W), outFFlags)
io.out.bits.ctrl.exceptionVec.get(ExceptionNO.illegalInstr) := mgu.io.out.illegal

}
Expand Down

0 comments on commit 97e37a2

Please sign in to comment.