Does VLM.V load SEW-width elements?
No. It loads packed mask bytes and maps each bit to one mask element.
Load ceil(vl/8) contiguous bytes from x[rs1] and write the packed bits into the destination mask register.
VLM.V is the RISC-V V extension unit-stride mask load. It reads a packed mask representation as bytes, with an access size of ceil(vl/8) bytes; mask bit i comes from bit i mod 8 of byte floor(i/8). The instruction loads mask bits, not ordinary vector data elements using the current SEW.
Decode the packed mask load, then compute each element address as x[rs1] + floor(i/8).
Teaching context: VLEN=4096, SEW=8, LMUL=m1, VLMAX=512, valid vtype, enabled VS, vstart=0, and no access faults. Fixed EEW=8 and EMUL=1; rs1=x0 fixes the base at 0. VL=0 leaves the destination unchanged; otherwise load all ceil(VL/8) bytes (including every bit of the last byte). Tails beyond the byte transfer are tail-agnostic, without guaranteed zeros. Per-bit steps explain the mapping, not access order or processor cycles.
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.
VLM.V restores a packed bitmap from memory into a mask register: with VL=16 it reads only 2 bytes, one bit per lane.
Syntax: vlm.v vd, (rs1), without a v0.t execution mask; vm=1. 32-bit LOAD-FP: opcode=0000111, nf=000, mew=0, mop=00, width=000, lumop=01011.
vd is any single v0–v31 with fixed EEW=8 and EMUL=1. x[rs1] supplies the base, with x0 always 0. Read ceil(vl/8) contiguous bytes, including the whole last byte.
Mask bit i maps to bit i mod 8 of byte floor(i/8). Tails beyond the byte transfer are always tail-agnostic regardless of vta, without guaranteed zeroing.
Require enabled V/VS and valid vtype; vill and vtype constraints on vl still apply. vstart counts bytes; earlier bytes stay unchanged. vstart≥ceil(vl/8) or vl=0 leaves the destination unchanged. Normal completion resets vstart=0.
Assume enabled V/VS, valid e8,m1, VLEN≥128, vl=9, vstart=0, a0=0x8000, and readable memory bytes [0x81,0x03]. VLM.V reads ceil(9/8)=2 bytes into v0: mask bits 0, 7, 8, and 9 are 1; other loaded bits are 0. Bit 9 is beyond vl but remains part of the loaded last byte. Tails beyond the byte transfer are agnostic, without guaranteed zeros.
Assume enabled V/VS, valid e8,m1, VLEN≥128, vl=9, vstart=0, a0=0x8000, and readable memory bytes [0x81,0x03]. VLM.V reads ceil(9/8)=2 bytes into v0: mask bits 0, 7, 8, and 9 are 1; other loaded bits are 0. Bit 9 is beyond vl but remains part of the loaded last byte. Tails beyond the byte transfer are agnostic, without guaranteed zeros.
Assume enabled V/VS, valid e8,m1, VLEN≥128, vl=9, vstart=0, a0=0x8000, and readable memory bytes [0x81,0x03]. VLM.V reads ceil(9/8)=2 bytes into v0: mask bits 0, 7, 8, and 9 are 1; other loaded bits are 0. Bit 9 is beyond vl but remains part of the loaded last byte. Tails beyond the byte transfer are agnostic, without guaranteed zeros.
No. It loads packed mask bytes and maps each bit to one mask element.
Because each mask element occupies one bit, so VL mask bits are rounded up to a whole number of bytes.