CSCI341 Lecture 31, Control RECALL... The datapath is a - - PowerPoint PPT Presentation

csci341
SMART_READER_LITE
LIVE PREVIEW

CSCI341 Lecture 31, Control RECALL... The datapath is a - - PowerPoint PPT Presentation

CSCI341 Lecture 31, Control 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


slide-1
SLIDE 1

CSCI341

Lecture 31, Control

slide-2
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
SLIDE 3

CONTROL

slide-4
SLIDE 4

OUR IMPLEMENTATION

  • Simplified instruction set:
  • lw, sw, beq, add/sub/AND/OR, j
slide-5
SLIDE 5

ALU CONTROL

ALU control Function 0000 and 0001

  • r

0010 add 0110 sub 0111 set on lt 1100 nor

slide-6
SLIDE 6

ALU CONTROL

ALU control Function 0000 and 0001

  • r

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
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
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
SLIDE 9

ALU CONTROL

Multiple levels of control decoding are used. Why?

slide-10
SLIDE 10

ALU CONTROL

slide-11
SLIDE 11

INSTRUCTION FORMAT TO CONTROL SIGNALS

slide-12
SLIDE 12

IMPORTANT POINTS OF CONTROL

slide-13
SLIDE 13

IMPORTANT POINTS OF CONTROL

slide-14
SLIDE 14

CONTROL UNIT

slide-15
SLIDE 15

INSTRUCTIONS TO CONTROL UNIT TO CONTROL SIGNALS

slide-16
SLIDE 16

add $t1, $t2, $t3

slide-17
SLIDE 17

lw $t1, offset($t2)

slide-18
SLIDE 18

beq $t1, $t2, label

slide-19
SLIDE 19

j somewhere

slide-20
SLIDE 20

CONTROL OVERVIEW

slide-21
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
SLIDE 22

SINGLE-CYCLE INSTRUCTION SET

What’s wrong with this?

slide-23
SLIDE 23

HOMEWORK

  • Reading 27
  • Project 7, “Mmm!”

yes, this is what the reading is really trying to tell you