How does VFNCVT differ from VFWCVT?
VFNCVT narrows from 2*SEW source elements to SEW destination elements; VFWCVT widens from SEW source elements to 2*SEW destination elements. The direction, register-group size, and allowed overlap rules differ.
Narrow 2*SEW FP source elements to SEW signed integers with fixed round-toward-zero.
VFNCVT.RTZ.X.F.W reads 2*SEW FP source elements, uses instruction-specified fixed round-toward-zero to produce SEW signed integers, and writes vd. Result rounding is not selected by frm; frm validity still follows the official vector FP rules.
Decode the OP-V encoding and execute a VFUNARY0 narrowing conversion lane by lane: each active lane converts the 2*SEW FP value in vs2[i] to a signed integer.
lane 0: narrow_trunc_signed(-3.75) -> -3
This lane follows the current-step highlight; the remaining lane results appear below.
V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.
The teaching context fixes VLEN=4096, LMUL=m1, SEW=32, vstart=0, valid vtype, enabled VS/FS, and valid frm. The source is an even vs2..vs2+1 group and the destination is one register; overlap must start at the source group's lowest register and forces mask/tail agnostic. VL=0 updates no destination elements, including tails. Inactive and tail values remain unspecified in this display; full fflags are not modeled. NaNs, infinities, and out-of-range integer conversions are legal FP inputs outside this model, not illegal instructions.
When you see `rtz`, first note fixed round-toward-zero, then read `.w` as narrowing from 2*SEW source to SEW destination.
Syntax is vd, vs2[, v0.t]; vs1=10111 is an encoding selector, not a second source. funct6=010010, funct3=001, opcode=1010111; the instruction is 32 bits.
Source EEW=2*SEW, EMUL=2*LMUL; destination EEW=SEW, EMUL=LMUL. Groups are at most eight registers and align to their size. Narrowing overlap must start at the same lowest register and forces mask/tail agnostic.
Optional v0.t means vm=0; omission means vm=1. Active elements satisfy vstart≤i<vl with the mask enabled. Masked vd cannot overlap v0, and a source cannot read v0 both at data EEW and mask EEW=1.
Prestart is unchanged. At vl=0 or vstart≥vl no destination elements change, including tails. Other inactive/tail values follow vma/vta; successful execution resets vstart=0.
Result rounding is fixed toward zero. Out-of-range conversions clip by scalar conversion rules and set NV; valid inexact conversions set NX. This animation accepts only finite values whose rounded result fits the 32-bit destination.
V supports this 64-to-32 path on RV32/RV64; this instruction at SEW=16 requires Zvfh. The teaching context fixes valid vtype, enabled VS/FS, and valid frm. Invalid frm use is reserved, even for fixed rounding or vl=0. Only active-element exceptions accrue in fflags; full fflags are outside the animation.
Assume V/VS/FS enabled, valid vtype, valid frm=RNE, supported e32,m1, VLMAX≥4, and x10=4; vsetvli sets vl=4 and vstart=0. The source group is v2/v3; omitting v0.t makes the example unmasked: binary64 v2=[-3.75,-0.25,1.5,2.5] → int32 v1=[-3,0,1,2] (NX). Inexact conversions accrue NX; tails follow ta without assumed zeroing.
Assume V/VS/FS enabled, valid vtype, valid frm=RNE, supported e32,m1, VLMAX≥4, and x10=4; vsetvli sets vl=4 and vstart=0. The source group is v2/v3; omitting v0.t makes the example unmasked: binary64 v2=[-3.75,-0.25,1.5,2.5] → int32 v1=[-3,0,1,2] (NX). Inexact conversions accrue NX; tails follow ta without assumed zeroing.
VFNCVT narrows from 2*SEW source elements to SEW destination elements; VFWCVT widens from SEW source elements to 2*SEW destination elements. The direction, register-group size, and allowed overlap rules differ.
No. VFNCVT is a floating-point/integer conversion family: ordinary forms use floating-point frm, while rtz and rod are instruction-specified fixed rounding forms. vxrm is for fixed-point rounding instructions.