How does an all-zero mask differ from vl=0?
With vl>0 and all source elements masked off, vd[0] still receives the vs1[0] seed. With vl=0, the destination is entirely unchanged and the seed is not copied.
VWREDSUMU.VS zero-extends active SEW elements and sums them with a 2*SEW seed; when vl>0, the result is written to vd[0].
VWREDSUMU.VS is a V 1.0 unsigned widening sum reduction. vs2 elements are SEW wide; the vs1[0] seed and vd[0] result are 2*SEW wide. Active source elements are zero-extended before summation, with overflow wrapping at 2*SEW. With vl>0, an all-zero mask still writes the seed; vl=0 leaves the destination unchanged. Nonzero vstart raises an illegal-instruction exception.
Starts from OP-V encoding fields, then shows how VWREDSUMU uses vs1[0] as the seed, reduces only active vs2 elements, and writes the 2*SEW-wide widening result to vd[0].
Teaching context: V 1.0, enabled vector state, valid supported vtype, LMUL=m1, VLEN=4096, vstart=0. Require SEW and 2*SEW support; SEW=64 needs additional 128-bit integer elements. Enter nonnegative bit patterns; zero-extend unsigned SEW vs2 values and add the 2*SEW seed, wrapping at 2*SEW without saturation or vxsat change. vs1[0] and vd[0] are wide scalars in single registers with EMUL=1; any v0-v31 may be vd, overlapping sources or the mask. vs2 and vs1 cannot read the same register at different EEWs; v0 cannot supply mask and data together. With VL>0, an all-zero mask still writes the seed; VL=0 updates nothing. Other destination elements are tails normally governed by vta; legal different-EEW source/destination overlap forces tail-agnostic behavior. No definite tail values are displayed. Nonzero vstart raises an illegal-instruction exception; stages are not processor cycles.
vwredsumu.vs 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, vs1[0]-seeded reduction integer unsigned widening sum reduction, mask participation filtering, and vd[0] writeback. It does not model pipelines, caches, or timing.
VWREDSUMU.VS zero-extends active SEW elements and sums them with a 2*SEW seed; when vl>0, the result is written to vd[0].
vs2 is a SEW/LMUL vector source. The 2*SEW seed vs1[0] and result vd[0] each occupy element 0 of any single vector register, with EMUL=1.
32-bit OP-V: opcode=1010111, funct6=110000, funct3=000 (OPIVV); vm bit25, vs2 bits24:20, vs1 bits19:15, vd bits11:7. Optional v0.t means vm=0; omission means vm=1.
Zero-extend active vs2 elements, add the wide seed and wrap at 2*SEW. With vl>0, only vd[0] holds the result and other elements are tails. An all-zero mask still writes the seed; vl=0 updates nothing. Nonzero vstart raises an illegal-instruction exception.
vd may overlap sources or v0. vs2 and vs1 cannot read one register with different EEWs; v0 cannot supply both EEW=1 mask and data. Other destination elements normally follow vta; legal different-EEW source/destination overlap forces tail-agnostic behavior.
RV32/RV64 V 1.0; require enabled vector state, vill=0, supported SEW and 2*SEW. SEW=64 needs additional 128-bit integer elements. No saturation, vxrm use or vxsat change; success resets vstart=0. The animation fixes LMUL=m1, VLEN=4096, vstart=0; stages are not processor cycles.
Assume enabled V/VS, valid supported e8,m1,tu,mu, supported 16-bit results, VLEN=4096, XLEN=64, vl=4, vstart=0; v0.mask[0..3]=1111. v12=[255,1,0,0], v4[0]=65535 → v8[0]=255 (0x00ff). Other destination elements are tails and retain old values. Success resets vstart=0.
Assume enabled V/VS, valid supported e8,m1,tu,mu, supported 16-bit results, VLEN=4096, XLEN=64, vl=4, vstart=0; v0.mask[0..3]=1111. v12=[255,1,0,0], v4[0]=65535 → v8[0]=255 (0x00ff). Other destination elements are tails and retain old values. Success resets vstart=0.
Assume enabled V/VS, valid supported e8,m1,tu,mu, supported 16-bit results, VLEN=4096, XLEN=64, vl=4, vstart=0; v0.mask[0..3]=1111. v12=[255,1,0,0], v4[0]=65535 → v8[0]=255 (0x00ff). Other destination elements are tails and retain old values. Success resets vstart=0.
With vl>0 and all source elements masked off, vd[0] still receives the vs1[0] seed. With vl=0, the destination is entirely unchanged and the seed is not copied.
Assume a supported configuration, vstart=0, vl=2, unmasked, vs2=[255,1], and a 16-bit seed of 65535. (65535+255+1) mod 65536 = 255, so vd[0]=0x00ff. Other destination elements are tails.