Hardware Review
Notes
- We will begin chapter 4 now.
- The first half of the chapter is understanding the basic data path and control of a single cycle cpu.
- We need this for the second half of the chapter which investigates potential improvements to speed up the cpu.
- H&P point out, while we are studying a somewhat idealized processor, the concepts translate directly into modern cpus.
- We will be looking at pictures like 4.17 quite a bit
- There are many of these in the book.
- They can't be interactive, so they flood us with pictures.
- Most of these are only partially complete, as they add detail as they go along.
- You will not need this on the midterm, but you will have access to one on the final exam.
- In these notes, I want to review the basics of a CPU and supporting computer orginaziation.
- MUX - multiplexor
- n control lines
- 2n input data lines
- 1 output data line
- The control lines slect a single data line to allow through.
- We use a mux to select one output from many inputs.
- Decoder
- n control lines
- 2n output data lines
- Based on the input line, only one data line is selected.
- We use a decoder to select one unit to activate
- Registers
- Function
- Interface
- Note the registers in the LEG/ARM need to be a bit more coplex
- Since we read/write 1/2/4/8 bytes we need an access control mechanism
- We will not worry about this, let's just pretend everything is 4/8 bytes as needed.
- Special purpose registers
- Register File
-
- The Digital File.
- read two registers at the same time
- Write to a single register on demand
- We know that reads occur at the beginning of the cycle and writes at the end.
- Control:
- Read Reg1, Read Reg2 (input)
- Read Data1, ReadData 2 (output)
- Write Register (input)
- Write Data (input)
- RegWrite (input)
- Operation
- Read
- The instruction contains addresses of the register we wish to read from.
- This is placed on Read Reg (1/2) outside of the RF
- This drives a mux that selects the proper register for output on Read Data(1/2)
- Write
- The desination of the data is put on Write Register
- The data to write is put on Write Data
- RegWrite is enabled at the proper time by the Control Unit.
- Outside of the register file
- Reg2Loc is controlled by the control unit
- Based on the instruction, it selects between Inst[4-0] and Inst[20-16]
- This sets ReadReg2
- Note ReadReg1 is always Inst[9-5]