RISC-V Basics
Last updated
Last updated
Here is the complete RV32I ISA. We gonna implement most part of it except the gray part.
The RV32I ISA can be divided into six intruction formats(R/I/S/B/U/J), as shown in the figure below.
Processors are basically FSMs. Each instruction reads and updates this state during execution:
Registers (x0
.. x31
)
Program Counter (PC)
Memory (MEM)
There are multiple implementations for a single instruction set architecture:
Single-cycle
Each instruction executes in a single clock cycle.
Multicycle
Each instruction is broken up into a series of shorter steps with one step per clock cycle.
Pipelined (variant on "multicycle")
Each instruction is broken up into a series of steps with one step per clock cycle.
Multiple instructions execute at once by overlapping in time.
Superscalar
Multiple functional units to execute at once by overlapping in time.
Out of order
Instructions are reordered by the hardware.
The RISC-V related lectures of
The RV32I .