Skip to content

Commit

Permalink
[rocketv] All vector floating-point operations use the dynamic roundi…
Browse files Browse the repository at this point in the history
…ng mode.
  • Loading branch information
qinjun-li committed Sep 5, 2024
1 parent c50cfcb commit 0c9730f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rocketv/src/FPU.scala
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,9 @@ class FPU(val parameter: FPUParameter)

def isOneOf(x: UInt, s: Seq[UInt]): Bool = VecInit(s.map(x === _)).asUInt.orR
// we don't currently support round-max-magnitude (rm=4)
io.core.illegal_rm := isOneOf(io.core.inst(14, 12), Seq(5.U, 6.U)) || io.core.inst(
14,
12
) === 7.U && io.core.fcsr_rm >= 5.U
io.core.illegal_rm :=
(isOneOf(io.core.inst(14, 12), Seq(5.U, 6.U)) && io.core.inst(6, 0) =/= "b1010111".U) ||
io.core.inst(14, 12) === 7.U && io.core.fcsr_rm >= 5.U

if (cfg.divSqrt) {
val divSqrt_inValid = mem_reg_valid && (mem_ctrl.div || mem_ctrl.sqrt) && !divSqrt_inFlight
Expand Down

0 comments on commit 0c9730f

Please sign in to comment.