Which source does v0 bit 1 select in VMERGE.VXM?
v0[i]=1 selects integer scalar rs1; v0[i]=0 selects vs2[i].
Select element-wise between vs2 and integer scalar rs1 using v0 selection mask bits, writing vd.
VMERGE.VXM is a RISC-V V vector integer merge instruction. v0.mask[i]=0 selects vs2[i], and v0.mask[i]=1 selects the SEW-width scalar value formed from x[rs1] by the .vx scalar rule.
Starts from OP-V encoding fields, then shows how VMERGE uses v0 as selection data: bit 0 selects vs2, bit 1 selects the second source, and every body element is written.
Require valid vtype, enabled VS, and supported SEW. Only body elements are shown; VL=0 updates no destination elements, including tails. Same-EEW sources/destination may overlap. When v0 supplies EEW=1 mask/selection bits, it cannot also supply SEW data or be vd.
The teaching model fixes LMUL=m1 and vstart=0 and shows only body elements in the selected VL. It fixes VLEN=4096, VLMAX=4096/16=256, and assumes support for the selected SEW; equal vector sources require equal elements. VMERGE fixes vm=0; each v0 bit selects one of two sources, every body element executes, and only tails follow vtype.vta.
vmerge.vxm uses OP-V encoding. The animation places fixed fields, register fields, vm, and the rs1 field in one encoding strip.
This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, SEW-width integer v0-selected merge, v0 selection data, and vd writeback. It does not model pipelines, caches, or timing.
VMERGE.VXM: v0 bit 0 selects vs2; bit 1 selects integer scalar rs1. Every body element receives its selected value.
v0[i]=0 selects vs2[i]; v0[i]=1 selects the second source. Fixed vm=0 uses v0 as selection data, and every body element is written.
32-bit OP-V: opcode=1010111, funct6=010111, funct3=100. x[rs1] uses low SEW bits if XLEN>SEW and sign-extension if XLEN<SEW; x0 is zero.
Same-EEW sources/destination may overlap; vd cannot cover v0, and v0 cannot supply both EEW=1 selection bits and SEW data.
Require valid vtype, enabled VS, and supported SEW. VMV instead uses vm=1 and vs2=v0; distinguish it from VMERGE.
Body is vstart≤i<vl; prestart is unchanged, tails follow vta. VL=0 or vstart≥vl updates no destination, including tails. The animation fixes LMUL=m1, VLEN=4096, vstart=0; steps are not processor cycles.
Assume enabled V/VS, supported e32,m1, VLEN≥128, vl=4, vstart=0, ta/ma, and initialized sources; Fixed vm=0 selects at every body element. v4=[10,20,30,40], x11=3, v0.mask=[1,0,1,1] → v8=[3,20,3,3]. Tails are not guaranteed zero; mask destinations are always tail-agnostic.
Assume enabled V/VS, supported e32,m1, VLEN≥128, vl=4, vstart=0, ta/ma, and initialized sources; Fixed vm=0 selects at every body element. v4=[10,20,30,40], x11=3, v0.mask=[1,0,1,1] → v8=[3,20,3,3]. Tails are not guaranteed zero; mask destinations are always tail-agnostic.
v0[i]=1 selects integer scalar rs1; v0[i]=0 selects vs2[i].
No. v0 selects between two sources for every body element; it does not disable execution.