vlenb
Vector register length in bytes
- Address
0xC22- Group
- Unprivileged and user-level CSRs
- Privilege
URO(privileged spec CSR listing, Unprivileged Vector CSRs)- Access
- read-only; lowest privilege U (user/unprivileged)
- Address range
- Standard read-only
- Name in riscv-unified-db
- Vector Byte Length
Privileged spec: Vector register length in bytes
Description
Holds the value VLEN/8, the vector register length in bytes.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
VALUE | RV32 31-0 / RV64 63-0 | RO | The value in vlenb is a design-time constant in any implementation. Without this CSR, several instructions are needed to calculate VLEN in bytes, and the code has to disturb current vl and vtype settings which require them to be saved and restored. |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/V/vlenb.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)