1 / 26

Circuitos Digitales II

Departamento de Ingeniería Electrónica Facultad de Ingeniería. Circuitos Digitales II. The General Computer Architecture The CPU Control unit Semana No.9 Semestre 2008-2 Prof. Gustavo Patiño gpatino@udea.edu.co Prof. Eugenio Duque eaduque@udea.edu.co.

inga
Download Presentation

Circuitos Digitales II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Departamento de Ingeniería Electrónica Facultad de Ingeniería Circuitos Digitales II The General ComputerArchitecture The CPU Control unit Semana No.9 Semestre 2008-2 Prof. Gustavo Patiño gpatino@udea.edu.co Prof. Eugenio Duque eaduque@udea.edu.co

  2. The Central Processor Unit (CPU)

  3. The CPU Control Unit Having “designed” the ALU or datapath so that it can perform the necessary instructions, we now have to do the same thing for the control unit, which decodes instructions and provides direction to the CPU. The MIPS control unit decodes the six bits on either end of the 32-bit instruction word, that is, the op code and function code* fields, to determine each instruction sequence.

  4. Functionality of Control Unit The control unit determines ALU functions in each instruction and selects operands for the ALU. Theoperationcode(the left six bits of the instruction) determines thetypeof operation and in some cases (such as jump instructions) the actual instruction itself. In the case of register-register instructions, the function codedetermines the instruction (for example, in the R/R instruction above, the function code 0x 20 means “add”).

  5. Functionality of Control Unit (…cont) • The control unit is a collection of decoders and multiplexers. • The decoded instruction fields tell • The ALU what function to perform, • What operands to use.

  6. Completing ALU Design

  7. Current Architecture The ALU control uses instruction bits 0-5 to obtain information about the ALU operation in register-to- registerinstructions. Note in the following diagram that some of the decoding is done in the register block, which has the decoding mechanism that identifies source and destination registers in load/store and register/registeroperations. The ALU control also has input control lines from the operation code decoder which decodes bits 26-31, and which will be shown later.

  8. ALU Designwith ALU Control Designshown

  9. ALU Control Block

  10. Single-Cycle ALU Design with Full Control Block

  11. Stagesonthe MIPS processor CONTROL MEMORY IFETCH EXECUTE DECODE

  12. Op Code Control Block Signal Identifier

  13. Function OpCode Control Signals

  14. OpCode Control Block Circuitry

  15. Instruction Disposition Showing Destination Units

  16. Data/Control Signal Flow Examples The following diagrams illustrate the flow of control signals and data in some example MIPS instructions in the single cycle implementation. The “single cycle” implementation is just a stepping stone to the final MIPS design, but this simpler example has all the features of the more complex final design in terms of data routing and the way in which the control signals determine the specific operation foreachgiveninstruction. Note thedata flowin these instructions.

  17. Start of R-Type Instruction

  18. Next Step of R-Type Instruction

  19. Third Step of R-Type Instruction

  20. Completion of R-Type Instruction

  21. Load Instruction

  22. Branch Instruction

  23. Jump Instruction Circuitry Added

  24. Jump Instruction Flow

  25. Drawbacks of the Single-Cycle Implementation • We have now completed “design” of the basic MIPS CPU. • Although a good basic design, it has a serious drawback: • The processor is designed so that all instructions complete in one clock cycle. • While this assures that there is sufficient time to complete any instruction, it also means that one clock period must be long enough to accommodate the longest and most complicated instruction. • Thus, ALL instructions take as long as the longest instruction. • Since many (most!) instructions in the MIPS architecture take less time to execute than the longest instructions (which are usually the lw memory reference instructions), this means that we are slowing execution of the CPU a large part of the time to accommodate instructions that occur substantially less frequently.

  26. Comparative Instruction Timing

More Related