Are vrgather.vv indexes byte offsets?
No. The index selects a vs2 element number; byte offsets belong to indexed load/store, not register gather.
Gather vector elements from vs2 using per-lane indexes from vs1.
VRGATHER.VV uses each SEW-width element of vs1 as an element index, selects that element from vs2, and writes it to vd; an index greater than or equal to VLMAX produces zero.
Starts from OP-V encoding fields, then shows how VRGATHER uses the second source as element indexes, gathers from vs2 within VLMAX, and writes zero for out-of-range indexes.
Require V 1.0, enabled vector state and valid supported vtype/SEW; fix LMUL=m1 and vstart=0. This teaching configuration has VLEN=VLMAX×SEW=256; changing SEW/VLMAX switches configurations. Sources may be read beyond vl but below VLMAX; indexes ≥VLMAX return zero. vd must not overlap any source. Indexes are unsigned. Masked vd cannot be v0; v0 cannot supply both mask and SEW data. Enter nonnegative element bit patterns. VL=0 leaves vd unchanged. Only body is shown; no definite inactive/tail values. Teaching stages are not processor cycles.
vrgather.vv uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 field in one encoding strip.
This animation shows OP-V field decode, active-element reads, indexed gather, mask control, and vd writeback. These are teaching stages; they do not model pipelines, caches, or timing.
vrgather.vv treats each active lane's vs1 element as an element index and reads vs2[index]; indexes at or above VLMAX write zero.
Syntax: vrgather.vv vd, vs2, vs1[, v0.t]; omit the mask for vm=1, include v0.t for vm=0. 32-bit OP-V: opcode=1010111, funct3=000 (OPIVV), funct6=001100.
Each unsigned SEW-width vs1 element is an element index. Sources may be read beyond vl but below VLMAX; indexes ≥VLMAX return zero. No memory is accessed.
Active body satisfies vstart≤i<vl with the mask enabled. Inactive/tail follow vma/vta: retain or agnostic, without a fixed value to rely on. vl=0 updates no destination elements.
vd must not overlap any source vector register group; such encodings are reserved. Masked vd cannot be v0; v0 cannot provide both the EEW=1 mask and SEW data. Group starts align to EMUL, EMUL≤8.
Require V 1.0, enabled vector state and valid supported vtype/SEW. The animation fixes m1 and vstart=0; VLMAX×SEW gives the current teaching configuration's VLEN. Steps are not processor cycles.
Assume enabled V/VS, valid m1, supported SEW, VLEN=128, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, VLMAX=16, v12=[10,20,30,40,...], v4=[3,0,16,1] → v8=[40,10,0,20]. Inactive/tail follow vma/vta; vl=0 leaves vd unchanged.
Assume enabled V/VS, valid m1, supported SEW, VLEN=128, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, VLMAX=16, v12=[10,20,30,40,...], v4=[3,0,16,1] → v8=[40,10,0,20]. Inactive/tail follow vma/vta; vl=0 leaves vd unchanged.
No. The index selects a vs2 element number; byte offsets belong to indexed load/store, not register gather.