csci341
play

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


  1. CSCI341 Lecture 31, Control

  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).

  3. CONTROL

  4. OUR IMPLEMENTATION • Simplified instruction set: • lw, sw, beq, add/sub/AND/OR, j

  5. ALU CONTROL ALU control Function 0000 and 0001 or 0010 add 0110 sub 0111 set on lt 1100 nor

  6. ALU CONTROL ALU control Function “Hey ALU, 0010!” 0000 and 0001 or 0010 add “Ok. My output is equal to the sum of my inputs. 0110 sub Happy now?” 0111 set on lt 1100 nor

  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

  8. ALU CONTROL (We’re not going to care about the logic specifically used to generate ALU control input from ALUOp and Funct)

  9. ALU CONTROL Multiple levels of control decoding are used. Why?

  10. ALU CONTROL

  11. INSTRUCTION FORMAT TO CONTROL SIGNALS

  12. IMPORTANT POINTS OF CONTROL

  13. IMPORTANT POINTS OF CONTROL

  14. CONTROL UNIT

  15. INSTRUCTIONS TO CONTROL UNIT TO CONTROL SIGNALS

  16. add $t1, $t2, $t3

  17. lw $t1, offset($t2)

  18. beq $t1, $t2, label

  19. j somewhere

  20. CONTROL OVERVIEW

  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

  22. SINGLE-CYCLE INSTRUCTION SET What’s wrong with this?

  23. HOMEWORK • Reading 27 • Project 7, “Mmm!” yes, this is what the reading is really trying to tell you

Recommend


More recommend