Professional Documents
Culture Documents
Slide Lab 3design A MIPS 32-Bit Single-Cycle CPU
Slide Lab 3design A MIPS 32-Bit Single-Cycle CPU
TA: Nguyen Van Hieu Group 6: Luong Tran Nhat Trung Le Minh Hoang Le Hong Thanng
I. Table of Content
Block diagram Extend module Mux RegDst module Shift Left 2 module CheckZero module Mux4Addrto1 module Simulation
Block Diagram
Traditional
After improvements
Extend module
We need a unit to sign-extend the 16-bit offset field in the instruction to a 32bit signed value. In our case, if zero-sign is 0, we will extend zero for whatever sign; and if it is 1, we will extend the sign with 1, or 0
In the above simulation, you can see that with RegDst = 1, the output is input 1. With RegDst = 0, the output is input 0
CheckZero module
This module is used to check if the result of a certain operation is zero or not. If the output is 1, the result is zero; otherwise, it is not zero. Breakthrough : instead of putting the ZeroFlag module inside ALU like we did in Lab 2, we make this task faster by putting outside. Specifically, we check the inputs first. If they are equal, Zero is 1. If they are not, Zero is 0 Below is the simulation of this module
Mux4Addrto1 module
This module is used to combine all muxes on the right upper. Below is to show the improvement specifically
Simulation