1 / 15

Seoul National University

Seoul National University. P ipelining Basics. Seoul National University. Sequential Processing. Seoul National University. Pipelined Processing. Seoul National University. Basic Steps of Execution. 1. Instruction fetch step ( F ) 2. Instruction decode/register fetch step ( D )

beata
Download Presentation

Seoul National University

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. Seoul National University Pipelining Basics

  2. Seoul National University Sequential Processing

  3. Seoul National University Pipelined Processing

  4. Seoul National University Basic Steps of Execution 1. Instruction fetch step (F) 2. Instruction decode/register fetch step (D) 3. Execution/effective address step (E) 4. Memory access (M) 5. Register write-back step (W)

  5. Seoul National University Pipelined Instruction Execution • Sequential Execution • Pipelined Execution addl %ecx, %eax subl %edx, %ebx andl %edx, %ecx

  6. Seoul National University Basic Pipeline

  7. Seoul National University Major Hurdles of Pipelining • Structural Hazard • Data Hazard • Control Hazard

  8. Seoul National University Structural Hazard F D E M W F D E M W F D E M W F D E M W

  9. Seoul National University Solutions to Structural Hazard • Resource Duplication • example • Separate I and D caches for memory access conflict • Time-multiplexed or multi-port register file for register file access conflict

  10. Seoul National University Data Hazard (RAW hazard) addl %edx, %eax subl %eax, %ecx F D E M W R W F D E M W R W Time

  11. Seoul National University Solutions to Data Hazard • Freezing the pipeline • (Internal) Forwarding • Compiler scheduling

  12. Seoul National University stall stall F D E F F D D E E M M W W R R R W W stall stall F D E R Freezing The Pipeline • ALU result to next instruction • Load result to next instruction addl %edx, %eax subl %eax, %ecx mrmovl 0(%edx), %eax addl %edx, %eax

  13. Seoul National University F F F D D D E E E M M M W W W R R R W W W stall F D E M R (Internal) Forwarding • ALU result to next instruction (Stall X) • Load result to next instruction (Stall 1) addl %edx, %eax subl %eax, %ecx mrmovl 0(%edx), %eax addl %edx, %eax Load interlock

  14. Seoul National University Control Hazard • Caused by PC-changing instructions ((conditional/unconditional) Jump, Call/Return) For 5-stage pipeline, 3 cycle penalty 15% branch frequency. CPI = 1.45

  15. Seoul National University Branch Prediction • Predict-taken ~60% success rate

More Related