Is v0 an execution mask in VMADC.VVM?
No. The corresponding v0 bit is carry-in arithmetic input.
VMADC computes each body element's carry-out and writes the Boolean result to the destination mask register.
VMADC.VVM is the RISC-V V extension vector-vector add carry-out instruction. It fixes vm=0 and does not write a SEW-width integer result. Every body element writes the carry-out of vs2[i] + vs1[i] + v0[i] as one destination mask bit. v0 is carry-in arithmetic input, not an ordinary v0.t execution mask, so a body element still executes when v0[i] is 0.
Starts from OP-V encoding fields, then shows how VMADC uses each v0 bit as carry-in and writes each carry-out as a destination mask bit.
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. VMADC mask destinations are always tail-agnostic; tails are not guaranteed to be preserved, while VL=0 updates no destination bits, including tails. With LMUL=m1, vd may equal a SEW data source; with carry-in, v0 cannot also be a SEW data source, but vd may be v0. 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.
vmadc.vvm 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, SEW-width integer carry-out generation, v0 carry/borrow input, and vd writeback. It does not model pipelines, caches, or timing.
VMADC generates carry bits for multiword addition: v0 supplies the input bit and vd.mask[i] stores the output bit.
32-bit OP-V: opcode=1010111, funct6=010001, funct3=000 (OPIVV), vm=0. vd is a single mask destination with one bit per element; vs2 is the SEW data source.
vs1 supplies the same-lane SEW-bit second source; equal vector sources have one initial value.
Fixed vm=0 uses v0 bit i as carry-in arithmetic input. All body elements execute, including where v0[i]=0. Syntax uses v0, not v0.t.
Add both SEW-bit sources as unsigned values and add v0[i]; vd.mask[i]=1 iff the sum≥2^SEW, otherwise 0. No SEW-wide sum is written; mask bit i is vd bit i, independent of SEW/LMUL.
Source/destination register-group overlap rules apply: masks have EEW=1; a narrower destination must start at the source group's low end. With carry-in, v0 cannot also be a SEW data source, but the mask destination may be v0. The animation fixes LMUL=m1, so vd may equal a data source.
Require V 1.0, enabled vector state, valid vtype, and support for the selected width. Body is vstart≤i<vl; prestart stays unchanged and mask tails are always agnostic, regardless of vta. VL=0 or vstart≥vl updates no destination bits, including tails. The animation fixes VLEN=4096 and vstart=0 and shows only body bits.
Assume V, valid e8,m1, vl=1, vstart=0 and initialized sources: vs2[0]=255 and the second source is 1, with v0.mask[0]=1. The sum is 257, so destination mask bit 0 is 1. No integer sum is written and tails are not guaranteed to be preserved.
Assume V, valid e8,m1, vl=1, vstart=0 and initialized sources: vs2[0]=255 and the second source is 1, with v0.mask[0]=1. The sum is 257, so destination mask bit 0 is 1. No integer sum is written and tails are not guaranteed to be preserved.
Assume V, valid e8,m1, vl=1, vstart=0 and initialized sources: vs2[0]=255 and the second source is 1, with v0.mask[0]=1. The sum is 257, so destination mask bit 0 is 1. No integer sum is written and tails are not guaranteed to be preserved.
No. The corresponding v0 bit is carry-in arithmetic input.
It writes one destination mask bit for carry-out.