Computer Organization and Design
Sections 4.1-4.4
In this section, we will be digging into the necessary components and details on how to design a processor. The goal of this section will be to design a full RISC-V processor, which is Assignment 2 (Due 4/17).
“Executing” an instruction takes many different steps. It’s more complicated than just “execution.”
Canonically, we have the following five steps to complete an instruction:
The videos below explains these steps in more detail and some example instructions.
This first video discusses the first two steps, fetching and decoding an instruction. In this video, I also discuss some details of what a register file actually looks like and how it operates.
Next, we look at details of execute, memory, and writeback.
The way the processor in your book is designed (and the DINO CPU) is optimizing each structure for maximum reuse. For instance, there is a single ALU that is used for all of the different R-type and I-type instructions, and lw/sw, and jumps, etc.
To reuse the same hardware structure for multiple instructions, this means that the hardware might need to accept input data from different sources (e.g., the second input of the ALU is from readdata1
for R-types and from the immediate generator for I-types).
Before watching the next videos, how do you think we can implement this in hardware? Do we use an OR
gate? Something else? We can’t just wire two things together…
Next, we’ll discuss how to split up the hardware into two parts, the control path and the data path. By splitting the hardware this way, we’re able to use one set of hardware to execute many different instructions.
Now, we can use the following design (what you will be implementing in Assignment 2) to run any RISC-V instruction with one set of hardware!
In the next video, I go through a couple of example instructions with the datapath that you will be implementing in Assignment 2.
Use Canvas to complete the quiz
In these videos, we will analyze this microarchitecture to understand the performance characteristics and limits of this design.
Note that these videos will be using the design from spring quarter 2020 which is a bit different than your design. However, the idea is the same. The quiz below will be using your design for Winter Quarter 2021 so you will see examples using that design too.
This video discusses the performance of the above single cycle design and provides an example of computing the performance.
This video discusses the limitations of single cycle designs and why real systems aren’t implemented this way. In this video I introduce a second CPU design. This design isn’t very “realistic” in that no real processor implements it. However, we have freedom to make any design that we want, and this is an interesting point in the design space.
Use Canvas to complete the quiz