CSR Bit Fields

RISC-V vcsr CSR Register

Address 0x00FPrivilege User/VectorAccess RW / XLENUser vector state CSRs

vcsr combines vector fixed-point control state, including the vxrm rounding mode and vxsat saturation flag.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
Reserved63:3VXRM2:1RWVXSAT0RW
Field Map

Understand vcsr By Bit Fields

2 key fields
0

VXSAT

RW

Vector fixed-point saturation flag

VXSAT (bit 0) — Vector fixed-point saturation flag.

What This Field Controls

  • - Vector fixed-point saturation flag

Common Values

00

No fixed-point saturation event has been accrued.

11

At least one fixed-point instruction result saturated.

Open Official Manual
2:1

VXRM

RW

Vector fixed-point rounding mode

VXRM (bits 2:1) — Vector fixed-point rounding mode.

What This Field Controls

  • - Vector fixed-point rounding mode

Common Values

0RNU

Round to nearest up; add 0.5 LSB.

1RNE

Round to nearest even.

2RDN

Round down; no rounding increment.

3ROD

Round to odd, also called jam.

Open Official Manual
Official Basis & Search Notes

vcsr is a RW CSR in user vector state csrs at 0x00F. Check privilege and implemented extensions before interpreting its bit fields.

vcsr address, lowest access privilege, and access class are checked against the official CSR table: 0x00F, User/Vector, RW.
vcsr belongs to vector-extension state; it has the corresponding software meaning only when the relevant vector extension is implemented.
Modify only target fields and preserve unchanged bits; interpret WPRI and reserved fields only as the official specification and implementation define them.

What To Check First When Reading This CSR

  • - First confirm that the current hart implements vcsr; unimplemented or insufficiently privileged accesses raise an illegal-instruction exception.
  • - Use address 0x00F and the lowest access privilege (User/Vector) to decide whether software may read it directly.
  • - Do not assume fixed values for reserved, WARL, or WLRL bits; interpret the value according to the specification and implementation.

Risk Checks Before Writing

  • - Preserve bits that are not being changed so reserved or implementation-defined fields are not written with invalid values.
  • - Prefer CSRRS/CSRRC for local set/clear operations to avoid CSRRW overwriting concurrently updated status bits.

Put It Back Into A Real Flow

1

During initialization or the relevant privileged flow, software reads vcsr to observe the current state.

2

Modify only the target fields while preserving all other bits.

3

Read back the CSR or validate through later trap, interrupt, or context-switch behavior that the setting took effect.

FAQ

Can vcsr be accessed from any privilege level?

Do not decide from the CSR name alone. The official CSR address encoding and tables define the lowest access privilege; this entry records vcsr as User/Vector. Access with insufficient privilege or to an unimplemented CSR raises an illegal-instruction exception.

What is easiest to miss when writing vcsr?

Do not overwrite the whole CSR as if it were an ordinary integer. Modify only target fields, preserve unchanged bits, and follow the specification for WARL, WLRL, WPRI, or reserved fields.