From HandWiki
Short description: Open-source CPU hardware instruction set architecture
DesignerUniversity of California, Berkeley
Bits32, 64, 128
Introduced2015; 8 years ago (2015)
EndiannessLittle[1](p9)[lower-alpha 1]
Page size4 KiB
OpenYes, royalty free
General purpose(Includes one always-zero register)
Floating point(Optional. Width depends on available extensions)

RISC-V[lower-alpha 2] (pronounced "risk-five",[1](p1)) is an open standard instruction set architecture (ISA) based on established RISC principles. Unlike most other ISA designs, RISC-V is provided under open source licenses that do not require fees to use. A number of companies are offering or have announced RISC-V hardware, open source operating systems with RISC-V support are available, and the instruction set is supported in several popular software toolchains.

As a RISC architecture, the RISC-V ISA is a load–store architecture. Its floating-point instructions use IEEE 754 floating-point. Notable features of the RISC-V ISA include instruction bit field locations chosen to simplify the use of multiplexers in a CPU,[1](p17) a design that is architecturally neutral, and most-significant bits of immediate values placed at a fixed location to speed sign extension.[1](p17)

The instruction set is designed for a wide range of uses. The base instruction set has a fixed length of 32-bit naturally aligned instructions, and the ISA supports variable length extensions where each instruction can be any number of 16-bit parcels in length.[1](pp7-10) Subsets support small embedded systems, personal computers, supercomputers with vector processors, and warehouse-scale 19 inch rack-mounted parallel computers.

The instruction set specification defines 32-bit and 64-bit address space variants. The specification includes a description of a 128-bit flat address space variant, as an extrapolation of 32 and 64 bit variants, but the 128-bit ISA remains "not frozen" intentionally, because there is yet so little practical experience with such large memory systems.[1](p41)

The project began in 2010 at the University of California, Berkeley, but now many current contributors are volunteers not affiliated with the university.[3] Unlike other academic designs which are typically optimized only for simplicity of exposition, the designers intended that the RISC-V instruction set be usable for practical computers. As of June 2019, version 2.2 of the user-space ISA[4] and version 1.11 of the privileged ISA[5] are frozen, permitting software and hardware development to proceed. The user-space ISA, now renamed the Unprivileged ISA, was updated, ratified and frozen as version 20191213.[1] An external debug specification is available as a draft, version 0.13.2.[6]


RISC-V processor prototype, January 2013

CPU design requires design expertise in several specialties: electronic digital logic, compilers, and operating systems. To cover the costs of such a team, commercial vendors of computer designs, such as Arm Ltd., Cortus and MIPS Technologies, charge royalties for the use of their designs, patents and copyrights.[7][8][9] They also often require non-disclosure agreements before releasing documents that describe their designs' detailed advantages. In many cases, they never describe the reasons for their design choices.

RISC-V was begun with a goal to make a practical ISA that was open-sourced, usable academically, and deployable in any hardware or software design without royalties.[1](p1)[10] Also, justifying rationales for each design decision of the project are explained, at least in broad terms. The RISC-V authors are academics who have substantial experience in computer design, and the RISC-V ISA is a direct development from a series of academic computer-design projects, especially Berkeley RISC. RISC-V was originated in part to aid all such projects.[1](p1)[10]

To build a large, continuing community of users and thereby accumulate designs and software, the RISC-V ISA designers intentionally support a wide variety of practical use cases: compact, performance, and low-power real-world implementations[1](pp1-2,153-154)[11] without over-architecting for a given microarchitecture.[1](p1)[12][13][14] The requirements of a large base of contributors is part of the reason why RISC-V was engineered to address many possible uses.

The designers' primary assertion is that the instruction set is the key interface in a computer as it is situated at the interface between the hardware and the software. If a good instruction set were open and available for use by all, then it can dramatically reduce the cost of software by enabling far more reuse. It should also trigger increased competition among hardware providers, who can then devote more resources toward design and less for software support.[10]

The designers maintain that new principles are becoming rare in instruction set design, as the most successful designs of the last forty years have grown increasingly similar. Of those that failed, most did so because their sponsoring companies were financially unsuccessful, not because the instruction sets were technically poor. Thus, a well-designed open instruction set designed using well-established principles should attract long-term support by many vendors.[10]

RISC-V also encourages academic usage. The simplicity of the integer subset permits basic student exercises, and is a simple enough ISA to enable software to control research machines. The variable-length ISA provides room for instruction set extensions for both student exercises and research,[1](p7) and the separated privileged instruction set permits research in operating system support without redesigning compilers.[5] RISC-V's open intellectual property paradigm allows derivative designs to be published, reused, and modified.[15]


The term RISC dates from about 1980.[16] Before then, there was some knowledge that simpler computers can be effective (e.g., John Cocke at IBM Research), but the design principles were not widely described. Simple, effective computers have always been of academic interest, and resulted in the RISC instruction set DLX for the first edition of Computer Architecture: A Quantitative Approach in 1990 of which David Patterson was a co-author, and he later participated in the RISC-V origination. DLX was intended for educational use; academics and hobbyists implemented it using field-programmable gate arrays, but it was never truly intended for commercial deployment. ARM CPUs, versions 2 and earlier, had a public-domain instruction set and are still supported by the GNU Compiler Collection (GCC), a popular free-software compiler. Three open-source cores exist for this ISA, but were never manufactured.[17][18] OpenRISC is an open-source ISA based on DLX, with associated RISC designs, and is fully supported with GCC and Linux implementations, although it too has few commercial implementations.

Krste Asanović at the University of California, Berkeley, had a research requirement for an open-source computer system, and in 2010, he decided to develop and publish one in a "short, three-month project over the summer" with several of his graduate students. The plan was to aid both academic and industrial users.[10] David Patterson at Berkeley joined the collaboration as he was the originator of the Berkeley RISC,[16] and the RISC-V is the eponymous fifth generation of his long series of cooperative RISC-based research projects. At this stage, students provided initial software, simulations, and CPU designs.[3]

First Raven1 bring up ST28nm at Berkeley Wireless Research Center (BWRC) June 2012

The RISC-V authors and their institution originally sourced the ISA documents[19] and several CPU designs under BSD licenses, which allow derivative works—such as RISC-V chip designs—to be either open and free, or closed and proprietary. The ISA specification itself (i.e., the encoding of the instruction set) was published in 2011 as open source,[20] with all rights reserved. The actual technical report (an expression of the specification) was later placed under a Creative Commons license to permit enhancement by external contributors through the RISC-V Foundation, and later RISC-V International.

A full history of RISC-V has been published on the RISC-V International website.[21]

RISC-V Foundation and RISC-V International

Commercial users require an ISA to be stable before they can use it in a product that may last many years. To address this issue, the RISC-V Foundation was formed in 2015 to own, maintain, and publish intellectual property related to RISC-V's definition.[22] The original authors and owners have surrendered their rights to the foundation.[23] The foundation is led by CEO Calista Redmond, who took on the role in 2019 after leading open infrastructure projects at IBM.[24]

In November 2019, the RISC-V Foundation announced that it would relocate to Switzerland , citing concerns over U.S. trade regulations.[25] As of March 2020, the organization was named RISC-V International, a Swiss nonprofit business association.[26]

(As of 2019), RISC-V International freely publishes the documents defining RISC-V and permits unrestricted use of the ISA for design of software and hardware. However, only members of RISC-V International can vote to approve changes, and only member organizations use the trademarked compatibility logo.[23]


  • 2017: The Linley Group's Analyst's Choice Award for Best Technology (for the instruction set)[27]


ISA base and extensions

RISC-V has a modular design, consisting of alternative base parts, with added optional extensions. The ISA base and its extensions are developed in a collective effort between industry, the research community and educational institutions. The base specifies instructions (and their encoding), control flow, registers (and their sizes), memory and addressing, logic (i.e., integer) manipulation, and ancillaries. The base alone can implement a simplified general-purpose computer, with full software support, including a general-purpose compiler.

The standard extensions are specified to work with all of the standard bases, and with each other without conflict.

Many RISC-V computers might implement the compressed instructions extension to reduce power consumption, code size, and memory use.[1](pp97-99) There are also future plans to support hypervisors and virtualization.[5]

Together with a supervisor instruction set extension, S, an RVGC defines all instructions needed to conveniently support a general purpose operating system.

ISA base and extensions
Name Description Version Status[upper-alpha 1] Instruction count
RVWMO Weak Memory Ordering 2.0 Ratified
RV32I Base Integer Instruction Set, 32-bit 2.1 Ratified 40
RV32E Base Integer Instruction Set (embedded), 32-bit, 16 registers 1.9 Open 40
RV64I Base Integer Instruction Set, 64-bit 2.1 Ratified 15
RV128I Base Integer Instruction Set, 128-bit 1.7 Open 15
M Standard Extension for Integer Multiplication and Division 2.0 Ratified 8 (RV32)
13 (RV64)
A Standard Extension for Atomic Instructions 2.1 Ratified 11 (RV32)
22 (RV64)
F Standard Extension for Single-Precision Floating-Point 2.2 Ratified 26 (RV32)
30 (RV64)
D Standard Extension for Double-Precision Floating-Point 2.2 Ratified 26 (RV32)
32 (RV64)
Zicsr Control and Status Register (CSR) 2.0 Ratified 6
Zifencei Instruction-Fetch Fence 2.0 Ratified 1
G Shorthand for the IMAFDZicsr_Zifencei base and extensions N/A N/A
Q Standard Extension for Quad-Precision Floating-Point 2.2 Ratified 28 (RV32)
32 (RV64)
L Standard Extension for Decimal Floating-Point 0.0 Open
C Standard Extension for Compressed Instructions 2.0 Ratified 40
B Standard Extension for Bit Manipulation 1.0 Ratified 43[28]
J Standard Extension for Dynamically Translated Languages 0.0 Open
T Standard Extension for Transactional Memory 0.0 Open
P Standard Extension for Packed-SIMD Instructions 0.9.10 Open
V Standard Extension for Vector Operations 1.0 Frozen 187[29]
Zk Standard Extension for Scalar Cryptography 1.0.1 Ratified 49[30]
N Standard Extension for User-Level Interrupts 1.1 Open 3
H Standard Extension for Hypervisor 1.0 Ratified 15
S Standard Extension for Supervisor-level Instructions 1.12 Ratified 4
Zam Misaligned Atomics 0.1 Open
Ztso Total Store Ordering 0.1 Frozen
  1. Frozen parts are expected to have their final feature set and to receive only clarifications before being ratified.
32-bit RISC-V instruction formats
Format Bit
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Register/register funct7 rs2 rs1 funct3 rd opcode
Immediate imm[11:0] rs1 funct3 rd opcode
Upper immediate imm[31:12] rd opcode
Store imm[11:5] rs2 rs1 funct3 imm[4:0] opcode
Branch [12] imm[10:5] rs2 rs1 funct3 imm[4:1] [11] opcode
Jump [20] imm[10:1] [11] imm[19:12] rd opcode
  • opcode (7 bits): Partially specifies which of the 6 types of instruction formats.
  • funct7, and funct3 (10 bits): These two fields, further than the opcode field, specify the operation to be performed.
  • rs1, rs2, or rd (5 bits): Specifies, by index, the register, resp., containing the first operand (i.e., source register), second operand, and destination register to which the computation result will be directed.

To tame the combinations of functions that may be implemented, a nomenclature is defined to specify them in Chapter 27 of the current ratified Unprivileged ISA Specification. The instruction set base is specified first, coding for RISC-V, the register bit-width, and the variant; e.g., RV64I or RV32E. Then follows letters specifying implemented extensions, in the order of the above table. Each letter may be followed by a major optionally followed by "p" and a minor option number. It defaults to 0 if a minor version number is absent, and 1.0 if all of a version number is absent. Thus RV64IMAFD may be written as RV64I1p0M1p0A1p0F1p0D1p0 or more simply as RV64I1M1A1F1D1. Underscores may be used between extensions for readability, for example RV32I2_M2_A2.

A diagram of the modular instruction set of the RV32IMAC variant, showing all instructions in the base integer ISA and the extensions for Integer Multiplication and Division, Atomic Instructions, and Compressed Instructions.
The modular instruction set of the RV32IMAC variant. This is a 32-bit CPU with the Base Integer ISA (RV32I) and the ISA extensions for Integer Multiplication and Division (RV32M), Atomic Instructions (RV32A), and Compressed Instructions (RV32C).

The base, extended integer and floating point calculations, and synchronization primitives for multi-core computing, the base and extensions MAFD, are considered to be necessary for general-purpose computation, and thus have the shorthand, G.

A small 32-bit computer for an embedded system might be RV32EC. A large 64-bit computer might be RV64GC; i.e., shorthand for RV64IMAFDCZicsr_Zifencei.

With the growth in the number of extensions, the standard now provides for extensions to be named by a single "Z" followed by an alphabetical name and an optional version number. For example, Zifencei names the instruction-fetch extension. Zifencei2 and Zifencei2p0 name version 2.0 of the same. The first letter following the "Z" by convention indicates the most closely related alphabetical extension category, IMAFDQLCBJTPVN. Thus the Zam extension for misaligned atomics relates to the "A" standard extension. Unlike single character extensions, Z extensions must be separated by underscores, grouped by category and then alphabetically within each category. For example, Zicsr_Zifencei_Zam.

Extensions specific to supervisor privilege level are named in the same way using "S" for prefix. Extensions specific to hypervisor level are named using "H" for prefix. Machine level extensions are prefixed with the three letters "Zxm". Supervisor, hypervisor and machine level instruction set extensions are named after less privileged extensions.

RISC-V developers may create their own non-standard instruction set extensions. These follow the "Z" naming convention, but with "X" as the prefix. They should be specified after all standard extensions, and if multiple non-standard extensions are listed, they should be listed alphabetically.

Profiles and Platforms

Profiles and Platforms for standard ISA choice lists are under discussion.

... This flexibility can be used to highly optimize a specialized design by including only the exact set of ISA features required for an application, but the same flexibility also leads to a combinatorial explosion in possible ISA choices. Profiles specify a much smaller common set of ISA choices that capture the most value for most users, and which thereby enable the software community to focus resources on building a rich software ecosystem. [31]
The platform specification defines a set of platforms that specify requirements for interoperability between software and hardware. The Platform Policy defines the various terms used in this platform specification. The platform policy also provides the needed detail regarding the scope, coverage, naming, versioning, structure, life cycle and compatibility claims for the platform specification. [32]

Register sets

Description Saved by
32 integer registers
x0 Zero Always zero
x1 ra Return address Caller
x2 sp Stack pointer Callee
x3 gp Global pointer
x4 tp Thread pointer
x5 t0 Temporary / alternate return address Caller
x6–7 t1–2 Temporary Caller
x8 s0/fp Saved register / frame pointer Callee
x9 s1 Saved register Callee
x10–11 a0–1 Function argument / return value Caller
x12–17 a2–7 Function argument Caller
x18–27 s2–11 Saved register Callee
x28–31 t3–6 Temporary Caller
32 floating-point extension registers
f0–7 ft0–7 Floating-point temporaries Caller
f8–9 fs0–1 Floating-point saved registers Callee
f10–11 fa0–1 Floating-point arguments/return values Caller
f12–17 fa2–7 Floating-point arguments Caller
f18–27 fs2–11 Floating-point saved registers Callee
f28–31 ft8–11 Floating-point temporaries Caller

RISC-V has 32 (or 16 in the embedded variant) integer registers, and, when the floating-point extension is implemented, separate 32 floating-point registers. Except for memory access instructions, instructions address only registers.

The first integer register is a zero register, and the remainder are general-purpose registers. A store to the zero register has no effect, and a read always provides 0. Using the zero register as a placeholder makes for a simpler instruction set.

move rx to ry becomes add immediate 0 to rx and store in ry.[1](p18)

Control and status registers exist, but user-mode programs can access only those used for performance measurement and floating-point management.

No instructions exist to save and restore multiple registers. Those were thought to be needless, too complex, and perhaps too slow.[15]

Memory access

Like many RISC designs, RISC-V is a load–store architecture: instructions address only registers, with load and store instructions conveying data to and from memory.

Most load and store instructions include a 12-bit offset and two register identifiers. One register is the base register. The other register is the source (for a store) or destination (for a load).

The offset is added to a base register to get the address.[1](p24) Forming the address as a base register plus offset allows single instructions to access data structures. For example, if the base register points to the top of a stack, single instructions can access a subroutine's local variables in the stack. Likewise the load and store instructions can access a record-style structure or a memory-mapped I/O device. Using the constant zero register as a base address allows single instructions to access memory near address zero.

Memory is addressed as 8-bit bytes, with instructions being in little-endian order,[1](pp9-10) and with data being in the byte order defined by the execution environment interface in which code is running.[1](pp3,9-10,24) Words, up to the register size, can be accessed with the load and store instructions.

RISC-V was originally specified as little-endian to resemble other familiar, successful computers, for example, x86.[1](pp9-10) This also reduces a CPU's complexity and costs slightly less because it reads all sizes of words in the same order. For example, the RISC-V instruction set decodes starting at the lowest-addressed byte of the instruction. Big-endian and bi-endian variants were defined for support of legacy code bases that assume big-endian alignment.[1](pp9-10)

An execution environment interface may allow accessed memory addresses not to be aligned to their word width, but accesses to aligned addresses may be faster; for example, simple CPUs may implement unaligned accesses with slow software emulation driven from an alignment failure interrupt.[1](pp3,24-25)

Like many RISC instruction sets (and some complex instruction set computer (CISC) instruction sets, such as x86 and IBM System/360 and its successors through z/Architecture), RISC-V lacks address-modes that write back to the registers. For example, it does not auto-increment.[1](p24)

RISC-V manages memory systems that are shared between CPUs or threads by ensuring a thread of execution always sees its memory operations in the programmed order. But between threads and I/O devices, RISC-V is simplified: it doesn't guarantee the order of memory operations, except by specific instructions, such as fence.

A fence instruction guarantees that the results of predecessor operations are visible to successor operations of other threads or I/O devices. fence can guarantee the order of combinations of both memory and memory-mapped I/O operations. E.g. it can separate memory read and write operations, without affecting I/O operations. Or, if a system can operate I/O devices in parallel with memory, fence doesn't force them to wait for each other. One CPU with one thread may decode fence as nop.

Some RISC CPUs (such as MIPS, PowerPC, DLX, and Berkeley's RISC-I) place 16 bits of offset in the loads and stores. They set the upper 16 bits by a load upper word instruction. This permits upper-halfword values to be set easily, without shifting bits. However, most use of the upper half-word instruction makes 32-bit constants, like addresses. RISC-V uses a SPARC-like combination of 12-bit offsets and 20-bit set upper instructions. The smaller 12-bit offset helps compact, 32-bit load and store instructions select two of 32 registers yet still have enough bits to support RISC-V's variable-length instruction coding.[1](p16)


RISC-V handles 32-bit constants and addresses with instructions that set the upper 20 bits of a 32-bit register. Load upper immediate lui loads 20 bits into bits 31 through 12. Then a second instruction such as addi can set the bottom 12 bits. Small numbers or addresses can be formed by using the zero register instead of lui.

This method is extended to permit position-independent code by adding an instruction, auipc that generates 20 upper address bits by adding an offset to the program counter and storing the result into a base register. This permits a program to generate 32-bit addresses that are relative to the program counter.

The base register can often be used as-is with the 12-bit offsets of the loads and stores. If needed, addi can set the lower 12 bits of a register. In 64-bit and 128-bit ISAs,lui and auipc sign-extend the result to get the larger address.[1](p37)

Some fast CPUs may interpret combinations of instructions as single fused instructions. lui or auipc are good candidates to fuse with jalr, addi, loads or stores.

Subroutine calls, jumps, and branches

RISC-V's subroutine call jal (jump and link) places its return address in a register. This is faster in many computer designs, because it saves a memory access compared to systems that push a return address directly on a stack in memory. jal has a 20-bit signed (two's complement) offset. The offset is multiplied by 2, then added to the PC to generate a relative address to a 32-bit instruction. If the result is not at a 32-bit address (i.e., evenly divisible by 4), the CPU may force an exception.[1](Section 2.5)

RISC-V CPUs jump to calculated addresses using a jump and link-register, jalr instruction. jalr is similar to jal, but gets its destination address by adding a 12-bit offset to a base register. (In contrast,jal adds a larger 20-bit offset to the PC.)

jalr's bit format is like the register-relative loads and stores. Like them, jalr can be used with the instructions that set the upper 20 bits of a base register to make 32-bit branches, either to an absolute address (using lui) or a PC-relative one (using auipc for position-independent code). (Using a constant zero base address allows single-instruction calls to a small (the offset), fixed positive or negative address.)

RISC-V recycles jal and jalr to get unconditional 20-bit PC-relative jumps and unconditional register-based 12-bit jumps. Jumps just make the linkage register 0 so that no return address is saved.[1](Section 2.5)

RISC-V also recycles jalr to return from a subroutine: To do this, jalr's base register is set to be the linkage register saved by jal or jalr. jalr's offset is zero and the linkage register is zero, so that there is no offset, and no return address is saved.

Like many RISC designs, in a subroutine call, a RISC-V compiler must use individual instructions to save registers to the stack at the start, and then restore these from the stack on exit. RISC-V has no save multiple or restore multiple register instructions. These were thought to make the CPU too complex, and possibly slow.[33] This can take more code space. Designers planned to reduce code size with library routines to save and restore registers.[34]

RISC-V has no condition code register or carry bit. The designers believed that condition codes make fast CPUs more complex by forcing interactions between instructions in different stages of execution. This choice makes multiple-precision arithmetic more complex. Also, a few numerical tasks need more energy. As a result, predication (the conditional execution of instructions) is not supported. The designers claim that very fast, out-of-order CPU designs do predication anyway, by doing the comparison branch and conditional code in parallel, then discarding the unused path's effects. They also claim that even in simpler CPUs, predication is less valuable than branch prediction, which can prevent most stalls associated with conditional branches. Code without predication is larger, with more branches, but they also claim that a compressed instruction set (such as RISC-V's set C) solves that problem in most cases.[15]

Instead, RISC-V has short branches that perform comparisons: equal, not-equal, less-than, unsigned less-than, greater-than or equal and unsigned greater-than or equal. Ten comparison-branch operations are implemented with only six instructions, by reversing the order of operands in the assembler. For example, branch if greater than can be done by less-than with a reversed order of operands.[1](Section 2.5)

The comparing branches have a twelve-bit signed range, and jump relative to the PC.[1](Section 2.5)

Unlike some RISC architectures, RISC-V does not include a branch delay slot, a position after a branch instruction that can be filled with an instruction that is executed whether or not the branch is taken.[1](Section 2.5) RISC-V omits a branch delay slot because it complicates multicycle CPUs, superscalar CPUs, and long pipelines. Dynamic branch predictors have succeeded well enough to reduce the need for delayed branches.[15]

On the first encounter with a branch, RISC-V CPUs should assume that a negative relative branch (i.e. the sign bit of the offset is "1") will be taken.[1](Section 2.5) This assumes that a backward branch is a loop, and provides a default direction so that simple pipelined CPUs can fill their pipeline of instructions. Other than this, RISC-V does not require branch prediction, but core implementations are allowed to add it. RV32I reserves a "HINT" instruction space that presently does not contain any hints on branches;[1](Section 2.9) RV64I does the same.[1](Section 5.4)

Arithmetic and logic sets

RISC-V segregates math into a minimal set of integer instructions (set I) with add, subtract, shift, bitwise logic and comparing-branches. These can simulate most of the other RISC-V instruction sets with software. (The atomic instructions are a notable exception.) RISC-V integer instructions lacks the count leading zero and bit-field operations normally used to speed software floating-point in a pure-integer processor, However, while nominally in the bit manipulation extension, the ratified Zbb, Zba and Zbs extensions contain further integer instructions including a count leading zero instruction.

The integer multiplication instructions (set M) include signed and unsigned multiply and divide. Double-precision integer multiplies and divides are included, as multiplies and divides that produce the high word of the result. The ISA document recommends that implementors of CPUs and compilers fuse a standardized sequence of high and low multiply and divide instructions to one operation if possible.[1](pp43-45)

The floating-point instructions (set F) include single-precision arithmetic and also comparison-branches similar to the integer arithmetic. It requires an additional set of 32 floating-point registers. These are separate from the integer registers. The double-precision floating point instructions (set D) generally assume that the floating-point registers are 64-bit (i.e., double-width), and the F subset is coordinated with the D set. A quad-precision 128-bit floating-point ISA (Q) is also defined.[1](pp63-82) RISC-V computers without floating-point can use a floating-point software library.

RISC-V does not cause exceptions on arithmetic errors, including overflow,[1](pp17-20) underflow, subnormal, and divide by zero.[1](pp44-45) Instead, both integer and floating-point arithmetic produce reasonable default values, and floating-point instructions set status bits.[1](p66) Divide-by-zero can be discovered by one branch after the division.[1](pp44-45) The status bits can be tested by an operating system or periodic interrupt.

Atomic memory operations

RISC-V supports computers that share memory between multiple CPUs and threads. RISC-V's standard memory consistency model is release consistency. That is, loads and stores may generally be reordered, but some loads may be designated as acquire operations which must precede later memory accesses, and some stores may be designated as release operations which must follow earlier memory accesses.[1](pp83-94)

The base instruction set includes minimal support in the form of a fence instruction to enforce memory ordering.[1](pp26-27) Although this is sufficient (fence r, rw provides acquire and fence rw, w provides release), combined operations can be more efficient.[1](Chapter 8)

The atomic memory operation extension supports two types of atomic memory operations for release consistency. First, it provides general purpose load-reserved lr and store-conditional sc instructions. lr performs a load, and tries to reserve that address for its thread. A later store-conditional sc to the reserved address will be performed only if the reservation is not broken by an intervening store from another source. If the store succeeds, a zero is placed in a register. If it failed, a non-zero value indicates that software needs to retry the operation. In either case, the reservation is released.[1](Chapter 8)

The second group of atomic instructions perform read-modify-write sequences: a load (which is optionally a load-acquire) to a destination register, then an operation between the loaded value and a source register, then a store of the result (which may optionally be a store-release). Making the memory barriers optional permits combining the operations. The optional operations are enabled by acquire and release bits which are present in every atomic instruction. RISC-V defines nine possible operations: swap (use source register value directly); add; bitwise and, or, and exclusive-or; and signed and unsigned minimum and maximum.[1](Chapter 8)

A system design may optimize these combined operations more than lr and sc. For example, if the destination register for a swap is the constant zero, the load may be skipped. If the value stored is unmodified since the load, the store may be skipped.[4](p44)

The IBM System/370 and its successors including z/Architecture, and x86, both implement a compare-and-swap (cas) instruction, which tests and conditionally updates a location in memory: if the location contains an expected old value, cas replaces it with a given new value; it then returns an indication of whether it made the change. However, a simple load-type instruction is usually performed before the cas to fetch the old value. The classic problem is that if a thread reads (loads) a value A, calculates a new value C, and then uses (cas) to replace A with C, it has no way to know whether concurrent activity in another thread has replaced A with some other value B and then restored the A in between. In some algorithms (e.g., ones in which the values in memory are pointers to dynamically allocated blocks), this ABA problem can lead to incorrect results. The most common solution employs a double-wide cas instruction to update both the pointer and an adjacent counter; unfortunately, such an instruction requires a special instruction format to specify multiple registers, performs several reads and writes, and can have complex bus operation.[1](pp48-49)

The lr/sc alternative is more efficient. It usually requires only one memory load, and minimizing slow memory operations is desirable. It's also exact: it controls all accesses to the memory cell, rather than just assuring a bit pattern. However, unlike cas, it can permit livelock, in which two or more threads repeatedly cause each other's instructions to fail. RISC-V guarantees forward progress (no livelock) if the code follows rules on the timing and sequence of instructions: 1) It must use only the I subset. 2) To prevent repetitive cache misses, the code (including the retry loop) must occupy no more than 16 consecutive instructions. 3) It must include no system or fence instructions, or taken backward branches between the lr and sc. 4) The backward branch to the retry loop must be to the original sequence.[1](pp48-49)

The specification gives an example of how to use the read-modify-write atomic instructions to lock a data structure.[1](p54)

Compressed subset

The standard RISC-V ISA specifies that all instructions are 32 bits. This makes for a particularly simple implementation, but like other RISC processors with 32-bit instruction encoding, results in larger code size than in instruction sets with variable-length instructions.[1](p99)[33]

To compensate, RISC-V's 32-bit instructions are actually 30 bits; ​34 of the opcode space is reserved for an optional (but recommended) variable-length compressed instruction set, RVC, that includes 16-bit instructions. Like ARM's Thumb and the MIPS16, the compressed instructions are simply aliases for a subset of the larger instructions. Unlike ARM's Thumb or the MIPS compressed set, space was reserved from the beginning so there is no separate operating mode. Standard and compressed instructions may be intermixed freely.[1](p97)[33] (Extension letter is C.)[1](p97)

Because (like Thumb-1 and MIPS16) the compressed instructions are simply alternate encodings (aliases) for a selected subset of larger instructions, the compression can be implemented in the assembler, and it is not essential for the compiler to even know about it.

A prototype of RVC was tested in 2011.[33] The prototype code was 20% smaller than an x86 PC and MIPS compressed code, and 2% larger than ARM Thumb-2 code.[33] It also substantially reduced both the needed cache memory and the estimated power use of the memory system.[33]

The researcher intended to reduce the code's binary size for small computers, especially embedded computer systems. The prototype included 33 of the most frequently used instructions, recoded as compact 16-bit formats using operation codes previously reserved for the compressed set.[33] The compression was done in the assembler, with no changes to the compiler. Compressed instructions omitted fields that are often zero, used small immediate values or accessed subsets (16 or 8) of the registers. addi is very common and often compressible.[33]

Much of the difference in size compared to ARM's Thumb set occurred because RISC-V, and the prototype, have no instructions to save and restore multiple registers. Instead, the compiler generated conventional instructions that access the stack. The prototype RVC assembler then often converted these to compressed forms that were half the size. However, this still took more code space than the ARM instructions that save and restore multiple registers. The researcher proposed to modify the compiler to call library routines to save and restore registers. These routines would tend to remain in a code cache and thus run fast, though probably not as fast as a save-multiple instruction.[33]

Standard RVC requires occasional use of 32-bit instructions. Several nonstandard RVC proposals are complete, requiring no 32-bit instructions, and are said to have higher densities than standard RVC.[35][36] Another proposal builds on these, and claims to use less coding range as well.[37]

Embedded subset

An instruction set for the smallest embedded CPUs (set E) is reduced in other ways: Only 16 of the 32 integer registers are supported.[1](Chapter 4) All current extensions may be used; a floating-point extension to use the integer registers for floating-point values is being considered. The privileged instruction set supports only machine mode, user mode and memory schemes that use base-and-bound address relocation.[5]

Discussion has occurred for a microcontroller profile for RISC-V, to ease development of deeply embedded systems. It centers on faster, simple C-language support for interrupts, simplified security modes and a simplified POSIX application binary interface.[38]

Correspondents have also proposed smaller, non-standard, 16-bit RV16E ISAs: Several serious proposals would use the 16-bit C instructions with 8 × 16-bit registers.[36][35] An April fools' joke proposed a very practical arrangement: Utilize 16 × 16-bit integer registers, with the standard EIMC ISAs (including 32-bit instructions.) The joke was to use bank switching when a 32-bit CPU would be clearly superior with the larger address space.[39]

Privileged instruction set

RISC-V's ISA includes a separate privileged instruction set specification. (As of December 2021), version 1.12 is ratified by RISC-V International.[5]

Version 1.11 of the specification supports several types of computer systems:

  1. Systems that have only machine mode, perhaps for embedded systems,
  2. Systems with both machine mode (for the supervisor) and user-mode to implement operating systems that run the kernel in a privileged mode.
  3. Systems with machine-mode, hypervisors, multiple supervisors, and user-modes under each supervisor.

These correspond roughly to systems with up to four rings of privilege and security, at most: machine, hypervisor, supervisor and user. Each layer also is expected to have a thin layer of standardized supporting software that communicates to a more-privileged layer, or hardware.[5]

The ISA also includes a hypervisor mode that is orthogonal to the user and supervisor modes.[40] The basic feature is a configuration bit that either permits supervisor-level code to access hypervisor registers, or causes an interrupt on accesses. This bit lets supervisor mode directly handle the hardware needed by a hypervisor. This simplifies the implementation of hypervisors that are hosted by an operating system. This is a popular mode to run warehouse-scale computers. To support non-hosted hypervisors, the bit can cause these accesses to interrupt to a hypervisor. The design also simplifies nesting of hypervisors, in which a hypervisor runs under a hypervisor, and if necessary it lets the kernel use hypervisor features within its own kernel code. As a result, the hypervisor form of the ISA supports five modes: machine, supervisor, user, supervisor-under-hypervisor and user-under-hypervisor.

The privileged instruction set specification explicitly defines hardware threads, or harts. Multiple hardware threads are a common practice in more-capable computers. When one thread is stalled, waiting for memory, others can often proceed. Hardware threads can help make better use of the large number of registers and execution units in fast out-of-order CPUs. Finally, hardware threads can be a simple, powerful way to handle interrupts: No saving or restoring of registers is required, simply executing a different hardware thread. However, the only hardware thread required in a RISC-V computer is thread zero.[5]

The existing control and status register definitions support RISC-V's error and memory exceptions, and a small number of interrupts. For systems with more interrupts, the specification also defines an interrupt controller. Interrupts always start at the highest-privileged machine level, and the control registers of each level have explicit forwarding bits to route interrupts to less-privileged code. For example, the hypervisor need not include software that executes on each interrupt to forward an interrupt to an operating system. Instead, on set-up, it can set bits to forward the interrupt.[5]

Several memory systems are supported in the specification. Physical-only is suited to the simplest embedded systems. There are also three UNIX-style virtual memory systems for memory cached in mass-storage systems. The virtual memory systems support MMU with three sizes, with addresses sized 32, 39 and 48 bits. All virtual memory systems support 4 KiB pages, multilevel page-table trees and use very similar algorithms to walk the page table trees. All are designed for either hardware or software page-table walking. To optionally reduce the cost of page table walks, super-sized pages may be leaf pages in higher levels of a system's page table tree. SV32 has a two-layer page table tree and supports 4 MiB superpages. SV39 has a three level page table, and supports 2 MiB superpages and 1 GiB gigapages. SV48 is required to support SV39. It also has a 4-level page table and supports 2 MiB superpages, 1 GiB gigapages, and 512 GiB terapages. Superpages are aligned on the page boundaries for the next-lowest size of page.[5]

Bit manipulation

Some bit-manipulation ISA extensions were ratified in November 2021 (Zba, Zbb, Zbc, Zbs).[28] The Zba, Zbb, and Zbs extensions are arguably extensions of the standard I integer instructions: Zba contains instructions to speed up the computation of the addresses of array elements in arrays of datatypes of size 2, 4, or 8 bytes (sh1add, sh2add, sh3add), and for 64 (and 128) bit processors when indexed with unsigned integers (add.uw, sh1add.uw, sh2add.uw, sh3add.uw and slli.uw). The Zbb instructions contains operations to count leading, trailing 0 bits or all 1 bits in a full and 32 word operations (clz, clzw, ctz, ctzw, cpop, cpopw), byte order reversion (rev8), logical instructions with negation of the second input (andn,orn, xnor), sign and zero extension (sext.b, sext.h, zext.h) that could not be provided as special cases of other instructions (andi, addiw, add.wu), min and max of (signed and unsigned) integers, (left and right) rotation of bits in a register and 32 bit words (rori,roriw, ror, rorw, rol, rolw), and a byte wise "or combine" operation which allows detection of a zero byte in a full register, useful for handling C-style nul terminated strings functions. The Zbs extension allows setting, getting, clearing, and toggling individual bits in a register by their index (bseti, bset, bexti, bext, bclri, bclr, binvi,binv).

The Zbc extension has instructions for "carryless multiplication", which does the multiplication of polynomials over the Galois field GF(2) (clmul, clmulh, clmulr). These are useful for cryptography and CRC checks of data integrity.

Done well, a more specialised bit-manipulation subset can aid cryptographic, graphic, and mathematical operations. Further instructions that have been discussed include instructions to shift in ones, a generalized bit-reverse, shuffle and crossbar permutations, bit-field place, extract and deposit pack two words, bytes or halfwords in one register, CRC instructions, bit-matrix operations (RV64 only), conditional mix, conditional move, funnel shifts. The criteria for inclusion documented in the draft were compliant with RV5 philosophies and ISA formats, substantial improvements in code density or speed (i.e., at least a 3-for-1 reduction in instructions), and substantial real-world applications, including preexisting compiler support. Version 0.93 of the bit-manipulation extension includes those instructions;[41] some of them are now in version 1.0.1 of the Scalar and Entropy Source instructions cryptography extension.[30]

Packed SIMD

Packed-SIMD instructions are widely used by commercial CPUs to inexpensively accelerate multimedia and other digital signal processing.[15] For simple, cost-reduced RISC-V systems, the base ISA's specification proposed to use the floating-point registers' bits to perform parallel single instruction, multiple data (SIMD) sub-word arithmetic.

In 2017 a vendor published a more detailed proposal to the mailing list, and this can be cited as version 0.1.[42] (As of 2019), the efficiency of this proposed ISA varies from 2x to 5x a base CPU for a variety of DSP codecs.[43] The proposal lacked instruction formats and a license assignment to RISC-V International, but it was reviewed by the mailing list.[42] Some unpopular parts of this proposal were that it added a condition code, the first in a RISC-V design, linked adjacent registers (also a first), and has a loop counter that can be difficult to implement in some microarchitectures.

A previous, well-regarded implementation for a 64-bit CPU was PA-RISC's multimedia instructions: Multimedia Acceleration eXtensions. It increased the CPU's performance on digital signal processing tasks by 48-fold or more, enabling practical real-time video codecs in 1995.[44][45] Besides its native 64-bit math, the PA-RISC MAX2 CPU could do arithmetic on four 16-bit subwords at once, with several overflow methods. It also could move subwords to different positions. PA-RISC's MAX2 was intentionally simplified. It lacked support for 8-bit or 32-bit subwords. The 16-bit subword size was chosen to support most digital signal processing tasks. These instructions were inexpensive to design and build.

Vector set

The proposed vector-processing instruction set may make the packed SIMD set obsolete. The designers hope to have enough flexibility that a CPU can implement vector instructions in a standard processor's registers. This would enable minimal implementations with similar performance to a multimedia ISA, as above. However, a true vector coprocessor could execute the same code with higher performance.[46]

(As of September 2021), the vector extension is at version 1.0.[47] It is a conservative, flexible design of a general-purpose mixed-precision vector processor, suitable to execute compute kernels. Code would port easily to CPUs with differing vector lengths, ideally without recompiling.[46]

In contrast, short-vector SIMD extensions are less convenient. These are used in x86, ARM and PA-RISC. In these, a change in word-width forces a change to the instruction set to expand the vector registers (in the case of x86, from 64-bit MMX registers to 128-bit Streaming SIMD Extensions (SSE), to 256-bit Advanced Vector Extensions (AVX), and AVX-512). The result is a growing instruction set, and a need to port working code to the new instructions.

In the RISC-V vector ISA, rather than fix the vector length in the architecture, instructions (vsetvli, vsetivli, and vsetvl) are available which take a requested size and sets the vector length to the minimum of the hardware limit and the requested size. So, the RISC-V proposal is more like a Cray's long-vector design or ARM's Scalable Vector Extension. That is, each vector in up to 32 vectors is the same length.[47]:25

The application specifies the total vector width it requires, and the processor determines the vector length it can provide with available on-chip resources. This takes the form of an instruction (vsetcfg) with four immediate operands, specifying the number of vector registers of each available width needed. The total must be no more than the addressable limit of 32, but may be less if the application does not require them all. The vector length is limited by the available on-chip storage divided by the number of bytes of storage needed for each entry. (Added hardware limits may also exist, which in turn may permit SIMD-style implementations.)[46]

Outside of vector loops, the application can zero the number of requested vector registers, saving the operating system the work of preserving them on context switches.[46]

The vector length is not only architecturally variable, but designed to vary at run time also. To achieve this flexibility, the instruction set is likely to use variable-width data paths and variable-type operations using polymorphic overloading.[46] The plan is that these can reduce the size and complexity of the ISA and compiler.[46]

Recent experimental vector processors with variable-width data paths also show profitable increases in operations per: second (speed), area (lower cost), and watt (longer battery life).[48]

Unlike a typical modern graphics processing unit, there are no plans to provide special hardware to support branch predication. Instead, lower cost compiler-based predication will be used.[46][49]

External debug system

There is a preliminary specification for RISC-V's hardware-assisted debugger. The debugger will use a transport system such as Joint Test Action Group (JTAG) or Universal Serial Bus (USB) to access debug registers. A standard hardware debug interface may support either a standardized abstract interface or instruction feeding.[50][51]

(As of January 2017), the exact form of the abstract interface remains undefined, but proposals include a memory mapped system with standardized addresses for the registers of debug devices or a command register and a data register accessible to the communication system.[50] Correspondents claim that similar systems are used by Freescale's background debug mode interface (BDM) for some CPUs, ARM, OpenRISC, and Aeroflex's LEON.[50]

In instruction feeding, the CPU will process a debug exception to execute individual instructions written to a register. This may be supplemented with a data-passing register and a module to directly access the memory. Instruction feeding lets the debugger access the computer exactly as software would. It also minimizes changes in the CPU, and adapts to many types of CPU. This was said to be especially apt for RISC-V because it is designed explicitly for many types of computers. The data-passing register allows a debugger to write a data-movement loop to RAM, and then execute the loop to move data into or out of the computer at a speed near the maximum speed of the debug system's data channel.[50] Correspondents say that similar systems are used by MIPS Technologies MIPS, Intel Quark, Tensilica's Xtensa, and for Freescale Power ISA CPUs' background debug mode interface (BDM).[50]

A vendor proposed a hardware trace subsystem for standardization, donated a conforming design, and initiated a review.[52][53] The proposal is for a hardware module that can trace code execution on most RV5 CPUs. To reduce the data rate, and permit simpler or less-expensive paths for the trace data, the proposal does not generate trace data that can be calculated from a binary image of the code. It sends only data that indicates "uninferrable" paths through the program, such as which conditional branches are taken. To reduce the data rates, branches that can be calculated, such as unconditional branches, are not traced. The proposed interface between the module and the control unit is a logic signal for each uninferrable type of instruction. Addresses and other data are to be provided in a specialized bus attached to appropriate data sources in a CPU. The data structure sent to an external trace unit is a series of short messages with the needed data. The details of the data channel are intentionally not described in the proposal, because several are likely to make sense.


The RISC-V organization maintains a list of RISC-V CPU and SoC implementations.[54]


Existing proprietary implementations include:

  • Allwinner Technology has implemented the XuanTie C906 CPU into their D1 Application Processor.[55]
  • Andes Technology Corporation, a Founding Premier member of RISC-V International.[56] Its RISC-V CPU families range from tiny 32-bit cores to advanced 64-bit cores with DSP, FPU, Vector, superscalar, and/or multicore capabilities.
  • Bouffalo Lab has a series of MCUs based on RISC-V (RV32IMACF, BL60x/BL70x series).[57]
  • CloudBEAR is a processor IP company that develops its own RISC-V cores for a range of applications.[58]
  • Codasip, a founding member of RISC-V International,[56] has developed a range of low-power embedded, high-performance embedded and application processor cores.[59][60]
  • Cortus, an original founding Platinum member of the RISC-V foundation and the RISC-V International,[56] has a number of RISC-V implementations. Cortus offers ASIC design services using its large IP portfolio including RISC-V 32/64-bit processors from low-end to very high performance RISC-V OoO processors, digital, analog, RF, security and a complete IDE/toolchain/debug eco-system.
  • Espressif added a RISC-V ULP coprocessor to their ESP32-S2 microcontroller.[61] In November 2020 Espressif announced their ESP32-C3, a single-core, 32-bit, RISC-V (RV32IMC) based MCU.[62]
  • Fraunhofer IPMS was the first organization to develop a RISC-V core that can meet functional safety requirements. The IP Core EMSA5 is a 32-bit processor with a five-stage pipeline and is available as a General Purpose variant (EMSA5-GP) and as a Safety variant (EMSA5-FS) that can meet an ISO 26262 Automotive Safety Integrity Level-D standard.[63]
  • GigaDevice has a series of MCUs based on RISC-V (RV32IMAC, GD32V series),[64] with one of them used on the Longan Nano board produced by a Chinese electronic company Sipeed.[65]
  • Google has developed the Titan M2 security module for the Pixel 6 and Pixel 7[66]
  • GreenWaves Technologies announced the availability of GAP8, a 32-bit 1 controller plus 8 compute cores, 32-bit SoC (RV32IMC) and developer board in February 2018. Their GAPuino GAP8 development board started shipping in May 2018.[67][68][69]
  • Instant SoC RISC-V cores from FPGA Cores. System On Chip, including RISC-V cores, defined by C++.
  • Micro Magic Inc. announced the world's fastest 64-bit RISC-V core achieving 5 GHz and 13,000 CoreMarks in October 2020.
  • MIPS pivoted to developing RISC-V cores in 2021. It rolled out its first implementation eVocore P8700 in December 2022.[70][71]
  • Seagate, in December 2020 announced that it had developed two RISC-V general-purpose cores for use in upcoming controllers for its storage devices.[72]
  • SiFive, a company established specifically for developing RISC-V hardware, has processor models released in 2017.[73][74] These include a quad-core, 64-bit (RV64GC) system on a chip (SoC) capable of running general-purpose operating systems such as Linux.[75]
  • Syntacore,[76] a founding member of RISC-V International and one of the first commercial RISC-V IP vendors, develops and licenses family of RISC-V IP since 2015. (As of 2018), product line includes eight 32- and 64-bit cores, including open-source SCR1 MCU core (RV32I/E[MC]).[77] First commercial SoCs, based on the Syntacore IP were demonstrated in 2016.[78]
  • Codasip and UltraSoC have developed fully supported intellectual property for RISC-V embedded SOCs that combine Codasip's RISC-V cores and other IP with UltraSoC's debug, optimization and analytics.[79]
  • As of 2020, the Indian defence and strategic sector started using the 64-bit RISC-V based 100-350 MHz Risecreek processor developed by IIT-Madras which is fabricated by Intel with 22 nm FinFET process.[80][81]

In development

  • ASTC developed a RISC-V CPU for embedded ICs.[82]
  • Centre for Development of Advanced Computing (C-DAC) in India is developing a single core 32-bit in-order, a single core 64-bit in-order and three out-of-order single, dual and quad-core RISC-V processor under VEGA Microprocessors series.[83][84][85]
  • Cobham Gaisler NOEL-V 64-bit.[86]
  • Computer Laboratory, University of Cambridge, in collaboration with the FreeBSD Project, has ported that operating system to 64-bit RISC-V to use as a hardware-software research platform.[87]
  • Esperanto Technologies announced that they are developing three RISC-V based processors: the ET-Maxion high-performance core, ET-Minion energy-efficient core, and ET-Graphics graphics processor.[88]
  • ETH Zurich and the University of Bologna have cooperatively developed the open-source RISC-V PULPino processor[89] as part of the Parallel Ultra-Low Power (PULP) project for energy-efficient IoT computing.[90]
  • European Processor Initiative (EPI), RISC-V Accelerator Stream.[91][92]
    Illustration of EPI's first working RISC-V chip sample in 2021.
  • Reconfigurable Intelligent Systems Engineering Group (RISE) of IIT-Madras is developing six Shakti series RISC-V open-source CPU designs for six distinct uses, from a small 32-bit CPU for the Internet of Things (IoT) to large, 64-bit CPUs designed for warehouse-scale computers such as server farms based on RapidIO and Hybrid Memory Cube technologies.[93][13][94] 32-bit Moushik successfully booted by RISE for the application of Credit cards, Electronic Voting Machines (EVMs), surveillance cameras, safe locks, personalized Health Management Systems.[81][95]
  • lowRISC is a non profit project to implement a fully open-source hardware system on a chip (SoC) based on the 64-bit RISC-V ISA.[96]
  • Nvidia plans to use RISC-V to replace their Falcon processor on their GeForce graphics cards.[97]
  • RV64X consortium is working on a set of graphics extensions to RISC-V and has announced that they are developing an open source RISC-V core with a GPU unit.[98]
  • SiFive announced their first RISC-V out-of-order high performance CPU core, the U8 Series Processor IP.[99]
  • Esperanto ET-SoC-1, a 200 TOPS "kilocore" supercomputer on a chip, with 1088 small 64-bit in-order ET-Minion cores with tensor/vector units and 4 big 64-bit out-of-order ET-Maxion cores [100]
  • Ventana revealed they are developing high performance RISC-V CPU IP and chiplet technology targeting data center applications.[101][102]

Open source

Many open-sourced RISC-V CPU designs exist, including:

  • The Berkeley CPUs. These are implemented in a unique hardware design language, Chisel, and some are named for famous train engines:
    • 64-bit Rocket.[103] Rocket may suit compact, low-power intermediate computers such as personal devices. Named for Stephenson's Rocket.
    • The 64-bit Berkeley Out of Order Machine (BOOM).[104] The Berkeley Out-of-Order Machine (BOOM) is a synthesizable and parameterizable open source RV64GC RISC-V core written in the Chisel hardware construction language. BOOM uses much of the infrastructure created for Rocket, and may be usable for personal, supercomputer, and warehouse-scale computers.
    • Five 32-bit Sodor CPU designs from Berkeley,[105] designed for student projects.[106] Sodor is the fictional island of trains in children's stories about Thomas the Tank Engine.
  • picorv32 by Claire Wolf,[107] a 32-bit microcontroller unit (MCU) class RV32IMC implementation in Verilog.
  • scr1 from Syntacore,[108] a 32-bit microcontroller unit (MCU) class RV32IMC implementation in Verilog.
  • SERV[109] is a physically small, validated bit-serial RV32I core in Verilog. It is integrated with both the LiteX and FuseSoC SoC construction systems. An FPGA implementation[110] was 354 lookup tables (LUTs) and 345 flip-flops, running at 1.5 MIPS, In a 130 nm-node ASIC, it was 0.04 mm2[111] and a high-end FPGA could hold 6,000 cores.[112]
  • PULPino (Riscy and Zero-Riscy) from ETH Zürich / University of Bologna.[113] The cores in PULPino implement a simple RV32IMC ISA for microcontrollers (Zero-Riscy) or a more powerful RV32IMFC ISA with custom DSP extensions for embedded signal processing.
  • Western Digital, in December 2018 announced an RV32IMC core called SweRV EH1 featuring an in-order 2-way superscalar and nine-stage pipeline design. In December 2019, WD announced the SweRV EH2 an in-order core with two hardware threads and a nine-stage pipeline and the SweRV EL2 a single issue core with a 4-stage pipeline[114] WD plans to use SweRV based processors in their flash controllers and SSDs, and released it as open-source to third parties in January 2019.[115][116][117]
  • NEORV32 by Stephan Nolting,[118] a highly-configurable 32-bit microcontroller unit (MCU) class RV32[I/E]MACUX_Zbb_Zfinx_Zicsr_Zifencei CPU with on-chip debugger support written in platform-independent VHDL. The project includes a microcontroller-like SoC that already includes common modules like UART, timers, SPI, TWI, a TRNG and embedded memories.
  • Alibaba Group, in July 2019 announced the 2.5 GHz 16-core 64-bit (RV64GCV) XuanTie 910 out-of-order processor.[119] In October 2021 the XuanTie 910 was released as Open-Source.[120]
  • The Institute of Computing Technology of the Chinese Academy of Sciences (ICT CAS), in June 2020 launched the XiangShan high-performance RISC-V processor project.[121][122]


A normal problem for a new instruction set is a lack of CPU designs and software — both issues limit its usability and reduce adoption.[10] RISC-V has a large number of CPU designs. RISC-V software includes toolchains, operating systems, middleware and design software.

Available RISC-V software tools include a GNU Compiler Collection (GCC) toolchain (with GDB, the debugger), an LLVM toolchain, the OVPsim simulator (and library of RISC-V Fast Processor Models), the Spike simulator, and a simulator in QEMU (RV32GC/RV64GC). JEP 422: Linux/RISC-V Port is already integrated into mainline OpenJDK repository.

Operating system support exists for the Linux kernel, FreeBSD, NetBSD, and OpenBSD but the supervisor-mode instructions were unstandardized before version 1.11 of the privileged ISA specification,[5] so this support is provisional. The preliminary FreeBSD port to the RISC-V architecture was upstreamed in February 2016, and shipped in FreeBSD 11.0.[123][87] Ports of the Debian[124] and Fedora[125] Linux distributions, and a port of Haiku,[126] are stabilizing (both only support 64-bit RISC-V, with no plans to support 32-bit version). A port of Das U-Boot exists.[127] UEFI Spec v2.7 has defined the RISC-V binding and a TianoCore port has been done by HPE engineers[128] and is expected to be upstreamed. There is a preliminary port of the seL4 microkernel.[129][130] Hex Five released the first Secure IoT Stack for RISC-V with FreeRTOS support.[131] Also xv6, a modern reimplementation of Sixth Edition Unix in ANSI C used for pedagogical purposes in MIT, was ported. Pharos RTOS has been ported to 64-bit RISC-V[132] (including time and memory protection). Also see Comparison of real-time operating systems.

A simulator exists to run a RISC-V Linux system on a web browser using JavaScript.[133][134][135]

QEMU supports running (using binary translation) 32- and 64-bit RISC-V systems (e.g. Linux) with a number of emulated or virtualized devices (serial, parallel, USB, network, storage, real time clock, watchdog, audio), as well as running RISC-V Linux binaries (translating syscalls to the host kernel). It does support multi-core emulation (SMP).[136]

The Creator simulator is portable and allows the user to learn various assembly languages of different processors (Creator has examples with an implementation of RISC-V and MIPS32 instructions).[137][138][139][140]

The extensible educational simulator WepSIM implements a (microprogrammed) subset of RISC-V instructions (RV32I+M) and allows the execution of subroutines in assembly.[141][142]

A number of languages have been applied to creating RISC-V IP cores including a Scala-based hardware description language, Chisel,[143] which can reduce the designs to Verilog for use in devices, and the CodAL processor description language which has been used in to describe RISC-V processor cores and to generate corresponding HDKs (RTL, testbench and UVM) and SDKs.[144] The RISC-V International Compliance Task Group has a GitHub repository for RV32IMC.[145]

Development tools

  • IAR Systems released the first version of IAR Embedded Workbench for RISC-V, which supports RV32 32-bit RISC-V cores and extensions in the first version. Future releases will include 64-bit support and support for the smaller RV32E base instruction set, as well as functional safety certification and security solutions.
  • Lauterbach added support for RISC-V to their TRACE32 JTAG debuggers.[146][147] Lauterbach also announced [148] support for SiFives RISC-V NEXUS based processor trace.
  • SEGGER added support for RISC-V cores to their debug probe J-Link,[149] their integrated development environment Embedded Studio,[150] and their RTOS embOS and embedded software.[151]
  • UltraSOC proposed a standard trace system and donated an implementation.

See also


  1. Big and bi-endianness supported as extensions
  2. The designation V (Roman numeral '5') represents RISC-V as the 5th generation RISC architecture that was developed at the University of California, Berkeley since 1981[2]


  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 Waterman, Andrew; Asanović, Krste (13 December 2019). "The RISC-V Instruction Set Manual, Volume I: Unprivileged ISA version 20191213". RISC-V International. 
  2. Urquhart, Roddy (29 March 2021). "What Does RISC-V Stand For? A brief history of the open ISA". Systems & Design: Opinion. Semiconductor Engineering. 
  3. 3.0 3.1 "Contributors". Regents of the University of California. 
  4. 4.0 4.1 Waterman, Andrew; Asanović, Krste (7 May 2017). "The RISC-V Instruction Set Manual, Volume I: Base User-Level ISA version 2.2". RISC-V International. 
  5. 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 Waterman, Andrew; Asanović, Krste (3 December 2021). "The RISC-V Instruction Set Manual Volume II: Privileged Architecture Document Version 20211203". RISC-V International. 
  6. Newsome, Tim; Wachs, Megan (22 March 2019). "RISC-V External Debug Support Version 0.13.2 d5029366d59e8563c08b6b9435f82573b603e48e". RISC-V International. 
  7. Demerjian, Chuck (August 7, 2013). "A long look at how ARM licenses chips: Part 1". SemiAccurate. 
  8. Demerjian, Chuck (August 8, 2013). "How ARM licenses its IP for production: Part 2". SemiAccurate. 
  9. "Wave Computing Closes Its MIPS Open Initiative with Immediate Effect, Zero Warning". 2019-11-15. 
  10. 10.0 10.1 10.2 10.3 10.4 10.5 Asanović, Krste. "Instruction Sets Should be Free". Regents of the University of California. 
  11. "Rocket Core Generator". Regents of the University of California. 
  12. Celio, Christopher; Love, Eric. "ucb-bar/riscv-sodor". Regents of the University of California. 
  13. 13.0 13.1 "SHAKTI Processor Program". Indian Institute of Technology Madras. 
  14. Celio, Christopher. "CS 152 Laboratory Exercise 3". Regents of the University of California. 
  15. 15.0 15.1 15.2 15.3 15.4 Waterman, Andrew; Asanović, Krste (31 May 2016). "The RISC-V Instruction Set Manual, Volume I: Base User-Level ISA version 2.1". University of California, Berkeley. 
  16. 16.0 16.1 Patterson, David A.; Ditzel, David R. (October 1980). "The Case for the Reduced Instruction Set Computer". ACM SIGARCH Computer Architecture News 8 (6): 25. doi:10.1145/641914.641917. 
  17. "Amber ARM-compatible core".,amber. 
  18. "ARM4U". OpenCores.,arm4u. 
  19. Asanović, Krste. "The RISC-V Instruction Set Manual, Volume I: Base User-Level ISA". Regents of the University of California. 
  20. Hruska, Joel (21 August 2014). "RISC rides again: New RISC-V architecture hopes to battle ARM and x86 by being totally open source". 
  21. "RISC-V History". 
  22. "A new blueprint for microprocessors challenges the industry's giants". The Economist. 2019-10-03. ISSN 0013-0613. 
  23. 23.0 23.1 "RISC-V Foundation". RISC-V Foundation. 
  24. "Design Automation Conference". 
  25. "U.S.-based chip-tech group moving to Switzerland over trade curb fears" (in en). Reuters. 2019-11-26. 
  26. "RISC-V History - RISC-V International". 
  27. "The Linley Group Announces Winners of Annual Analysts' Choice Awards" (Press release). The Linley Group. 12 January 2017. Retrieved 21 January 2018.
  28. 28.0 28.1 "Bit-Manipulation ISA-extensions". RISC-V International. November 2021. 
  29. "Vector Extension". RISC-V International. November 2021. 
  30. 30.0 30.1 "RISC-V Cryptography Extensions Volume I Scalar & Entropy Source Instructions". 2022-02-18. 
  31. "RISC-V Profiles". Discussion. 2022. 
  32. RISC-V Platform Horizontal Subcommittee (December 2021). "RISC-V Platform Specification". 
  33. 33.0 33.1 33.2 33.3 33.4 33.5 33.6 33.7 33.8 Waterman, Andrew (13 May 2011). Improving Energy Efficiency and Reducing Code Size with RISC-V Compressed. U.C. Berkeley: Regents of the University of California. p. 32. Retrieved 25 August 2014. 
  34. Waterman, Andrew. "The RISC-V Compressed Instruction Set Manual Version 1.9 (draft)". 
  35. 35.0 35.1 Brussee, Rogier. "A Complete 16-bit RVC". RISC-V Foundation. 
  36. 36.0 36.1 Brussee, Rogier. "Proposal: Xcondensed, [a ... Compact ... 16 bit standalone G-ISA"]. Google Groups. 
  37. Phung, Xan. "Improved Xcondensed". RISC-V Foundation. 
  38. Ionescu, Liviu. "The RISC-V Microcontroller Profile". 
  39. Barros, Cesar (1 April 2018). "Proposal: RV16E". RISC-V ISA Developers (Mailing list). Retrieved 2 April 2018.
  40. Bonzini, Paolo; Waterman, Andrew. "Proposal for Virtualization without H mode". RISC-V ISA Developers (Mailing list). Retrieved 24 February 2017.
  41. "RISC-V Bitmanip Extension Document Version 0.93". RISC-V Foundation. 2021-01-10. 
  42. 42.0 42.1 "Instruction Summary for a "P" ISA Proposal". ANDES Technologies. 
  43. Su, Charlie (30 June 2018). "Comprehensive RISC-V Solutions for AIoT". RISC-V Foundation. 
  44. Lee, Ruby; Huck, Jerry (February 25, 1996). "64-bit and Multimedia Extensions in the PA-RISC 2.0 Architecture". pp. 152–160. doi:10.1109/CMPCON.1996.501762. ISBN 0-8186-7414-8. 
  45. Lee, Ruby B. (April 1995). "Accelerating Multimedia with Enhanced Microprocessors". IEEE Micro 15 (2): 22–32. doi:10.1109/40.372347. Retrieved 21 September 2014. 
  46. 46.0 46.1 46.2 46.3 46.4 46.5 46.6 Schmidt, Colin; Ou, Albert; Lee, Yunsup; Asanović, Krste. "RISC-V Vector Extension Proposal". Regents of the University of California. 
  47. 47.0 47.1 "Release Vector Extension 1.0, frozen for public review · riscv/Riscv-v-spec". 
  48. Ou, Albert; Nguyen, Quan; Lee, Yunsup; Asanović, Krste. "A Case for MVPs: Mixed-Precision Vector Processors". Regents of the University of California. 
  49. Lee, Yunsup; Grover, Vinod; Krashinsky, Ronny; Stephenson, Mark; Keckler, Stephen W.; Asanović, Krste. "Exploring the Design Space of SPMD Divergence Management on Data-Parallel Architectures". Regents of the University of California. 
  50. 50.0 50.1 50.2 50.3 50.4 Bradbury, Alex; Wallentowitz, Stefan. "RISC-V Run Control Debug". RISC-V Foundation. 
  51. Newsome, Tim. "RISC-V Debug Group > poll results". RISC-V Foundation.!topic/debug/FDmZUk7YCNw. 
  52. McGooganus. "riscv-trace-spec". 
  53. Dahad, Nitin. "UltraSoC Tackles RISC-V Support Challenge by Donating Trace Encoder". Aspencore. 
  54. "RISC-V Cores and SoC Overview". RISC-V. 25 September 2019. 
  55. "D1". 
  56. 56.0 56.1 56.2 "RISC-V International Members". 
  57. "At CES2022 Bouffalo Shows its Matter Turnkey Solution". 
  58. "CloudBEAR". 
  59. riscv/riscv-cores-list, RISC-V, 2021-02-06,, retrieved 2021-02-09 
  60. "Codasip announces RISC-V processor cores providing multi-core and SIMD capabilities". 
  61. "3.6.2 Ultra-Low-Power Co-Processor". ESP32-S2 Family Datasheet V1.1. Espressif Systems. 2020. Retrieved 2020-06-09. 
  62. "ESP32-C3 Family Datasheet V0.4". Espressif Systems. 2020. 
  63. Manners, David (2021-06-08). "Fraunhofer licensing fault-tolerant RISC core for safety-critical applications" (in en). 
  64. "GigaDevice Unveils The GD32V Series With RISC-V Core in a Brand New 32-bit General Purpose Microcontroller". 23 August 2019. 
  65. "Sipeed Longan Nano - RISC-V GD32VF103CBT6 Development Board" (in en). 
  66. Kleidermacher, Dave; Seed, Jesse; Barbello, Brandon (2021-10-27). "Pixel 6: Setting a new standard for mobile security". 
  67. "GreenWaves GAP8 is a Low Power RISC-V IoT Processor Optimized for Artificial Intelligence Applications". 27 February 2018. 
  68. Yoshida, Junko (2018-02-26). "AI Comes to Sensing Devices". EE Times. 
  69. "GreenWaves Technologies Announces Availability of GAP8 Software Development Kit and GAPuino Development Board" (Press release). 2018-05-22.
  70. Leibson, Steven (9 January 2023). "MIPS Rolls Out Its First RISC-V Processor Core – It’s a Big 'Un". 
  71. Robinson, Dan (11 May 2022). "MIPS discloses first RISC-V chips coming in Q4 2022". 
  72. Shilov, Anton (9 December 2020). "Seagate Develops Own RISC-V Cores for Storage Controllers". Tom's Hardware. 
  73. "HiFive1". 
  74. SiFive. "Hi-Five1: Open-source Arduino-Compatible Development Kit". 
  75. "FU540 SoC CPU". 
  76. "Syntacore". 
  77. "SCR1, open-source RISC-V core". 
  78. "RISC-V workshop proceedings". 11 December 2016. 
  79. Manners, David (23 November 2016). "Codasip and UltraSoC Combine on RISC-V". Metropolis International Group, Ltd.. 
  80. Desikan, Shubashree (2018-08-06). "IIT-Madras powers up a desi chip" (in en-IN). The Hindu. ISSN 0971-751X. 
  81. 81.0 81.1 "Meet India's Atmanirbhar Microprocessor chip 'Moushik', meant for IoT devices" (in en). 
  82. Ashenden, Peter (9 November 2016). "Re: [isa-dev] RISC V ISA for embedded systems". RISC-V ISA Developers (Mailing list). Retrieved 10 November 2016. At ASTC (, we have an implementation of RV32EC as a synthesizable IP core intended for small embedded applications, such as smart sensors and IoT.
  83. "C-DAC announces Tech Conclave 2019". 
  84. Sharwood, Simon (19 August 2020). "India selects RISC-V for semiconductor self-sufficiency contest: Use these homegrown cores to build kit" (in en). 
  85. "VEGA MICROPROCESSORS". 9 July 2021. 
  86. "NOEL-V Processor". 
  87. 87.0 87.1 "FreeBSD Foundation: Initial FreeBSD RISC-V Architecture Port Committed". 4 February 2016. 
  88. "Esperanto exits stealth mode, aims at AI with a 4,096 core 7nm RISC-V monster". January 2018. 
  89. "PULPino GitHub project". 
  90. "PULP Platform". 
  91. "Accelerator Stream". 
  92. Redmond, Calista (28 January 2023). "How the European Processor Initiative is Leveraging RISC-V for the Future of Supercomputing". RISC-V International News. RISC-V International. 
  93. Halfacree, Gareth (10 June 2021). "RISC-V boffins lay out a plan for bringing the architecture to high-performance computing" (in en). 
  94. "IIT Madras Open Source Processor Project". IIT Madras. 26 August 2014. 
  95. "IIT Madras Develops and Boots up MOUSHIK Microprocessor for IoT Devices". 24 September 2020. 
  96. "lowRISC website". 
  97. Xie, Joe (July 2016). NVIDIA RISC V Evaluation Story. 4th RISC-V Workshop. Youtube. Archived from the original on 2021-11-13.
  98. "RV64X: A Free, Open Source GPU for RISC-V". 
  99. Frumusanu, Andrei (October 30, 2019). "SiFive Announces First RISC-V OoO CPU Core: The U8-Series Processor IP". 
  100. "Esperanto ET-SoC-1 1092 RISC-V AI Accelerator Solution at Hot Chips 33". 24 August 2021. 
  101. Gwennap, Linley (December 13, 2021). "Ventana Develops RISC-V Chiplet". Microprocessor Report. 
  102. Dahad, Nitin (September 6, 2021). "RISC-V Chiplet Startup Raises $38m, Targets Data Center Compute". 
  103. Asanović, Krste. "rocket-chip". RISC-V International. 
  104. Celio, Christopher. "riscv-boom". Regents of the University of California. 
  105. Celio, Christopher. "riscv-sodor". Regents of the University of California. 
  106. Celio, Chris. "ucb-bar/riscv-sodor". Regents of the University of California. 
  107. Wolf, Claire. "picorv32". 
  108. "scr1". Syntacore. 
  109. Kindgren, Olof. "SERV - The serial RISC-V CPU". 
  110. Windgren, Olof. "Bit by Bit, how to fit 8 RISC-V cores in a $28 FPGA" (Video, 4:23). RISC-V Foundation. 
  111. Kindgren, Olof. "SERV M extension" (Video, at 2:39). 
  112. Halfacree, Gareth. "New CoreScore World Record Crams 6,000 SERV RISC-V Cores Into a Single FPGA". Avnet. 
  113. Traber, Andreas. "PULP: Parallel Ultra Low Power". ETH Zurich, University of Bologna. 
  114. Shilov, Anton. "Western Digital Rolls-Out Two New SweRV RISC-V Cores For Microcontrollers". 
  115. Shilov, Anton. "Western Digital Reveals SweRV RISC-V Core, Cache Coherency over Ethernet Initiative". 
  116. "Western Digital Releases SweRV RISC-V Core Source Code" (in en-US). 2019-01-28. 
  117. on GitHub
  118. Nolting, Stephan (2022). neorv32. doi:10.5281/zenodo.7030070. Retrieved 9 September 2021. 
  119. "China's Alibaba is making a 16-core, 2.5 GHz RISC-V processor". 
  120. "Alibaba open sources four RISC-V cores: XuanTie E902, E906, C906 and C910". 20 October 2021. 
  121. XiangShan repository on Github
  122. XiangShan open-source 64-bit RISC-V processor to rival Arm Cortex-A76 - CNX Software
  123. "riscv - FreeBSD Wiki". 
  124. Montezelo, Manuel. "Debian GNU/Linux port for RISC-V 64".!msg/sw-dev/u4VcUtB9r94/4HiFYBhXAAAJ. 
  125. "Architectures/RISC-V". Red Hat. 
  126. "My Haiku RISC-V port progress". 12 May 2021. 
  127. Begari, Padmarao. "U-Boot port on RISC-V 32-bit is available". Microsemi.!topic/sw-dev/j63wzz2ylY8. 
  128. on GitHub
  129. Almatary, Hesham. "RISC-V, seL4". Commonwealth Scientific and Industrial Research Organisation (CSIRO). 
  130. Almatary, Hesham. "heshamelmatary". 
  131. "MultiZone Secure IoT Stack, the First Secure IoT Stack for RISC-V". Hex Five Security, Inc.. 22 February 2019. 
  132. "Pharos" (in en). 
  133. "ANGEL is a Javascript RISC-V ISA (RV64) Simulator that runs riscv-linux with BusyBox.". 
  134. Lee, Yunsup (2014-03-05). "Boot RISC-V Linux in your web browser!" (in en-US). 
  135. "ANGEL – RISC-V". 
  136. "Documentation/Platforms/RISCV". QEMU Wiki. 
  137. Camarmas-Alonso, Diego; Garcia-Carballeira, Felix; Del-Pozo-Puñal, Elias; Mateos, Alejandro Calderon (23 July 2021). "CREATOR: Simulador didáctico y genérico para la programación en ensamblador" (in Spanish). XXXI Jornadas de Paralelismo (JP20/21). Malaga. doi:10.5281/zenodo.5130302. 
  138. Camarmas-Alonso, Diego; Garcia-Carballeira, Felix; Del-Pozo-Punal, Elias; Mateos, Alejandro Calderon (Aug 2, 2022). "A new generic simulator for the teaching of assembly programming". 2021 XLVII Latin American Computing Conference (CLEI). pp. 1–9. doi:10.1109/CLEI53233.2021.9640144. ISBN 978-1-6654-9503-5. Retrieved August 2, 2022. 
  139. CREATOR Web with RISC-V example:
  140. CREATOR source code on GitHub:
  141. "WepSIM with RISC-V_im example". WepSIM. 
  142. "WepSIM homepage". 
  143. "Chisel: Constructing Hardware in a Scala Embedded Language". Regents of the University of California. 
  144. "Codasip Studio" (in en-US). 
  145. riscv/riscv-compliance, RISC-V, 2021-02-12,, retrieved 2021-02-19 
  146. "RISC-V Debugger". 
  147. "Lauterbach and SiFive Bring TRACE32 Support for High-Performance RISC-V Cores". 
  148. "TRACE32 supports SiFive's RISC-V trace". 
  149. "SEGGER Adds Support for SiFive's Coreplex IP to Its Industry Leading J-Link Debug Probe". 
  150. "PR: SEGGER Embedded Studio supports RISC-V architecture". 
  151. "PR: SEGGER presents RTOS, stacks, middleware for RISC-V". 

Further reading

External links

Template:Programmable logic