• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microcontroller Tips

Microcontroller engineering resources, new microcontroller products and electronics engineering news

  • Products
    • 8-bit
    • 16-bit
    • 32-bit
    • 64-bit
  • Applications
    • 5G
    • Automotive
    • Connectivity
    • Consumer Electronics
    • EV Engineering
    • Industrial
    • IoT
    • Medical
    • Security
    • Telecommunications
    • Wearables
    • Wireless
  • Learn
    • eBooks / Tech Tips
    • EE Training Days
    • FAQs
    • Learning Center
    • Tech Toolboxes
    • Webinars/Digital Events
  • Resources
    • Design Guide Library
    • DesignFast
    • LEAP Awards
    • Podcasts
    • White Papers
  • Videos
    • EE Videos & Interviews
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Engineering Training Days
  • Advertise
  • Subscribe

RISC-V: an Open Instruction Set Architecture

February 22, 2018 By Scott Thornton 1 Comment

The benefits of open source have been bestowed upon an Instruction Set Architecture (ISA) called RISC-V. One of the earliest, best-known examples of open source technology is Linux. For a widely accepted, official definition of open source, see The Open Source Initiative. Open source does not stop at Linux, however. One of the more recent open source initiatives is for the open source RISC-V, pronounced “risk five.” RISC-V is an extensible, base integer Reduced Instruction Set Computer (RISC) ISA and was begun at UC Berkeley as a 2010 “summer project” to create a simple ISA for classroom instruction that would have no legal entanglements as the intellectual property (IP) of another company. RISC-V took longer than expected to get out, and was officially launched as a royalty-free, open source project in 2015 by The RISC-V Foundation.

RISC-V was meant to be similar to other RISC ISAs, but also to be kept simple, yet also provide the ability for extensive customization and specialization. The base ISA can be expanded with standard optional extensions and opcodes for creating customized instructions. Thus, the RISC-V ISA extensions are divided into standard and non-standard extensions. The base integer instructions cannot be redefined, however.

One benefit of that simplicity is that RISC-V ISA can be used from small embedded processors up through high-performance supercomputers, spanning a broad range of applications. There are three different RISC-V instruction sets with addresses of 32-, 64-, and 128-bits in length. As mentioned above, open source also creates a standard whereby everyone knows what to expect and skill sets are portable across companies. RISC-V has the potential to save much time and effort in a very complicated area of engineering with a standard, portable ISA. As open source, anyone can take RISC-V ISA and change it or add proprietary portions. A standard, open ISA prevents wasted energy on “reinventing the wheel” in a very complex, advanced technology, thus benefitting many. An ISA does not directly affect performance or energy efficiency as much as how the ISA is used. As a necessary component of embedded processing that can add a good deal to the cost of an embedded system, RISC-V offers to save a considerable amount of time and money.

An added benefit is that RISC-V is now taught in a growing number of colleges, making graduates that much more valuable in the first year of employment. Research and education on ISAs have the potential to be more realistic, leveraging open software stacks and hardware. The introduction of the RISC-V User Manual states, “Our position is that the ISA is perhaps the most important interface in a computing system, and there is no reason that such an important interface should be proprietary. “

RISC-V currently has 4 base integer instruction sets that are each characterized by the width of their integer registers and the corresponding size of user address space. All use a two’ s complement to represent signed integers. The two primary base integer variants are RV32I and RV64I, which respectively support 32-bit and 64-bit user-level address spaces. RV32E is actually a subset variant of the RV32I base instruction set that was added to support small MCUs. A future 128-bit user address space characterizes the instruction base variant RV128I, which is accommodated by the RISC-V framework. Base ISAs and extensions are combined to indicate a custom ISA. E.g., RV32IMAC denotes 32-bit Integer + Atomic + Multiply + Compressed. RV64GC indicates that the ISA is 64-bit and supports integer, multiply, atomic, single- and double-precision floating-point, and compression to 16-bit instructions. RV64GCXext indicates IMAFDC and a non-standard extension, where “ext” is the name of the non-standard extension. Non-standard extensions (xext) are not described in the specification. See Table 1 for ISA name string options.

 

Base Version
RV32I 32-bit Base integer ISA 2.0 Frozen
RV32E Reduced version of RV32I for embedded systems 1.9
RV64I 64-bit Base integer ISA 2.0 Frozen
RV128I 128-bit Base integer ISA 1.7
Extensions Standard extension for: Version
M Integer multiplication and division 2.0 Frozen
A Atomics 2.0 Frozen
F Single-precision floating-point 2.0 Frozen
D Double-precision floating-point 2.0 Frozen
Q Quad-precision floating-point 2.0 Frozen
L Decimal floating-point 0.0
C 16-bit Compressed instructions 2.0 Frozen
B Bit manipulation 0.0
J Dynamically translated languages 0.0
T Transactional memory 0.0
P Packed-SIMD instructions 0.1
V Vector operations 0.2
N User-level interrupts 1.1
Extensions Stands for:
Xext Non-standard extension “ext” N/A
G General purpose, a moniker for the combined IMAFD N/A

Table 1: ISA name strings. Base ISAs and extensions can be combined to indicate a custom ISA.

Smaller code size can reduce cost in embedded systems. For instance, the amount of flash in a microcontroller often affects the price. Smaller code size can increase performance in cache-based cores as well. RV64 can also use the compressed instruction extension. Something reasonably unique with RISC-V is that you can have a 64-bit instruction in 16-bit architecture.

It would be challenging to cover RISC-V in detail without writing a book, so a small selection is included below.

The RISC-V Instruction Set Manual demonstrates the flexibility of the RISC-V ISA. The base RISC-V ISA is little-endian for accessing memory. Non-standard variants can be made to support big-endian or bi-endian memory systems, however. The load-store architectures only load and store instructions. Accessing memory and arithmetic instructions only operate on CPU registers. There are 32 integer registers in the RISC-V architecture with an additional, optional 32 floating point registers if FP is enabled. The width of the register is determined by the ISA. The RISC-V specification also describes an Application Binary Interface (ABI) which defines standard functions or registers, which is important for software interoperability.

RISC-V categorizes global and local interrupts. The two types of local interrupts are software and timer interrupts, with two local interrupts per hardware thread. Local interrupts are optional and would be used to connect peripheral devices (e.g., a UART interrupt). RISC-V defines global interrupts as an interrupt which can be routed to any hardware thread in a system.

RISC-V defines three levels of privileges called modes. Level 0 is for user or application layer privileges. Level 1 is for supervisor privileges. Level 2 is reserved and level 3 is machine level privileges. Machine mode is the only mode that is required and the highest privileged mode. This allows for a range of targeted implementations, including a least-complicated version where only machine mode is implemented. Machine and supervisor modes each have their own sets of control and status registers (CSRs).

 

RISC-V
Figure 1:  Example RISC-V physical memory protection map. (Source: SiFive Webinar)

RISC-V has physical memory protection, which is used to enforce access restrictions on less privileged modes. With un-trusted user mode software, RISC-V can restrict which levels of memory that software has access to. The RISC-V physical memory protection scheme also has the ability to lock a region of memory. A locked area would enforce permissions on all accesses, including machine mode. This can be used, for example, to secure an area of memory after boot. The only way to unlock that region would be to reset the system. The physical memory protection scheme allows up to 16 protected regions with minimum region size of 4 bytes. RISC-V has support for virtual memory which allows for sophisticated memory management and operating system support.

RISC-V is intended to maintain constancy in the base and each standard extension over time. Changes can be made by layering new instructions as optional extensions. The base integer ISAs will continue to be fully supported as standalone ISAs, regardless of any subsequent extensions. The RISC-V ISA infrastructure includes documentation, ports to support a few operating systems, compiler toolchains, hardware implementations in FPGAs and ASICs, architecture test suites and simulators, community forums, and teaching materials. For more information, you can look at the RISC-V specifications, watch some RISC-V 101 webinars by SiFive, a company founded by the creators of RISC-V, or visit the RISC-V channel on YouTube.

 

You may also like:

  • FPGA devekopment board
    FPGA development board for PolarFire designs
  • RISC vs CISC
    RISC vs. CISC Architectures: Which one is better?

  • RISC-V ecosystem surpasses 100 members globally

  • Webinar: The RISC-V ecosystem is ready for prime time. Get…

  • First RISC-V-based development board for Arduino platform

Filed Under: Embedded, FAQ, Featured, Linux, RISC-V Tagged With: basics, FAQ, microsemicorporation, riscv, sifive

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured Contributions

Five challenges for developing next-generation ADAS and autonomous vehicles

Securing IoT devices against quantum computing risks

RISC-V implementation strategies for certification of safety-critical systems

What’s new with Matter: how Matter 1.4 is reshaping interoperability and energy management

Edge AI: Revolutionizing real-time data processing and automation

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“bills
“microcontroller
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

RSS Current EDABoard.com discussions

  • Output return loss mismatch
  • CST Studio – How to increase frequency step size (e.g. to 100 MHz)?
  • What is the difference between MIMO antenna elements arragned radially across the pentagon shaped substrate versus rectangle shaed substrate?
  • General purpose CMOS Op Amp and PMOS & NMOS from LTSpice library
  • Simple Active Bandpass Filter Oscillates

RSS Current Electro-Tech-Online.com Discussions

  • Cpu coin acceptor and zero delay arcade board.
  • Capacitive Touch On The Profile
  • JBL charge 4 dead motherboard?
  • Guitar electronics project
  • can a AT89C51 be used as a rom?

DesignFast

Design Fast Logo
Component Selection Made Simple.

Try it Today
design fast globle

Footer

Microcontroller Tips

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

Microcontroller Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy