What unit does VLSE32.V use for stride?
The stride is the byte count in x[rs2]. It is not an element count and is not implicitly multiplied by EEW again; if encoded as rs2=x0, x0 is always 0.
Load 32-bit vector elements into vd using byte stride x[rs2] from base x[rs1].
VLSE32.V is a RISC-V V 32-bit strided vector load. Active body elements use address x[rs1] plus the lane index times x[rs2]; x[rs2] is a byte-count stride and may represent positive, negative, or zero stride. With vm=0, v0.t selects elements, and masked-off elements do not access memory.
Decode the 32-bit strided load, then compute each element address as x[rs1] + i * x[rs2] (16 bytes).
Teaching context: XLEN=64, VLEN=4096, SEW=32, LMUL=m1, VLMAX=128, data EMUL=m1, valid vtype, enabled VS, vstart=0, and ta/ma. All selected accesses are assumed successful; traps are not modeled. Unaligned accesses apply only where the environment supports them. rs1=x0 fixes the base at 0. The memory elements input gives the value observed by each active read, allowing memory to change between accesses; it is not a static byte-memory image. The rs2=x0 example selects the permitted execution with one read per active element. Per-element steps do not represent processor cycles or actual access order; strided accesses are unordered. Inactive/tail “-” means the result is not shown and may retain the old value or become all ones. VL=0 leaves the destination unchanged; normal completion resets vstart=0.
The animation starts from the 32-bit vector memory encoding and shows the official bit fields: nf, mew, mop, vm, rs2/vs2 or lumop/sumop, width, register fields, and opcode.
VLSE32.V is an RVV 32-bit strided vector load: each active element uses memory address x[rs1] plus the lane index times x[rs2], where x[rs2] is a byte stride. vl and the v0.t mask decide which body elements participate in memory access.
Syntax: vlse32.v vd, (rs1), rs2[, v0.t]; omitted v0.t gives vm=1, included gives vm=0. vd is a vector group, rs1 an integer base register, with base 0 for x0. 32-bit LOAD-FP: opcode=0000111, nf=000, mew=0, mop=10, width=110.
Data EEW=32, EMUL=(32/SEW)×LMUL. rs2 selects an integer register; address=x[rs1]+i×x[rs2]. The byte stride may be positive, negative, or zero, without scaling by 4.
The data width must be supported, EMUL in 1/8..8, and group starts legal. rs2=x0 permits fewer accesses than active elements; rs2≠x0 with value 0 requires one access per active element.
V 1.0 supports RV32/RV64; require valid vtype and enabled VS. Only elements with vstart≤i<vl and enabled masks access memory; masked vd cannot overlap v0. Prestart stays unchanged, inactive/tail follow vma/vta, and agnostic elements may retain old values or become all ones.
These strided and unordered indexed forms do not guarantee element access order. Misalignment may succeed or raise an address-misaligned exception; addresses must also satisfy access permissions. VL=0 or vstart≥vl updates no destination; normal completion resets vstart=0 and leaves vl unchanged.
Assume enabled V/VS, supported widths, VLEN≥128, x10=0x8000, x11=4, and successful memory accesses; vsetvli gives vl=4, vstart=0, ta/ma. e32,m1; x5=16; v0.mask=[1,0,1,1]; addresses=[0x8000,0x8010,0x8020,0x8030]; active reads (i=0,2,3)=[10,30,40] → v8=[10,agnostic,30,40]. Disabled elements make no memory access. Agnostic elements may retain old values or become all ones; tails are not guaranteed zero. The address list is not an access-order guarantee.
Assume enabled V/VS, supported widths, VLEN≥128, x10=0x8000, x11=4, and successful memory accesses; vsetvli gives vl=4, vstart=0, ta/ma. e32,m1; x5=16; v0.mask=[1,0,1,1]; addresses=[0x8000,0x8010,0x8020,0x8030]; active reads (i=0,2,3)=[10,30,40] → v8=[10,agnostic,30,40]. Disabled elements make no memory access. Agnostic elements may retain old values or become all ones; tails are not guaranteed zero. The address list is not an access-order guarantee.
Assume enabled V/VS, supported widths, VLEN≥128, x10=0x8000, x11=4, and successful memory accesses; vsetvli gives vl=4, vstart=0, ta/ma. e32,m1; x5=16; v0.mask=[1,0,1,1]; addresses=[0x8000,0x8010,0x8020,0x8030]; active reads (i=0,2,3)=[10,30,40] → v8=[10,agnostic,30,40]. Disabled elements make no memory access. Agnostic elements may retain old values or become all ones; tails are not guaranteed zero. The address list is not an access-order guarantee.
The stride is the byte count in x[rs2]. It is not an element count and is not implicitly multiplied by EEW again; if encoded as rs2=x0, x0 is always 0.
Unit-stride access advances by consecutive 4-byte elements; VLSE32.V uses byte stride x[rs2], so it can access structure fields, matrix columns, or reverse sequences.
Yes. rs2=x0 directly encodes the x0 zero-stride form; the ISA permits implementations to perform fewer than one memory operation per active element for that form. If rs2 is not x0 but its register value is 0, the ordinary strided-access semantics still apply.
No. With vm=0, a body element whose v0.t bit is 0 does not perform that element's load memory access.