vle8.v
Vector 8-bit unit-stride load
- Extension
- V
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
vle8.v vd, (xs1), vm- Length
- 32-bit
Encoding
| 3129 | 28 | 2726 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000 | 0 | 00 | vm | 00000 | rs1 | 000 | vd | 0000111 | |||||||||||||||||||||||
Match 0x00000007, mask 0xfdf0707f. Source: vle8.v nf 28=0 27..26=0 vm 24..20=0 rs1 14..12=0x0 vd 6..0=0x07 (nf=0, expanded as riscv-opcodes does) in riscv-opcodes/extensions/rv_v.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vm | 25 | vm |
| rs1 | 19:15 | rs1 |
| vd | 11:7 | vd |
Description
Loads 8-bit elements from memory starting at address in xs1 register, using vector mask vm, and stores results in vector register vd. The effective element width is 8 bits regardless of SEW setting. Supports vector masking and follows vector tail policy.
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;
V[vd][end_bit_pos:start_bit_pos] = read_memory(8, virtual_address + i, $encoding)[7:0];
}
CSR[vstart].VALUE = 0;Pseudocode in riscv-unified-db’s IDL, quoted unchanged.