CSR Bit Fields

RISC-V vxrm CSR Register

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

vxrm holds the vector fixed-point rounding mode used by fixed-point rounding and narrowing operations.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
Field Map

Understand vxrm By Bit Fields

1 key fields
1:0

VXRM

RW

Fixed-point vector rounding mode.; Values: 0=RNU: Round to nearest, ties up.; 1=RNE: Round to nearest even.; 2=RDN: Round down/truncate.; 3=ROD: Round to odd.

VXRM (bits 1:0) — Fixed-point vector rounding mode.; Values: 0=RNU: Round to nearest, ties up.; 1=RNE: Round to nearest even.; 2=RDN: Round down/truncate.; 3=ROD: Round to odd.

What This Field Controls

  • - Fixed-point vector rounding mode.; Values: 0=RNU: Round to nearest, ties up.; 1=RNE: Round to nearest even.; 2=RDN: Round down/truncate.; 3=ROD: Round to odd.

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

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

vxrm address, lowest access privilege, and access class are checked against the official CSR table: 0x00A, User/Vector, RW.
vxrm 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 vxrm; unimplemented or insufficiently privileged accesses raise an illegal-instruction exception.
  • - Use address 0x00A 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 vxrm 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 vxrm 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 vxrm as User/Vector. Access with insufficient privilege or to an unimplemented CSR raises an illegal-instruction exception.

What is easiest to miss when writing vxrm?

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.