Anshul Kumar, CSE IITD CSL718 : Pipelined Processors  Types of Pipelines  Types of Hazards 16th Jan, 2006.

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

Anshul Kumar, CSE IITD CSL718 : VLIW - Software Driven ILP Hardware Support for Exposing ILP at Compile Time 3rd Apr, 2006.
COMP4611 Tutorial 6 Instruction Level Parallelism
Anshul Kumar, CSE IITD CSL718 : Memory Hierarchy Cache Performance Improvement 23rd Feb, 2006.
CS5365 Pipelining. Divide task into a sequence of subtasks. Each subtask is executed by a stage (segment)of the pipe.
Advanced Pipelining Optimally Scheduling Code Optimally Programming Code Scheduling for Superscalars (6.9) Exceptions (5.6, 6.8)
Anshul Kumar, CSE IITD CS718 : VLIW - Software Driven ILP Introduction 23rd Mar, 2006.
Instruction Set Issues MIPS easy –Instructions are only committed at MEM  WB transition Other architectures are more difficult –Instructions may update.
CSE Advanced Computer Architecture Week-4 Week of Feb 2, 2004 engr.smu.edu/~rewini/8383.
Pipeline Hazards Pipeline hazards These are situations that inhibit that the next instruction can be processed in the next stage of the pipeline. This.
Chapter 3 Pipelining. 3.1 Pipeline Model n Terminology –task –subtask –stage –staging register n Total processing time for each task. –T pl =, where t.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
Instruction-Level Parallelism (ILP)
1 Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations.
Anshul Kumar, CSE IITD CSL718 : Pipelined Processors PipelineTimings 12th Jan, 2006.
1 Lecture: Pipeline Wrap-Up and Static ILP Topics: multi-cycle instructions, precise exceptions, deep pipelines, compiler scheduling, loop unrolling, software.
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
Chapter 12 Pipelining Strategies Performance Hazards.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 1.
Computer ArchitectureFall 2007 © October 24nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
DLX Instruction Format
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
1 Lecture 4: Advanced Pipelines Control hazards, multi-cycle in-order pipelines, static ILP (Appendix A.4-A.10, Sections )
EENG449b/Savvides Lec 5.1 1/27/04 January 27, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG Computer.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
Lecture 15: Pipelining and Hazards CS 2011 Fall 2014, Dr. Rozier.
Introduction 9th January, 2006 CSL718 : Architecture of High Performance Systems.
Pipeline Hazard CT101 – Computing Systems. Content Introduction to pipeline hazard Structural Hazard Data Hazard Control Hazard.
Pipelining. 10/19/ Outline 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and Interrupts Conclusion.
Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 January Session 3.
1 Appendix A Pipeline implementation Pipeline hazards, detection and forwarding Multiple-cycle operations MIPS R4000 CDA5155 Spring, 2007, Peir / University.
EEL5708 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Pipelining.
Instruction Level Parallelism Pipeline with data forwarding and accelerated branch Loop Unrolling Multiple Issue -- Multiple functional Units Static vs.
Anshul Kumar, CSE IITD CSL718 : Multiprocessors Synchronization, Memory Consistency 17th April, 2006.
Spring 2003CSE P5481 Precise Interrupts Precise interrupts preserve the model that instructions execute in program-generated order, one at a time If an.
Recap Multicycle Operations –MIPS Floating Point Putting It All Together: the MIPS R4000 Pipeline.
Pipelining Example Laundry Example: Three Stages
Computer Science and Engineering Copyright by Hesham El-Rewini Advanced Computer Architecture CSE 8383 February 2, 2006 Session 6.
Anshul Kumar, CSE IITD CSL718 : Superscalar Processors Speculative Execution 2nd Feb, 2006.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
Introduction to Computer Organization Pipelining.
LECTURE 10 Pipelining: Advanced ILP. EXCEPTIONS An exception, or interrupt, is an event other than regular transfers of control (branches, jumps, calls,
1 Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations.
CS203 – Advanced Computer Architecture Pipelining Review.
Dynamic Scheduling Why go out of style?
CSL718 : Superscalar Processors
CDA3101 Recitation Section 8
Instruction Level Parallelism
Pipeline Design Problems
Chapter One Introduction to Pipelined Processors
Lecture: Pipelining Extensions
Appendix C Pipeline implementation
Chapter One Introduction to Pipelined Processors
Exceptions & Multi-cycle Operations
Pipelining: Advanced ILP
Lecture 6: Advanced Pipelines
Superscalar Processors & VLIW Processors
How to improve (decrease) CPI
Instruction Level Parallelism (ILP)
Instruction Execution Cycle
Project Instruction Scheduler Assembler for DLX
Extending simple pipeline to multiple pipes
CS203 – Advanced Computer Architecture
Pipelining.
Appendix C Practice Problem Set 1
The University of Adelaide, School of Computer Science
Linear Pipeline Processors
Pipelining and Superscalar Techniques
Presentation transcript:

Anshul Kumar, CSE IITD CSL718 : Pipelined Processors  Types of Pipelines  Types of Hazards 16th Jan, 2006

Anshul Kumar, CSE IITD slide 2 Types of Pipelined processors Degree of overlap –Serial, Overlapped, Pipelined, Super-pipelined Depth –Shallow, Deep Structure –Linear, Non - linear Scheduling of operations –Static, Dynamic

Anshul Kumar, CSE IITD slide 3 Degree of overlap Depth Serial Overlapped Pipelined Shallow Deep

Anshul Kumar, CSE IITD slide 4 Pipeline Structure ABC Non-linear Pipeline ABC Linear Pipeline Sequence: A, B, C, B, C, A, C, A

Anshul Kumar, CSE IITD slide 5 Scheduling/timing alternatives Static –same sequence of stages for all instructions –all actions in order –if one instruction stalls, all subsequent instructions are delayed Dynamic –above conditions are relaxed –higher throughput is achieved

Anshul Kumar, CSE IITD slide 6 Dynamic Scheduling type 1 : beginnings (decode) and endings (put away) in order type 2 : only beginnings in order type 3 : no order restrictions except dependencies type 1 extended : beginnings in order, references that effect memory state are in order [note that a memory reference may lead to page fault]

Anshul Kumar, CSE IITD slide 7 Pipelining and CPI

Anshul Kumar, CSE IITD slide 8 Hazards in Pipelining Data dependencies => Data hazards –RAW (read after write) –WAR (write after read) –WAW (write after write) Resource conflicts => Structural hazards –use of same resource in different stages Procedural dependencies => Control hazards –conditional and unconditional branches, calls/returns

Anshul Kumar, CSE IITD slide 9 Data Hazards delay = 3 previous instr current instr read/write

Anshul Kumar, CSE IITD slide 10 Structural Hazards Use of a hardware resource in more than one cycle Different sequences of resource usage by different instructions Non-pipelined multi-cycle resources ABAC ABAC ABAC ABCD ACBD FDXX FDXX Caused by Resource Conflicts

Anshul Kumar, CSE IITD slide 11 Control Hazards delay = 5 branch instr next inline instr target instr cond eval delay = 2 the order of cond eval and target addr gen may be different cond eval may be done in previous instruction target addr gen

Anshul Kumar, CSE IITD slide 12 Handling Data Hazards previous instr current instr W R EX Data Forwarding previous instr current instr W R Instruction Reordering 1 2

Anshul Kumar, CSE IITD slide 13 Analysis of Structural Hazards ABC Non-linear Pipeline Reservation Table for X

Anshul Kumar, CSE IITD slide 14 Analysis of Structural Hazards ABC Multi-functional Pipeline Reservation Table for X Y Y Y Y Y Y for Y

Anshul Kumar, CSE IITD slide 15 Collisions with Initiation Interval =2

Anshul Kumar, CSE IITD slide 16 Collisions with Initiation Interval =5

Anshul Kumar, CSE IITD slide 17 Latency Sequences and Cycles 1, 8, 1, 8, ….(1, 8)avg = 4.5 3, 3, 3, 3, ….(3)avg = 3 6, 6, 6, 6, ….(6)avg = 6 Minimum Average Latency (MAL) ?

Anshul Kumar, CSE IITD slide 18 Collision Free Scheduling for X m …. 2 1 Collision vector for X 1 : collision 0 : no collision

Anshul Kumar, CSE IITD slide 19 Collision Free Scheduling for Y 1 0 m….2 1 Collision vector for Y 1 : collision 0 : no collision

Anshul Kumar, CSE IITD slide 20 Latency Cycles from State Diagram Latency Cycles (1, 8) (1, 8, 6, 8) (3) (6) (3, 8) (3, 6, 3) Simple Latency Cycles (no figure repeats) (1, 8) (3) (6) (3, 8) (6, 8) Greedy Latency Cycles (1, 8) (3) - from different starting states

Anshul Kumar, CSE IITD slide 21 Minimum Average Latency (MAL) MAL > max no. of check marks in any row MAL < avg latency of any greedy cycle avg latency of any greedy cycle < no. of 1’s in initial collision vector + 1

Anshul Kumar, CSE IITD slide 22 Upper Bound on MAL Consider a greedy cycle (k 1,k 2,..,k n ) Let p = no. of 1’s in initial collision vector  k 1 < p + 1 k 2 < 2 p - k k 3 < 3 p - k 1 - k …. k n < n p - k 1 - k 2 … - k n-1 + n  k 1 + k 2 … + k n < n p + n  MAL < p + 1