(1/13) A Beginners Guide to RISC-V
There are many standards that define how software and hardware communicate, but one is becoming increasingly central. RISC-V is one of the most important standards in modern computing, offering full functionality with open-source values.
(2/13) There's a time-honored tradition in computer science: when learning a new language the first program you create is "Hello World." All you need to do is get your computer to display the phrase "Hello, World!" on its screen.
Here's an example for python:
(3/13) While languages like python are use for humans to use and understand, they are far too complex for the hardware that underlies all computing.
But a CPU speaks in 0s and 1s - it cannot understand a complicated, abstract command like "print."
(4/13) We solve this through a series of intermediate languages. Code is translated into simpler forms until the same program is expressed into terms the CPU can understand.
Thus, developers can focus on functionality and abstract away the specifics of how a CPU works.
(5/13) An Instruction Set Architecture (ISA) is the interface between software and hardware, defining the machine-level instructions a CPU can execute and how programs are able to accesses them.
Once complied to an ISA, a program can run on any CPU that uses that same ISA.
x.com/LogarithmicRex/status/1870152417029042519
(6/13) There are many different ISAs - some tied to particular hardware, focused on specific functionality, or optimized for power efficiency.
In practice, there are only a few ISAs in widespread use: x86 (specific to @intel), ARM (used by @apple, @Qualcomm, etc) and RISC-V.
(7/13) Like all ISAs, RISC-V (pronounced "risk-five" defines the instructions that a processor can execute but does not specify the physical design of the processor itself.
If a software system is built to compile to RISC-V, it can run on any CPU that implements RISC-V.
(8/13) Invented in 2010, RISC-V has a distinct feature that sets it apart most ISAs (particularly the widely used ISAs): RISC-V is an open standard.
Similar to open source, an open standard is publicly accessible, freely usable and open to contributions/development by anyone.
(9/13) While there are many nuances and details regarding RISC-V, the reason it has exploded in popularity and is becoming more and more important is because it is an open standard.
An open standard democratizes processor design, lowers costs, and fosters innovation.
(10/13) RISC-V is also becoming more relevant because of virtual computing.
Virtual machines (VMs) are software-based emulations of a physical computer that run inside of a host-system. A VM offers an isolated computing environment that behaves like a real-world computer.
x.com/LogarithmicRex/status/1574208089661747200
(11/13) With ISAs, implementing hardware in software isn't particularly challenging.
You simply build a platform around the ISA (just like a normal computer), and instead of feeding it into a real CPU, you give it to a program that emulates a CPU using the same ISA.
(12/13) Because RISC-V is a generic interface for CPUs, it is perhaps the most popular ISA to form the foundation of a VM.
And thanks to its open source-nature, RISC-V can be implemented permissionlessly, modified/extended quickly and deployed without paying any royalties.
(13/13) So here's what you need to know: RISC-V is...
- an ISA, which is the interface between software and hardware (or virtual hardware)
- an open standard and generally considered the generic interface for hardware
- is growing in popularity, particularly in virtual computing