SLIDE 1
CSCI341
Lecture 31, Control
SLIDE 2 RECALL...
- The “datapath” is a representation of the flow of information
(data, instructions) through the CPU
- Implemented as combination of circuitry and combinatorial &
sequential chips
- In order for machine code to cause the machine to “act” a
certain way, there must be control circuitry (not magic).
SLIDE 3
CONTROL
SLIDE 4 OUR IMPLEMENTATION
- Simplified instruction set:
- lw, sw, beq, add/sub/AND/OR, j
SLIDE 5 ALU CONTROL
ALU control Function 0000 and 0001
0010 add 0110 sub 0111 set on lt 1100 nor
SLIDE 6 ALU CONTROL
ALU control Function 0000 and 0001
0010 add 0110 sub 0111 set on lt 1100 nor
“Hey ALU, 0010!” “Ok. My output is equal to the sum of my inputs. Happy now?”
SLIDE 7 ALU CONTROL
- lw and sw
- ALU computes memory address via addition
- beq
- ALU computes address via subtraction
- R-types
- ALU performs one of five actions (eg, add) per funct
SLIDE 8
ALU CONTROL
(We’re not going to care about the logic specifically used to generate ALU control input from ALUOp and Funct)
SLIDE 9
ALU CONTROL
Multiple levels of control decoding are used. Why?
SLIDE 10
ALU CONTROL
SLIDE 11
INSTRUCTION FORMAT TO CONTROL SIGNALS
SLIDE 12
IMPORTANT POINTS OF CONTROL
SLIDE 13
IMPORTANT POINTS OF CONTROL
SLIDE 14
CONTROL UNIT
SLIDE 15
INSTRUCTIONS TO CONTROL UNIT TO CONTROL SIGNALS
SLIDE 16
add $t1, $t2, $t3
SLIDE 17
lw $t1, offset($t2)
SLIDE 18
beq $t1, $t2, label
SLIDE 19
j somewhere
SLIDE 20
CONTROL OVERVIEW
SLIDE 21 SINGLE-CYCLE INSTRUCTION SET
- Look at the PC, fetch the instruction from that address
- “Read” one or two registers per the instruction
- Carry out the instruction
- Prepare PC for the next instruction
SLIDE 22
SINGLE-CYCLE INSTRUCTION SET
What’s wrong with this?
SLIDE 23 HOMEWORK
- Reading 27
- Project 7, “Mmm!”
yes, this is what the reading is really trying to tell you