Webcentive RISC-V Reference

vse8.v

Vector 8-bit unit-stride store

Extension
V
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
vse8.v vs3, (xs1), vm
Length
32-bit

Encoding

31292827262524201915141211760
000000vm00000rs1000vs30100111

Match 0x00000027, mask 0xfdf0707f. Source: vse8.v nf 28=0 27..26=0 vm 24..20=0 rs1 14..12=0x0 vs3 6..0=0x27 (nf=0, expanded as riscv-opcodes does) in riscv-opcodes/extensions/rv_v.

FieldBitsriscv-opcodes name
vm25vm
rs119:15rs1
vs311:7vs3

Description

Stores 8-bit elements from vector register vs3 to memory starting at address in xs1 register, using vector mask vm. The effective element width is 8 bits regardless of SEW setting.

Description from riscv-unified-db, reformatted.

Operation

XReg virtual_address = X[xs1];
# "A simple in-order implementation can ignore the settings and simply execute all vector instructions using the undisturbed policy"
for (U32 i = CSR[vstart].VALUE; i < CSR[vl].VALUE; i++) {
  U32 start_bit_pos = i * 8;
  U32 end_bit_pos = start_bit_pos + 7;
  write_memory(8, virtual_address + i, V[vs3][end_bit_pos:start_bit_pos], $encoding);
}
CSR[vstart].VALUE = 0;

Pseudocode in riscv-unified-db’s IDL, quoted unchanged.

Specification and related pages