4 Volume I: RISC-V User-Level ISA V2.1
RISC processors except with no branch delay slots and with support for optional variable-length
instruction encodings. The base is carefully restricted to a minimal set of instructions sufficient
to provide a reasonable target for compilers, assemblers, linkers, and operating systems (with
additional supervisor-level operations), and so provides a convenient ISA and software toolchain
“skeleton” around which more customized processor ISAs can be built.
Each base integer instruction set is characterized by the width of the integer registers and the
corresponding size of the user address space. There are two primary base integer variants, RV32I
and RV64I, described in Chapters 2 and 4, which provide 32-bit or 64-bit user-level address spaces
respectively. Hardware implementations and operating systems might provide only one or both of
RV32I and RV64I for user programs. Chapter 3 describes the RV32E subset variant of the RV32I
base instruction set, which has been added to support small microcontrollers. Chapter 19 describes
a future RV128I variant of the base integer instruction set supporting a flat 128-bit user address
space.
Although 64-bit address spaces are a requirement for larger systems, we believe 32-bit address
spaces will remain adequate for many embedded and client devices for decades to come and will
be desirable to lower memory traffic and energy consumption. In addition, 32-bit address spaces
are sufficient for educational purposes. A larger flat 128-bit address space might eventually be
required, so we ensured this could be accommodated within the RISC-V ISA framework.
The base integer ISA may be subset by a hardware implementation, but opcode traps and software
emulation by a more privileged layer must then be used to implement functionality not provided
by hardware.
Subsets of the base integer ISA might be useful for pedagogical purposes, but the base has been
defined such that there should be little incentive to subset a real hardware implementation beyond
omitting support for misaligned memory accesses and treating all SYSTEM instructions as a
single trap.
RISC-V has been designed to support extensive customization and specialization. The base integer
ISA can be extended with one or more optional instruction-set extensions, but the base integer
instructions cannot be redefined. We divide RISC-V instruction-set extensions into standard and
non-standard extensions. Standard extensions should be generally useful and should not conflict
with other standard extensions. Non-standard extensions may be highly specialized, or may conflict
with other standard or non-standard extensions. Instruction-set extensions may provide slightly
different functionality depending on the width of the base integer instruction set. Chapter 10
describes various ways of extending the RISC-V ISA. We have also developed a naming convention
for RISC-V base instructions and instruction-set extensions, described in detail in Chapter 11.
To support more general software development, a set of standard extensions are defined to provide
integer multiply/divide, atomic operations, and single and double-precision floating-point arith-
metic. The base integer ISA is named “I” (prefixed by RV32 or RV64 depending on integer reg-
ister width), and contains integer computational instructions, integer loads, integer stores, and
control-flow instructions, and is mandatory for all RISC-V implementations. The standard integer
multiplication and division extension is named “M”, and adds instructions to multiply and divide
values held in the integer registers. The standard atomic instruction extension, denoted by “A”,
adds instructions that atomically read, modify, and write memory for inter-processor synchroniza-
tion. The standard single-precision floating-point extension, denoted by “F”, adds floating-point
registers, single-precision computational instructions, and single-precision loads and stores. The