Home / Learn / Processor Architecture / RISC-V ISA Extensions Explained

On this pageThe idea of a modular ISAThe base instruction setsThe standard single-letter extensionsNamed extensionsReading a RISC-V nameThe vector extensionPrivileged architectureCustom extensionsThe fragmentation problemProfilesHow extensions are createdChoosing extensions for a designCommon questionsRelated guidesRelated guides

RISC-V ISA Extensions Explained

RISC-V is built from a small base instruction set plus optional extensions. The base provides only essential integer operations. Extensions add capabilities such as multiplication, floating-point arithmetic, compressed code and vector processing. A designer picks the extensions a processor needs and leaves out the rest. This modularity is what lets RISC-V scale from tiny controllers to large processors, and it is also the source of its main compatibility challenge.

The idea of a modular ISA

Most instruction set architectures grew by accumulation, with each generation adding features that all later processors had to carry. RISC-V takes a different approach. Its mandatory core is frozen and minimal. Everything else is optional and defined separately.

A small sensor controller can implement just the base. A server processor can implement dozens of extensions. Both are RISC-V.

The base instruction sets

BaseDescription
RV32I32-bit integer base
RV64I64-bit integer base
RV32E and RV64EReduced versions with fewer registers, for very small devices

The I stands for integer. The base contains a few dozen instructions for arithmetic, logic, memory access and control flow. It has no multiplication, no floating point and nothing else beyond the essentials.

The standard single-letter extensions

LetterAdds
MInteger multiplication and division
AAtomic operations, needed for multiprocessor software
FSingle-precision floating point
DDouble-precision floating point
CCompressed 16-bit instructions that reduce code size
VVector operations
BBit manipulation
HHypervisor support for virtualization

The combination of the base with M, A, F and D, plus two small supporting extensions, is abbreviated G, for general purpose. A processor described as RV64GC is a 64-bit core with the general-purpose set and compressed instructions. That combination became the common baseline for running full operating systems.

Named extensions

As RISC-V grew, single letters ran out, and newer extensions have longer names.

  • Names beginning with Z are standard extensions for unprivileged features. Examples include individual parts of bit manipulation, cryptography instructions, half-precision floating point and cache management.
  • Names beginning with S are standard extensions for supervisor-level features used by operating systems, such as advanced interrupt and memory management.
  • Names beginning with X are non-standard extensions defined by a vendor.

A full description of a modern RISC-V processor can list dozens of these.

Reading a RISC-V name

A processor’s capabilities are written as a string. Take RV64IMAFDCV as an example.

  • RV64 means the 64-bit base.
  • I is the integer base.
  • M, A, F, D add multiply, atomics and floating point.
  • C adds compressed instructions.
  • V adds vectors.

Longer named extensions follow, separated by underscores.

The vector extension

The V extension deserves special mention. It lets a single instruction operate on many data values at once, which is essential for AI, scientific computing and media processing. Unusually, it does not fix the vector length. The same software runs on processors with short or long vectors.

Privileged architecture

Alongside the instructions available to ordinary programs, RISC-V defines a privileged architecture: the features that operating systems and firmware use to control the machine.

  • Machine mode is the highest privilege level and always present. Firmware runs here.
  • Supervisor mode is used by operating systems.
  • User mode is used by applications.

The privileged specification also covers interrupts, memory protection and virtual memory. A simple embedded processor may implement only machine mode. A processor meant to run a full operating system implements all three.

Custom extensions

RISC-V reserves parts of its instruction encoding space for designers’ own use. A company can add instructions for its particular application: a specialized arithmetic operation, a signal-processing function or an interface to an attached accelerator.

Standard software continues to run unchanged. Only code that wants the custom instructions needs to know about them.

This is one of RISC-V’s main attractions for specialized chips. The cost is that custom instructions need their own compiler and tool support, which the designer must provide.

The fragmentation problem

Freedom to choose creates a risk. If every processor implements a different mix of extensions, software compiled for one may not run on another. Operating system distributors and application developers cannot realistically build and test a separate version for each.

In a closed embedded product this does not matter, because the designer controls all the software. For general-purpose computing it is a serious obstacle.

Profiles

RISC-V International’s answer is profiles. A profile names a specific set of extensions that a processor must implement. Software can then be built for a profile and will run on any processor that conforms to it.

Application-class profiles are named with RVA followed by a year-based number, such as RVA22 and RVA23. Each is a superset of the one before, adding extensions that have matured. RVA23, for example, makes the vector extension mandatory. Operating systems and compilers increasingly target these profiles.

A complementary effort defines platform specifications covering firmware and other system-level conventions, so that an operating system image can boot on different vendors’ hardware.

How extensions are created

New extensions are developed in working groups within RISC-V International, with participation from member companies and researchers. A proposal passes through drafting and review, and requires implementations and software support before it is ratified. Once ratified, an extension is frozen. This stability is intended to ensure software written today keeps working.

Choosing extensions for a design

  • What software will run? A full operating system implies a recognized profile.
  • What does the workload need? Floating point, vectors or cryptography add area and should be justified.
  • How constrained are area and power? Each extension has a hardware cost.
  • Is custom acceleration worthwhile? Weigh the performance gain against the software effort.
  • What do the tools support?

Common questions

What does RV64GC mean?

A 64-bit RISC-V processor with the general-purpose set of extensions (integer, multiply, atomics and floating point) plus compressed instructions. It was the usual baseline for systems running a full operating system.

Are RISC-V extensions mandatory?

No. Only the base is mandatory. All extensions are optional, though profiles define sets that a processor must implement to claim conformance with that profile.

Can a company add its own instructions to RISC-V?

Yes. The architecture reserves encoding space for custom extensions. They do not affect compatibility with standard software.

Related guides

Related guides in other topics