1 / 17

Single cycle DataPath

Single cycle DataPath . 000000. op. rs. 10111. 11000. rt. 01001. rd. 00000. shamt. 100000. funct. 35. op. rs. 18. 8. rt. 16-bit number. 32. ALU Control. ALU's operation based on instruction type and function code e.g., What should the ALU do with any instruction? Example:

barr
Télécharger la présentation

Single cycle DataPath

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. Single cycle DataPath

  2. 000000 op rs 10111 11000 rt 01001 rd 00000 shamt 100000 funct 35 op rs 18 8 rt 16-bit number 32 ALU Control • ALU's operation based on instruction type and function code • e.g., What should the ALU do with any instruction? • Example: • add $t1, $s7, $s8 000 AND 001 OR 010 Add 110 Subtract 111 Set-on-less-than lw $t0, 32($s2)

  3. Adding control to datapath

  4. Adding control to datapath

  5. ALU Control • Must describe hardware to compute 4-bit ALU control input • given instruction type 00 = lw, sw 01 = beq, 10 = arithmetic • function code for arithmetic • Describe it using a truth table (can turn into gates):

  6. Control (Reading Assignment: Appendix C.2) • Simple combinational logic (truth tables)

  7. Datapath in Operation for R-Type Instruction

  8. Datapath in Operation for Load Instruction

  9. Datapath in Operation for Branch Equal Instruction

  10. Datapath with control for Jump instruction • J-type instructions use 6 bits for the opcode, and 26 bits for the immediate value (called the target). • newPC <- PC[31-28] IR[25-0] 00

  11. Datapath with control for Jump instruction

  12. Timing: Single cycle implementation • Calculate cycle time assuming negligible delays except • Memory (2ns), ALU and adders (2ns), Register file access (1ns)

  13. Why is Single Cycle not GOOD??? • Memory - 2ns; • ALU - 2ns; Adder - 2ns; • Reg - 1ns • what if we had floating point instructions to handle?

  14. Where we are headed • Single Cycle Problems: • what if we had a more complicated instruction like floating point? • wasteful of area

  15. Multicycle Approach • We will be reusing functional units • ALU used to compute address and to increment PC • Memory used for instruction and data • Our control signals will not be determined directly by instruction • e.g., what should the ALU do for a “subtract” instruction? • We’ll use a finite state machine for control

  16. Where we are headed • One Solution: • use a “smaller” cycle time • have different instructions take different numbers of cycles • a “multicycle” datapath: • Break up the instructions into steps, each step takes a cycle • balance the amount of work to be done • restrict each cycle to use only one major functional unit • At the end of a cycle • store values for use in later cycles (easiest thing to do) • introduce additional “internal” registers

More Related