Simple Implementation Scheme
Simple Implementation Scheme
SCHEME
SIMPLE IMPLEMENTATION
Simple implementation covers
Load word (lw), store word (sw),
Branch equal (beq),
Arithmetic-logical instructions
add, sub, AND, OR, and set on less than (slt)
ALU CONTROL
For load word and store word instructions
ALU is used to compute the memory address by addition
For R-type instructions
ALU control inputs based on the 2‑bit ALUOp control and the 6 ‑bit
function code
MULTIPLE LEVELS OF DECODING
The main control unit generates the ALUOp bits
ALUOp bits are used as input to the ALU control
ALU control generates the actual signals to control the ALU unit
Multiple levels of control can reduce the size of the main control
unit
Smaller control units potentially increase the speed of the
control unit
Such optimizations are important, since the speed of the control
unit is often critical to clock cycle time
THE TRUTH TABLE FOR THE 4 ALU
CONTROL BITS
Only the truth table entries for which the ALU control must have
a specific value are shown
Don’t-care term indicates that the output does not depend on the
value of the input corresponding to that column
MAIN CONTROL UNIT DESIGN
Instruction format
INSTRUCTION FORMAT (2)
(a) R-format instructions
Have an opcode of 0. Three register operands: rs, rt, and rd
Fields rs and rt are sources, and rd is the destination
ALU function is in funct field, decoded by ALU control design
Implement add, sub, AND, OR, and slt
The shamt field is used only for shifts
Nine control signals (seven single bit control lines and one 2-bit
ALUOp) can now be set on the basis of six input signals to the
control unit (opcode bits 31 to 26)
DATAPATH WITH CONTROL UNIT AND
CONTROL SIGNALS
CONTROL SIGNAL