What is RISC-V, and why it matters?

This is my second blog post after starting working on my GSoC 2020 project at FOSSi Foundation.

Have a look at the first one at GSoC 2020 — My First Blog Post!

RISC-V has sparked a revolution in computer architecture and is widely popular today in both industry and academia. RISC-V recently celebrated its 10th birthday. So I thought about putting forward by two cents on RISC-V and why it is interesting.

The classic stuff: RISC vs. CISC

You probably have heard of this terminology through EE/CS-related courses. CISC (Complex Instruction Set Computing), focuses on a minimum number of instructions to complete a given task. Hence, one instruction can result in multiple operations in hardware. This probably was designed so to reduce programmer effort before high-level languages and compilers were mature.

RISC (Reduced Instruction Set Computing), on the other hand, simplifies instructions to the simplest resolvable operation in hardware. CISC nature makes the hardware especially control logic comparatively complicated, and hence higher CPI (Clocks-cycles Per Instruction).

As a simple example, let’s consider RISC-V ADD vs. x86 ADD instructions,
in x86 this one instruction can have 22 different opcodes, covering all types of operands, sign extension, variable register widths, etc. Whereas in RISC-V ADD, the operands can only be registers with single opcode.

The term RISC (Reduced Instruction Set Computing) is coined by ACM Turing Awardee Prof. David Patterson (UC Berkeley). The same group worked on the development of MIPS (one of the popular ISAs used in Playstation, routers, etc.) and then RISC-V recently.

Since consumer-grade computers started with designs like the Intel 8086, it dragged along till the present day. Mainly due to the concern for Intel (followed by AMD) about maintaining backward compatibility with the architecture that turned out to be the most popular and widespread one.
But, 8086 was launched 40 years ago, everything in the computer and semiconductor industry has changed by leaps and bounds with time. There have been improvements in Intel architectures too, but they are more of extensions than something from the ground up.

Security, a significant concern

RISC, as a methodology has been around for decades. ARM, the biggest processor IP designer for smartphones and other embedded devices, is based on RISC. Then why does RISC-V still matter?

The most significant factor which contributes to the importance of RISC-V is openness. ISAs like x86 and ARM have been designed for commercial usage, and you never know the underlying hardware completely as IP protects them. This has always been an issue that raises privacy and security related questions about these designs. Critical bugs like Spectre and Meltdown have been discovered in processors recently.

RISC-V is comparatively much more secure as it is a free and open standard, and potential ambiguities can be identified by the wider community easily. This is considered as the most crucial USP for industries to adopt to RISC-V. Also, many of the processor designs based on RISC-V are made open-source. One recent example is SweRV cores designed by Western Digital.

Configurability

Another compelling reason to use RISC-V is its highly flexible and modular nature. The base 32-bit ISA comprises of only 47 instructions, supplemented by numerous optional “extensions” such as Multiply / Divide, Floating-Point, Compressed, Atomic, Vector, etc. And these are just the standard ones and officially part of the specifications. Designers are free to implement their extensions for domain-specific needs.

Community

RISC-V is equally popular in industry and academia. Numerous tech giants such as Google, WD, Qualcomm, Samsung, NXP, Microchip, Synopsys, Cadence, etc. are already members of RISC-V International.

Many universities have adopted RISC-V for computer architecture courses owing to its simplicity to understand and learn. Many others, such as ETH Zurich, IIT Madras, MIT, NUS, are doing important research on RISC-V based topics.

Future

The future looks bright for RISC-V. In just a few years after it’s inception, it has gained tremendous support and is already reaching consumer products. The openness and IP related savings shall promote fabless startups to innovate and enter this industry, which has been dominated by billion-dollar companies for years. Organizations like SiFive and InCore Semiconductors have already ventured on this path.

Closing Remarks

I am new to blog writing and would be very happy to get feedback. If you find any mistake in the content, please let me know through comments.

Cheers!

GSoC 2020 @ FOSSi Foundation | EE Junior @ NITK, Mangalore, India | (https://shivampotdar.tech)