The RV32I register file holds 32-bit integers. S and U interpret a value as signed or unsigned. Comparisons write 1 for true and 0 for false. Each instruction advances the PC by 4 unless it branches, jumps, or stops.
Notation and execution details
rd is the destination register. rs1 and rs2 supply their values from before the clock edge. Register x0 always reads as zero. Results retain the low 32 bits.
imm is a sign-extended 12-bit value. imm20 supplies the upper 20 bits, and shamt ranges from 0 to 31. A signed right shift copies the sign bit into the high bits.
M8, M16, and M32 access a byte, halfword, or word in little-endian data memory. Halfwords need 2-byte alignment and words need 4-byte alignment. A misaligned access stops before the write edge.
A branch or jump label names a target address. A numeric target gives a byte offset from the instruction’s PC. A taken target needs 4-byte alignment. jal target uses ra as its destination. jalr rs means jalr ra, 0(rs).
The fence masks select input (i), output (o), memory reads (r), or memory writes (w). A mask of 0 selects none. Plain fence uses iorw for both masks.