Pipelining Enhancing Performance. Datapath as Designed in Ch. 5 Consider execution of: lw $t1,100($t0) lw $t2,200($t0) lw $t3,300($t0) Datapath segments.

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
ELEN 468 Advanced Logic Design
CMPT 334 Computer Organization
Chapter Six 1.
S. Barua – CPSC 440 CHAPTER 6 ENHANCING PERFORMANCE WITH PIPELINING This chapter presents pipelining.
1 Lecture 17: Basic Pipelining Today’s topics:  5-stage pipeline  Hazards and instruction scheduling Mid-term exam stats:  Highest: 90, Mean: 58.
Pipelining II Andreas Klappenecker CPSC321 Computer Architecture.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 1.
Chapter Six Enhancing Performance with Pipelining
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
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?
Pipelined Processor II CPSC 321 Andreas Klappenecker.
Review for Midterm 2 CPSC 321 Computer Architecture Andreas Klappenecker.
Lec 9: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Appendix A Pipelining: Basic and Intermediate Concepts
ENGS 116 Lecture 51 Pipelining and Hazards Vincent H. Berk September 30, 2005 Reading for today: Chapter A.1 – A.3, article: Patterson&Ditzel Reading for.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
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.
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Topic 8: MIPS Pipelined.
Computer Organization CS224 Fall 2012 Lesson 28. Pipelining Analogy  Pipelined laundry: overlapping execution l Parallelism improves performance §4.5.
Pipelining (I). Pipelining Example  Laundry Example  Four students have one load of clothes each to wash, dry, fold, and put away  Washer takes 30.
Chapter 4 CSF 2009 The processor: Pipelining. Performance Issues Longest delay determines clock period – Critical path: load instruction – Instruction.
Comp Sci pipelining 1 Ch. 13 Pipelining. Comp Sci pipelining 2 Pipelining.
11/13/2015 8:57 AM 1 of 86 Pipelining Chapter 6. 11/13/2015 8:57 AM 2 of 86 Overview of Pipelining Pipelining is an implementation technique in which.
Chapter 4 The Processor. Chapter 4 — The Processor — 2 Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined.
Pipeline Hazards. CS5513 Fall Pipeline Hazards Situations that prevent the next instructions in the instruction stream from executing during its.
CMPE 421 Parallel Computer Architecture
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CS 1104 Help Session IV Five Issues in Pipelining Colin Tan, S
Chap 6.1 Computer Architecture Chapter 6 Enhancing Performance with Pipelining.
1  1998 Morgan Kaufmann Publishers Chapter Six. 2  1998 Morgan Kaufmann Publishers Pipelining Improve perfomance by increasing instruction throughput.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
1/24/ :00 PM 1 of 86 Pipelining Chapter 6. 1/24/ :00 PM 2 of 86 Overview of Pipelining Pipelining is an implementation technique in which.
Instructor: Senior Lecturer SOE Dan Garcia CS 61C: Great Ideas in Computer Architecture Pipelining Hazards 1.
LECTURE 7 Pipelining. DATAPATH AND CONTROL We started with the single-cycle implementation, in which a single instruction is executed over a single cycle.
1. Convert the RISCEE 1 Architecture into a pipeline Architecture (like Figure 6.30) (showing the number data and control bits). 2. Build the control line.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
Introduction to Computer Organization Pipelining.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
1 Pipelining CDA 3101 Discussion Section Question 1 – 6.1 Suppose that time for an ALU operation can be shortened by 25% in the following figure.
1  2004 Morgan Kaufmann Publishers No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing.
Chapter Six.
Pipelining Chapter 6.
CSCI206 - Computer Organization & Programming
ELEN 468 Advanced Logic Design
Basic Pipeline Datapath
Single Clock Datapath With Control
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Morgan Kaufmann Publishers The Processor
Pipelining Chapter 6.
Computer Architecture
CSCI206 - Computer Organization & Programming
CSC 4250 Computer Architectures
Computer Architecture
CSCI206 - Computer Organization & Programming
Data Hazards Data Hazard
Chapter Six.
Chapter Six.
Pipelining Chapter 6.
Pipelining: Basic Concepts
Pipelining (II).
Pipelining Chapter 6.
Pipelining Chapter 6.
Pipelining - 1.
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:

Pipelining Enhancing Performance

Datapath as Designed in Ch. 5 Consider execution of: lw $t1,100($t0) lw $t2,200($t0) lw $t3,300($t0) Datapath segments 5 segments Instruction Fetch (IF) Register Read (ID) ALU Operation (EX) Data Access (MEM) Register Write (WB)

Timing Timing for each segment Note ms 10 -3,  s (micro), ns 10 -9, ps Instruction ClassIFIDEXMEMWBTotal load word (lw)200ps100ps200ps 100ps800ps store word (sw)200ps100ps200ps 700ps R-Format200ps100ps200ps100ps600ps Branch200ps100ps200ps500ps

Sequential Instruction Execution Clock Cycle must be 800 ps (lw) Sequential Execution

Pipelined Execution Use separate segments on different instructions Each stage will take 200 ps

Analysis Non-pipelined desing 3 x 800 ps = 2400 ps Pipelined design 2 x 200 ps = 600 ps Timing Time non-pipelined Time pipelined = Num. segments Expected speedup is: 5 Actual speedup is (5 ins): 4000/1800 = 2.22 Will not get theoretical value because of a variety of imperfect use of pipeline (see previous diagram)

Pipeline Hazards Hazards are events that prevent the next instruction from being executed in the next clock cycle. Three types Structural hazards Data hazards Control hazards

Structural Hazard Hardware cannot support the combination of instructions What if we had single memory? Every instruction fetch must read memory Some instructions must write to memory Cannot fetch one instruction from memory while another is trying to use the memory

Data Hazards Consider: add $s0,$t0,$t1 sub $t2,$s0,$t3 Solution: Forwarding (bypassing)

Data Hazards (2) Pipeline stall Rearranging instructions is one solution Rearranging not always possible More complex solutions are often needed

Control Hazards Need to make decision in one instruction based upon execution of another instruction. Consider: add $t4,$t5,$t6 beq $t1,$t2,40 other instructions including branch target Two sloutions Stall Predict

Stall on Branch

Predict on Branch Predict Branch Not Taken

The Pipelined Datapath

A Word On Control Two approaches to control Finite state machine Microprogramming Finite state machine Hardwired Complex controller is expensive to implement Microprogramming Break instruction down into micro-instructions Micro-instruction tells how to set control lines

IA-32 Architecture Complex instruction set Simple instructions require 3 or 4 clock cycles Complex instructions requiring 100s clock cycles Control for simple instructions is hardwired Control for complex instructions uses microprogramming All instructions are translated into a series of RISC like micro-instructions Micro-instructions are queued and executed