Does FROUND.H write an integer register?
No. The result is written to FP register f[rd] in the original precision; zero, infinity and NaN follow the special rules listed on this page.
Round a half-precision floating-point value to an integral value in the same FP format, without setting NX.
FROUND.H requires RV32/RV64 Zfa+Zfh and enabled FP state. It rounds the half-precision value in f[rs1] to an integral value according to rm and writes it in H format to f[rd]. Zero and infinity are copied unchanged. NaN results are canonical; signaling NaN accrues NV. It does not set NX. It sets no DZ, OF or UF and does not clear existing fflags.
Shows the Zfa + Zfh-extension half-precision OP-FP flow: decode fields, read FP operands, perform FROUND semantics, then write rd.
Leave rm empty to use the assembly default dyn encoding and fcsr.frm below.
The word is split as an R-type OP-FP instruction; half-precision OP-FP instructions use opcode 1010011.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUND.H writes the integral value in H format. Zero and infinity are copied. FROUND does not set NX and sets no exception flags other than NV.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUND.H writes the integral value in H format. Zero and infinity are copied. FROUND does not set NX and sets no exception flags other than NV.
Assumes Zfa + Zfh, FS enabled, correctly NaN-boxed inputs, and initial fflags=0. Accepts the listed exact finite whitelist, signed zeros, infinity, qNaN, and sNaN. Rounding uses rm/frm; zero and infinity are copied, and sNaN sets NV. FROUND does not set NX. rd may overlap rs1, and f0 accepts writeback. Steps are teaching views.
This animation shows only Zfa + Zfh-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FROUND.H rounds a half-precision value to an integral value in an FP register. It does not set NX. It does not convert to an integer register.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; no exception flags are added, so fflags remains 0.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; no exception flags are added, so fflags remains 0.
No. The result is written to FP register f[rd] in the original precision; zero, infinity and NaN follow the special rules listed on this page.
FROUND does not set NX; FROUNDNX sets NX only when the input differs from the rounded result and is not NaN.