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 FP results using frm rounding.
VFNCVT.F.F.W converts 2*SEW-wide FP elements in vs2 into SEW-wide FP results in vd. It is the ordinary FP narrowing form using dynamic frm, not the round-to-odd variant. The source register group has EEW=2*SEW and EMUL=2*LMUL; no group may exceed eight registers. Legal source/destination overlap with different EEWs forces both mask and tail agnostic treatment. If it overlaps the destination group, their lowest-numbered registers must be the same or the encoding is reserved. At SEW=16, this instruction is defined only when Zvfhmin is implemented.
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 SEW FP value.
lane 0: narrow_float.frm(1.5) -> 1.5
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, vstart=0, enabled VS/FS, frm=RNE, and supported FP widths. VL=0 updates no destination elements, including tails. This page demonstrates binary64 to binary32 only. The source is an even vs2..vs2+1 group and the destination is one register. Overlap may begin at the source group’s lowest register; legal overlap with different EEWs forces mask/tail agnostic. Zvfhmin defines SEW=16 conversion, outside this animation. Inactive and tail elements follow ma/ta without definite displayed values.
This is a dynamic-frm 2*SEW FP to SEW FP narrowing conversion.
Syntax is vd, vs2, vm. Source EEW=2*SEW, EMUL=2*LMUL; destination EEW=SEW, EMUL=LMUL. vs1=10100 is the VFUNARY0 selector, not a source register.
funct6=010010, funct3=001, opcode=1010111. Groups cannot exceed eight registers; multi-register groups must align to their size. Overlap must start at the same lowest register and forces mask/tail agnostic; Zvfhmin defines this conversion at SEW=16.
vm is optional v0.t; omission means vm=1. Only elements with vstart≤i<vl and an enabled mask compute. Masked vd cannot overlap v0, and a data source cannot also read the v0 mask with another EEW.
At vl=0 or vstart≥vl no destination elements, including tails, change; prestart is unchanged. Other inactive/tail values follow vma/vta, subject to the different-EEW overlap exception above. Successful execution resets vstart=0.
Ordinary narrowing uses dynamic frm, rather than fixed round-to-odd. Only active-element exceptions accrue in fflags. The animation shows finite binary64 to binary32 narrowing under RNE without NaNs, infinities, overflow, or full fflags.
Require valid vtype, supported FP widths and matching scalar FP extensions, and enabled VS/FS; with H and virtualization V=1, vsstatus.VS/FS must also be enabled. Invalid frm use is reserved even at vl=0 or for operations that do not round; vxrm does not control FP operations.
Assume V/VS/FS enabled, valid vtype, frm=RNE, supported e32,m1 and required FP formats, FLEN=64, VLMAX≥4, a0=4, and vstart=0 after vsetvli. The wide source group starts at even v2 and occupies v2/v3. The example is unmasked: binary64 v2=[1.5,-2.25,3.75,-4.5] → binary32 v1=[1.5,-2.25,3.75,-4.5]. Elements after vl are tail; ta does not guarantee zeros.
Assume V/VS/FS enabled, valid vtype, frm=RNE, supported e32,m1 and required FP formats, FLEN=64, VLMAX≥4, a0=4, and vstart=0 after vsetvli. The wide source group starts at even v2 and occupies v2/v3. The example is unmasked: binary64 v2=[1.5,-2.25,3.75,-4.5] → binary32 v1=[1.5,-2.25,3.75,-4.5]. Elements after vl are tail; ta does not guarantee zeros.
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.