UTCS CS352, S07 Lecture 10 1 Pipelining Cycle F Instruction RXMW FRXMW FRXMW FRXMW FRXM FRX 1 2 3....

Slides:



Advertisements
Similar presentations
SE-292 High Performance Computing
Advertisements

Pipeline Hazards CSCE430/830 Pipeline: Hazards CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Prof. Yifeng Zhu, U. of Maine Fall,
COMP381 by M. Hamdi 1 (Recap) Pipeline Hazards. COMP381 by M. Hamdi 2 I n s t r. O r d e r add r1,r2,r3 sub r4,r1,r3 and r6,r1,r7 or r8,r1,r9 xor r10,r1,r11.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
1 IKI20210 Pengantar Organisasi Komputer Kuliah no. 25: Pipeline 10 Januari 2003 Bobby Nazief Johny Moningka
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Review: Pipelining. Pipelining Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer.
Instruction-Level Parallelism (ILP)
1 Z3, built by German scientist Konrad Zuse (pictured) and demonstrated in Z3 used mechanical relays and the program was on a punched tape. It used.
ECE 232 L22.Pipeline3.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 22 Pipelining,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Mary Jane Irwin ( ) [Adapted from Computer Organization and Design,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
ECE 361 Computer Architecture Lecture 13: Designing a Pipeline Processor Start X:40.
Computer ArchitectureFall 2007 © October 24nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
Computer ArchitectureFall 2007 © October 22nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
DLX Instruction Format
1 CSE SUNY New Paltz Chapter Six Enhancing Performance with Pipelining.
Lec 9: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Pipelining - II Adapted from CS 152C (UC Berkeley) lectures notes of Spring 2002.
Computer ArchitectureFall 2008 © October 6th, 2008 Majd F. Sakr CS-447– Computer Architecture.
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.
Pipelining - II Rabi Mahapatra Adapted from CS 152C (UC Berkeley) lectures notes of Spring 2002.
Spring W :332:331 Computer Architecture and Assembly Language Spring 2005 Week 11 Introduction to Pipelined Datapath [Adapted from Dave Patterson’s.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
Pipeline Data Hazards: Detection and Circumvention Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly.
1 Appendix A Pipeline implementation Pipeline hazards, detection and forwarding Multiple-cycle operations MIPS R4000 CDA5155 Spring, 2007, Peir / University.
B 0000 Pipelining ENGR xD52 Eric VanWyk Fall
CPE432 Chapter 4B.1Dr. W. Abu-Sufah, UJ Chapter 4B: The Processor, Part B-2 Read Section 4.7 Adapted from Slides by Prof. Mary Jane Irwin, Penn State University.
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
CS.305 Computer Architecture Enhancing Performance with Pipelining Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from.
CMPE 421 Parallel Computer Architecture
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.
ECE 232 L18.Pipeline.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 18 Pipelining.
The University of Adelaide, School of Computer Science
EECS 322 March 27, 2000 Based on Dave Patterson slides Instructor: Francis G. Wolff Case Western Reserve University This presentation.

Cs 152 L1 3.1 DAP Fa97,  U.CB Pipelining Lessons °Pipelining doesn’t help latency of single task, it helps throughput of entire workload °Multiple tasks.
Chap 6.1 Computer Architecture Chapter 6 Enhancing Performance with Pipelining.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
2/15/02CSE Data Hazzards Data Hazards in the Pipelined Implementation.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
CPE 442 hazards.1 Introduction to Computer Architecture CpE 442 Designing a Pipeline Processor (lect. II)
Pipelining CS365 Lecture 9. D. Barbara Pipeline CS465 2 Outline  Today’s topic  Pipelining is an implementation technique in which multiple instructions.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
CSE431 L06 Basic MIPS Pipelining.1Irwin, PSU, 2005 MIPS Pipeline Datapath Modifications  What do we need to add/modify in our MIPS datapath? l State registers.
L17 – Pipeline Issues 1 Comp 411 – Fall /23/09 CPU Pipelining Issues Read Chapter This pipe stuff makes my head hurt! What have you been.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Advanced Computer Architecture CS 704 Advanced Computer Architecture Lecture 10 Computer Hardware Design (Pipeline Datapath and Control Design) Prof. Dr.
Computer Organization
CMSC 611: Advanced Computer Architecture
ECE232: Hardware Organization and Design
\course\cpeg323-08F\Topic6b-323
Pipelining Lessons 6 PM T a s k O r d e B C D A 30
Lecture 5: Pipelining Basics
Pipelining in more detail
Pipelining Lessons 6 PM T a s k O r d e B C D A 30
\course\cpeg323-05F\Topic6b-323
Pipeline control unit (highly abstracted)
The Processor Lecture 3.6: Control Hazards
The Processor Lecture 3.5: Data Hazards
Daxia Ge Friday February 9th, 2007
Instruction Execution Cycle
Pipeline control unit (highly abstracted)
Pipeline Control unit (highly abstracted)
Pipelining.
Introduction to Computer Organization and Architecture
Throughput = #instructions per unit time (seconds/cycles etc.)
CMCS Computer Architecture Lecture 20 Pipelined Datapath and Control April 11, CMSC411.htm Mohamed.
Presentation transcript:

UTCS CS352, S07 Lecture 10 1 Pipelining Cycle F Instruction RXMW FRXMW FRXMW FRXMW FRXM FRX

UTCS CS352, S07 Lecture 10 2 Pipelined Implementation – add register every t ns I-Mem A DO Reg File RW D-Mem A DO DI IR B A C D E +4 PC

UTCS CS352, S07 Lecture 10 3 Reservation Table for a Simple Pipeline I-Mem A DO Reg File RW D-Mem A DO DI IR B A C D E +4 PC

UTCS CS352, S07 Lecture 10 4 Single Cycle, Multiple Cycle, vs. Pipeline Clk Cycle 1 IfetchRegExecMemWr Cycle 2Cycle 3Cycle 4Cycle 5Cycle 6Cycle 7Cycle 8Cycle 9Cycle 10 LoadIfetchRegExecMemWr IfetchRegExecMem LoadStore IfetchRegExecMemWrStore Clk LoadStoreWaste Ifetch R-type IfetchRegExecMemWrR-type Cycle 1Cycle 2 Multiple Cycle Implementation: Pipeline Implementation: Single Cycle Implementation: Slide courtesy of D. Patterson

UTCS CS352, S07 Lecture 10 5 Why Pipeline? Because the resources are there! I n s t r. O r d e r Time (clock cycles) Inst 0 Inst 1 Inst 2 Inst 4 Inst 3 ALU Im Reg DmReg ALU Im Reg DmReg ALU Im Reg DmReg ALU Im Reg DmReg ALU Im Reg DmReg Slide courtesy of D. Patterson

UTCS CS352, S07 Lecture 10 6 Benefits of Pipelining Before pipelining: –Throughput: 1 instruction per cycle – (or lower cycle time and CPI=5) After pipelining (multiple instructions in pipe at one time) –Throughput: 1 instruction per cycle

UTCS CS352, S07 Lecture 10 7 Pipelining Rules Forward travelling signals at each stage are latched Only perform logic on signals in the same stage –signal labeling useful to prevent errors, e.g., IR R, IR A, IR M, IR W Backward travelling signals at each stage represent hazards

UTCS CS352, S07 Lecture 10 8 Data Hazards (RAW) Cycle F Instruction RXMW FRXMW Write Data to R1 Here Read from R1 Here ADDR1, R2, R3 ADDR4, R1, R5

UTCS CS352, S07 Lecture 10 9 Types of Data Hazards RAW (read after write) –only hazard for fixed pipelines –later instruction must read after earlier instruction writes WAW (write after write) –variable-length pipeline –later instruction must write after earlier instruction writes WAR (write after read) –pipelines with late read –later instruction must write after earlier instruction reads FRAMWFRAMW FR123 FRAMW 4W FR123 FRAMW 4R5W

UTCS CS352, S07 Lecture Control Hazards Cycle F Instruction RXMW FRXMW Destination Available Here Need Destination Here JRR25... XX:ADD...

UTCS CS352, S07 Lecture Resolving Hazards: Pipeline Stalls Can resolve any type of hazard –data, control, or structural Detect the hazard Freeze the pipeline up to the dependent stage until the hazard is resolved

UTCS CS352, S07 Lecture Example Pipeline Stall (Diagram) Cycle F Instruction RXMW FRXMW Write Data to R1 Here Read from R1 Here ADDR1, R2, R3 ADDR4, R1, R5 Bubble

UTCS CS352, S07 Lecture Resolving Hazards: Bypass (Forwarding) If data is available elsewhere in the pipeline, there is no need to stall Detect condition Bypass (or forward) data directly to the consuming pipeline stage Bypass eliminates stalls for single-cycle operations –reduces longest stall to N-1 cycles for N-cycle operations

UTCS CS352, S07 Lecture Simple Pipeline with Bypass Multiplexers I-Mem A DO Reg File RW D-Mem A DO DI IR B A C D E +4 IP

UTCS CS352, S07 Lecture Data Hazards With Bypassing Cycle F Instruction RXMW FRXMW R1 computed R1 used ADDR1, R2, R3 ADDR4, R1, R5 SUBR5, R1, R6 XORR7, R8, R1 FRXMW FRXMW ADD SUB XOR