Does atomic here mean a memory atomic?
No. In Zicsr, atomic means the CSR read and write are performed by one CSR instruction, not an AMO to a memory address.
Read the old CSR value into rd and write the zero-extended 5-bit uimm to the CSR; rd=x0 suppresses the CSR read
CSRRWI is the immediate form of CSRRW: it reads the old CSR value, zero-extends it to XLEN for rd, then writes the zero-extended 5-bit unsigned uimm to the target CSR. If rd=x0, the instruction does not read the CSR and causes no CSR read side effects; regardless of whether uimm is 0, the write still follows CSRRWI semantics.
Shows the Zicsr CSR read-modify-write flow: decode the SYSTEM encoding, read the CSR, compute write/set/clear semantics, then update rd and the CSR.
Assume an implemented, accessible CSR with ordinary writable example bits. A read-only CSR write attempt shows an exception without committing results.
The CSR name/address is part of the instruction syntax; the old CSR value and rs1 example value are execution context. The example calculation treats displayed bits as writable; a concrete CSR's writable bits, readback value, and field side effects follow that CSR's specification.
CSRRWI is a Zicsr I-type SYSTEM instruction; the CSR address occupies bits 31..20.
The bit view shows the CSR value computation at the selected XLEN.
This animation shows only Zicsr ISA-visible CSR reads/writes, side-effect suppression, and bit-mask semantics; it does not model concrete CSR field meanings, trap handlers, pipelines, or timing.
CSRRWI uses a 5-bit uimm as the source value written to the CSR. rd=x0 means no CSR read; uimm=0 still means write zero.
Assume implemented, accessible custom CSR 0x7c0 with ordinary writable example bits and old CSR=0xa: csrrwi x5,0x7c0,3 → x5=0xa, CSR=3
Assume implemented, accessible custom CSR 0x7c0 with ordinary writable example bits and old CSR=0xa: csrrwi x5,0x7c0,3 → x5=0xa, CSR=3
No. In Zicsr, atomic means the CSR read and write are performed by one CSR instruction, not an AMO to a memory address.
No. rd=x0 suppresses the CSR read only for CSRRW/CSRRWI; rs1=x0 or uimm=0 suppresses the CSR write only for CSRRS/CSRRC and their immediate forms.