Pipeline Performance.

Slides:



Advertisements
Similar presentations
1 ECE369 ECE369 Pipelining. 2 ECE369 “toupper” :converts any lowercase characters (with ASCII codes between 97 and 122) in the null-terminated argument.
Advertisements

Computer Organization Lab 1 Soufiane berouel. Formulas to Remember CPU Time = CPU Clock Cycles x Clock Cycle Time CPU Clock Cycles = Instruction Count.
Pipeline Summary Try to put everything together for pipelines Before going onto caches. Peer Instruction Lecture Materials for Computer Architecture by.
Pipeline Exceptions & ControlCSCE430/830 Pipelining in MIPS MIPS architecture was designed to be pipelined –Simple instruction format (makes IF, ID easy)
Out Of Order Execution (Part 1) Updated by Franck Sala.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Advanced Computer Architectures Laboratory on DLX Pipelining Vittorio Zaccaria.
COMP25212 Further Pipeline Issues. Cray 1 COMP25212 Designed in 1976 Cost $8,800,000 8MB Main Memory Max performance 160 MFLOPS Weight 5.5 Tons Power.
Pipelining and Control Hazards Oct
Forwarding and Hazards MemberRole William ElliottTeam Leader Jessica Tyler ShulerWiki Specialist Tyler KimseyLead Engineer Cameron CarrollEngineer Danielle.
Lecture: Pipelining Basics
1 A few words about the quiz Closed book, but you may bring in a page of handwritten notes. –You need to know what the “core” MIPS instructions do. –I.
COMP381 by M. Hamdi 1 Pipeline Hazards. COMP381 by M. Hamdi 2 Pipeline Hazards Hazards are situations in pipelining where one instruction cannot immediately.
S. Barua – CPSC 440 CHAPTER 6 ENHANCING PERFORMANCE WITH PIPELINING This chapter presents pipelining.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
The Optimum Pipeline Depth for a Microprocessor Fang Pang Oct/01/02.
CIS429.S00: Lec10- 1 Control Hazards Created by branch statements BEQZLOC ADDR1,R2,R3. LOCSUBR1,R2,R3 PC needs to be computed but it happens too late in.
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
CIS629 Fall 2002 Pipelining 2- 1 Control Hazards Created by branch statements BEQZLOC ADDR1,R2,R3. LOCSUBR1,R2,R3 PC needs to be computed but it happens.
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
Computer Architecture Lecture 2 Instruction Set Principles.
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Pipelining Basics Assembly line concept An instruction is executed in multiple steps Multiple instructions overlap in execution A step in a pipeline is.
9.2 Pipelining Suppose we want to perform the combined multiply and add operations with a stream of numbers: A i * B i + C i for i =1,2,3,…,7.
Pipelining. 10/19/ Outline 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and Interrupts Conclusion.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
July 2005Computer Architecture, Data Path and ControlSlide 1 Part IV Data Path and Control.
Pipeline Extensions prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University MIPS Extensions1May 2015.
Computer Organization and Architecture Tutorial 1 Kenneth Lee.
CMPE 421 Parallel Computer Architecture
Pipeline Data Hazards Warning, warning, warning! Read 4.8 Peer Instruction Lecture Materials for Computer Architecture by Dr. Leo Porter is licensed under.
1 Designing a Pipelined Processor In this Chapter, we will study 1. Pipelined datapath 2. Pipelined control 3. Data Hazards 4. Forwarding 5. Branch Hazards.
1 COMP541 Pipelined MIPS Montek Singh Mar 30, 2010.
CS 1104 Help Session IV Five Issues in Pipelining Colin Tan, S
CS /02 Semester II Help Session IIA Performance Measures Colin Tan S
CBP 2005Comp 3070 Computer Architecture1 Last Time … All instructions the same length We learned to program MIPS And a bit about Intel’s x86 Instructions.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
Pipelining IV Topics Implementing pipeline control Pipelining and performance analysis Systems I.
CSCE 212 Chapter 6 Enhancing Performance with Pipelining Instructor: Jason D. Bakos.
Data Hazards Dependent instructions add %g1, %g2, %g3 sub %l1, %g3, %o0 Forwarding helps, but not all hazards can be avoided.
Computer Organization CS224
CDA3101 Recitation Section 8
Systems I Pipelining IV
Lecture: Pipelining Basics
Lecture: Pipelining Extensions
Single Clock Datapath With Control
Pipeline Implementation (4.6)
Lecture: Pipelining Basics
CSCI206 - Computer Organization & Programming
CS 5513 Computer Architecture Pipelining Examples
Review of Computer Organization
The processor: Pipelining and Branching
Lecture 9. MIPS Processor Design – Pipelined Processor Design #2
Pipelined Datapath The MIPS Example 2018/11/29
CSCI206 - Computer Organization & Programming
Computer Architecture
Data Hazards Data Hazard
Lecture 5. MIPS Processor Design
The Processor Lecture 3.6: Control Hazards
CS203 – Advanced Computer Architecture
Pipelining: Basic Concepts
Pipelining: critical path, pipeline hazards Prof. Eric Rotenberg
Part IV Data Path and Control
Appendix C Practice Problem Set 1
Systems Architecture II
Throughput = #instructions per unit time (seconds/cycles etc.)
CS 3853 Computer Architecture Pipelining Examples
Lecture: Pipelining Basics
Problem ??: (?? marks) Consider executing the following code on the MIPS pipelined datapath: add $t5, $t6, $t8 add $t9, $t5, $t4 lw $t3, 100($t9) sub $t2,
Presentation transcript:

Pipeline Performance

CPI of a Pipeline Processor N-segment pipeline processes M instructions without stalls or penalties. It takes N-1 cycles to load (setup) the pipeline M cycles to complete the instructions. Thus, the number of cycles is given by: Ncyc = N + M - 1 . The cycles per instruction are easily computed: CPI = Ncyc/M = 1 + (N - 1)/M 

Effect of Stalls Suppose that we have a N-segment pipeline processing M instructions, and we must insert K stalls to resolve data dependencies. This means that the pipeline now has a setup penalty of N-1 cycles, as before, a stall penalty of K cycles, and a processing cost (as before) of M cycles to process the M instructions. Thus, our governing equations become: Ncyc = N + M + K - 1 . CPI = Ncyc/M = 1 + (N + K - 1)/M .

Effect of Stalls Suppose that an N-segment pipeline executes M instructions, and that a fraction fstall of the instructions require the insertion of K stalls per instruction to resolve data dependencies. The total number of stalls is given by fstall · M · K (fraction of instructions that are stalls, times the total number of instructions, times the average number of stalls per instruction). The pipeline performance becomes: Ncyc = N + M + (fstall · M · K) - 1 . CPI = Ncyc/M = 1 + (fstall · K) + (N - 1)/M .

Effect of Exceptions Assume that we have M instructions executing on an N-segment pipeline with no stalls, but that a fraction fex of the instructions raise an exception in the EX stage. Further assume that each exception requires that (a) the pipeline segments before the EX stage be flushed, (b) that the exception be handled, requiring an average of H cycles per exception, then that (c) the instruction causing the exception and its following instructions be reloaded into the pipeline. Thus, fex · M instructions will cause exceptions. 

Effect of Exceptions In the MIPS pipeline, each of these instructions causes three instructions to be flushed out of the pipe (IF, ID, and EX stages), which incurs a penalty of four cycles (one cycle to flush, and three to reload) plus H cycles to handle the exception. Thus, the pipeline performance equations become: Ncyc = N - 1 + (1 - fex) · M + (fex · M · (H + 4)) , which we can rewrite as Ncyc = M + [N - 1 - M + (1 - fex) · M + (fex · M · (H + 4))] . Rearranging terms, the equation for CPI can be expressed as CPI = Ncyc/M = 1 + [1 - fex + (fex · (H+4)) - 1 + (N - 1)/M] . After combining terms, this becomes: CPI = Ncyc/M = 1 + [(fex · (H+3)) + (N - 1)/M] .