How does VMULHU.VV differ from VWMUL*?
VMULHU.VV writes only the high SEW bits to an SEW-width vd. VWMUL* writes the full 2*SEW widening product.
VMULHU.VV forms each active element's 2*SEW integer product and writes the product's high SEW bits.
VMULHU.VV is a RISC-V V extension single-width integer vector-vector multiply instruction. Each active element reads vs2 and the second source from vector register vs1, forms a 2*SEW product, and writes the high SEW bits to vd. Both source operands are interpreted as unsigned; with vm=0, only body elements whose v0.t bit is 1 are processed, while masked-off and tail elements follow the current vtype policies.
Starts from OP-V encoding fields, then shows how VMULHU forms a 2*SEW product and writes the unsigned-by-unsigned high SEW bits to vd.
Require valid vtype, enabled VS, and supported SEW; VL=0 updates nothing, including tails. An ordinary masked vd cannot be v0; v0 cannot supply both mask and SEW data. Same-width source/destination overlap is legal. Steps are teaching stages, not processor cycles.
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. In ordinary masked forms, inactive and tail elements follow vtype.vma/vta and the result row does not invent a definite value; VADC/VMADC/VSBC/VMSBC execute every body element, with v0 bits used only as carry/borrow-in.
vmulhu.vv uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 field in one encoding strip.
This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, the high half of a 2*SEW product integer unsigned high-half multiplication, mask control, and vd writeback. It does not model pipelines, caches, or timing.
VMULHU.VV does not write a full widening product. It forms a 2*SEW product for active elements within the current vl and writes only the high SEW bits to vd; the second source comes from vector register vs1, and both source operands are interpreted as unsigned.
Syntax: vmulhu.vv vd, vs2, vs1[, v0.t]. 32-bit OP-V: opcode=1010111, funct3=010, funct6=100100.
vd receives SEW-bit integer vector elements, not comparison-mask bits; vs2 supplies SEW-bit vector elements. vs1 supplies same-index SEW-bit vector elements; equal sources read equal initial values.
Treat both sources as unsigned; write the high SEW bits of the 2×SEW product. This is not multiply-accumulate, and does not round under vxrm or saturate.
Active elements satisfy vstart≤i<vl and either vm=1 or v0.mask[i]=1. Prestart is preserved; vma/vta govern inactive/tail preservation or permitted all-ones values. vstart≥vl (including vl=0) updates no destination elements.
Same-width source/destination overlap is legal. EEW=SEW and EMUL=LMUL; EMUL=2/4/8 groups align to their size. An ordinary masked vd cannot include v0, and v0 cannot supply both an EEW=1 mask and SEW data. Require the extension, valid supported vtype, and non-Off mstatus.VS; with H and virtualization V=1, vsstatus.VS must also be non-Off. The animation fixes LMUL=m1, VLEN=4096 and vstart=0, showing body elements only; steps are not processor cycles.
Assume enabled V/VS, valid e8,m1, VLEN≥128, vl=4, vstart=0, ta/ma and initialized sources; v0.t is used. v8=[0xff,2,0x80,7], v12=[3,3,3,3], v0.mask[0..3]=[1,0,1,1] → v4=[0x02,policy,0x01,0x00]. Both sources are unsigned. policy retains old values or permits all ones; tails are not guaranteed zero.
Assume enabled V/VS, valid e8,m1, VLEN≥128, vl=4, vstart=0, ta/ma and initialized sources; v0.t is used. v8=[0xff,2,0x80,7], v12=[3,3,3,3], v0.mask[0..3]=[1,0,1,1] → v4=[0x02,policy,0x01,0x00]. Both sources are unsigned. policy retains old values or permits all ones; tails are not guaranteed zero.
VMULHU.VV writes only the high SEW bits to an SEW-width vd. VWMUL* writes the full 2*SEW widening product.
No. This instruction writes only the selected high SEW bits from the current multiply; use VMACC/VWMACC-family multiply-accumulate instructions when accumulation is required.