Basic Pipelining Concepts
|
|
- Antonia Bryant
- 5 years ago
- Views:
Transcription
1 Basic ipelining oncepts Appendix A (recommended reading, not everything will be covered today) Basic pipelining ipeline hazards Data hazards ontrol hazards Structural hazards Multicycle operations
2 Execution For each instruction: 1. fetch (IF) 2. decode, operand fetch (ID) 3. Execute computations (EX). Memory access (MEM) 5. Write back results to registers (WB) Number and types of steps can vary between different ISA and implementations
3 MIS Single ycle Implementation fetch op rs rt rd shamt funct op rs rt address/immediate 32 bit
4 MIS Single ycle Implementation fetch decode/ register fetch op rs rt rd shamt funct op rs rt address/immediate rs rt rd Registers data_rs data_rt address/ immediate 16 bit Sign ext. 32 bit
5 MIS Single ycle Implementation fetch decode/ register fetch Execute/ address calc. op rs rt rd shamt funct op rs rt address/immediate rs rt rd Registers data_rs data_rt Shift left 2 status ALU result address/ immediate 16 bit Sign ext. 32 bit
6 MIS Single ycle Implementation fetch decode/ register fetch Execute/ address calc. op rs rt rd shamt funct op rs rt address/immediate Memory access rs rt rd Registers data_rs data_rt Shift left 2 status ALU result Data address/ immediate 16 bit 32 bit Sign ext.
7 MIS Single ycle Implementation fetch decode/ register fetch Execute/ address calc. op rs rt rd shamt funct op rs rt address/immediate Memory access Write back rs rt rd Registers data_rs data_rt Shift left 2 status ALU result Data address/ immediate 16 bit 32 bit Sign ext.
8 MIS Single ycle Implementation fetch decode/ register fetch Execute/ address calc. op rs rt rd shamt funct op rs rt address/immediate Memory access Write back rs rt rd Registers data_rs data_rt Shift left 2 status ALU result Data address/ immediate 16 bit 32 bit Sign ext.
9 roblems All instructions take the time required by the longest instruction Alternative solutions: 1. Multicycle processors 2. ipelining Both solution require the implementation to change! We will have closer look at pipelining!
10 The Assembly Line oncept A pipelined processor is based on the assembly line concept One station for each stage in the instruction execution At any moment there is one instruction at each station One new instruction every cycle => I=1 Each instruction takes multiple cycles to complete, but the throughput is high!
11 ipeline for MIS fetch decode/ register fetch Execute/ address calc. Memory access Write back rs rt rd Registers data_rs data_rt Shift left 2 status ALU result Data address/ immediate 16 bit 32 bit Sign ext.
12 ipeline for MIS IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext. ipeline registers
13 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800
14 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800 IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext.
15 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800 IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext. add $5, $2, $3
16 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800 IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. $2 $3 ALU Data Sign ext. lw $, 100($5) add $5, $2, $3
17 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800 IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. $5 $2 $3 ALU $2+$3 Data Sign ext. 100 sw $, 00($7) lw $, 100($5) add $5, $2, $3
18 ipelining Example add $5, $2, $3 lw $, 100($5) sw $, 00($7) beq $8, $9, 800 IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ Shift left 2 Read addr. Registers Write addr. $7 $ $5 ALU $5+100 $2+$3 Data Sign ext beq $8, $9, 800 sw $, 00($7) lw $, 100($5) add $5, $2, $3
19 ipelining Example lw $, 100($5) sw $, 00($7) beq $8, $9, IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ Shift left 2 $5 Read addr. Registers Write addr. $8 $9 $7 $ ALU $7+00 $5+100 Data Sign ext $2+$3 (beq+) beq $8, $9, 800 sw $, 00($7) lw $, 100($5) add
20 ipelining Example sw $, 00($7) beq $8, $9, IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ $ Read addr. Registers Write addr. Sign ext. $8 $9 800 Shift left beq ALU Z $8-$9 $7+00 $ Data (beq+8) (beq+) beq $8, $9, 800 sw $, 00($7) M[$5+100] lw $
21 ipelining Example ontrols mux beq IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Z Data Sign ext. (beq+12) (beq+8) (beq+) beq $8, $9, 800 sw...
22 ipelining Example branch dest. IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext. (beq++3200) (beq+12) (beq+8) (beq+) beq...
23 ipeline Hazards Neighboring instructions are rarely independent In a pipeline, this can cause conflicts called hazards Three main types of hazards Data hazards ontrol hazards Structural hazards
24 Hazard Resolution ipeline hazards can be resolved in many different ways Stall: Stop parts of the pipeline until the conflicting instructions are sufficiently separated Make results available earlier Move calculations to earlier pipeline stages Make results available before they have been stored Guess results before they have been computed(!) Reorder instructions
25 Data Hazards Three types Read-After-Write (RAW). Write-After-Read (WAR). Do not occur in simple pipelines. Write-After-Write (WAW). Do not occur in simple pipelines. RAW hazard occurse when An instruction needs the result of an earlier instruction that is stored in a register (or location), and the earlier instruction has not yet written the result Usually handled by (some combination of) data forwarding (bypassing) stalling instruction reordering
26 RAW Hazard Example IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. $5 $2 $3 ALU Data Sign ext. 100 sw $, 00($7) lw $, 100($5) add $5, $2, $3
27 Solution: Data forwarding IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ Shift left 2 Read addr. Registers Write addr. $7 $ $5 ALU $2+$3 Data Sign ext beq $8, $9, 800 sw $, 00($7) lw $, 100($5) add $5, $2, $3
28 Another RAW Hazard Example IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ Shift left 2 Read addr. Registers Write addr. $7 $ $5 ALU $2+$3 Data Sign ext beq $8, $9, 800 sw $, 00($7) lw $, 100($5) add $5, $2, $3
29 Solution: Stalling and IF/ID not updated until lw reaches WB Bubbles (nop=no operation) loaded into ID/EX until lw reaches WB IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 $ Read addr. Registers Write addr. $7 $ ALU Data Sign ext. 00 beq $8, $9, 800 sw $, 00($7) nop nop lw...
30 Speedup Equation for ipelining I pipelined = Ideal I + ipeline stall cycles per instr. I unpipelined Speedup = * Ideal I + #stall cycles/instr Tc unpipelined Tc pipelined Ideal I for a pipeline is normally = 1. And, if I unpipelined * Tc unpipelined Tc pipelined = Number of pipeline stages. Gives, Speedup = #pipeline stages 1 + #stall cycles/instr
31 ontrol Hazards Occur when the program counter () is changed by a branch och jump instruction an exception (interrupt, trap, etc.) Usually handled by (some combination of) branch prediction earlier target address calculation stalling delayed branch instruction reordering (static or dynamic scheduling)
32 ontrol Hazard Example If branch to be taken, (beq+)-(beq+12) should not have been fetched beq++800 IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext. (beq+12) (beq+8) (beq+) beq $8, $9, 800 sw...
33 Solution: Stalling Stop fetching instructions after a branch instruction until the address of the next instruction has been determined This is very inefficient because branches tend to be very frequent
34 Solution: Earlier Branch alculation Both address and condition need to be calculated earlier (in ID) IF/ ID ID/ EX EX/ MEM MEM/ WB Shift left 2 Read addr. Registers Write addr. ALU Data Sign ext. Risk that clock cycle must be increased, leading to total performance loss.
35 Solution: Branch-Delay Hiding Techniques Stall until branch condition and target is known: an cause significant penalties redict Branch not taken (a fairly rare case) Execute successor instructions in sequence Squash instructions in pipeline if the branch is actually taken Works well if state is updated late in the pipeline 30%-38% of conditional branches are not taken on average redict Branch taken (a fairly common case) 62%-70% of conditional branches are taken on average Makes sense for more complex pipeline organizations Delayed branch (schedule useful instr. in delay slot) Define branch to take place after a following instruction
36 Static Scheduling and Delayed Branch Scheduling an instruction from before is always safe Scheduling from target or from the not-taken path is not always safe; must be guaranteed that speculative instr. do no harm.
37 onditional Delay Slot Execution ancelling or nullifying branch instruction: ancel the instruction in the delay slot if branch does not conform with the prediction Measurements on SE: 80% of the branch-delay slots can be filled with useful instructions 70% will be filled at run-time; 10% of the useful instructions will be cancelled because of mispredictions
38 Evaluating Branch Hazard Avoidance Techniques ipeline speedup = #pipeline stages 1 + Branch frequency x Branch penalty Scheduling scheme Branch penalty for integ. gm I Speedup vs. Unpipelined Stall pipeline redict taken redict not taken Delayed branch
39 Exceptions An exception (interrupt, trap, ) always causes a jump in execution Exceptions are extra difficult to handle as they cannot be predicted and may occur at different stages for different instructions ertain precise exceptions require that instructions in the beginning of the pipeline are thrown away and later restarted when the exception handler is finished
40 Respecting the Execution order Exceptions may be generated in another order than the instruction execution order ipeline stage IF ID EX MEM WB roblem causing exception age fault on instruction fetch; misaligned access; protection violation Undefined or illegal opcode Arithmetic exception age fault on data access; Misaligned access; Memory protection violation none Example sequence: lw (e.g., page fault in MEM) add (e.g., page fault in IF) The add instruction causes a fault before the load
41 Structural Hazards Occur when two instructions require the same resource at the same time Blocked resources can be ipeline stages, or functional units in pipeline stages Memory Register file Usually handled by (a combination of) stalling instruction reordering (e.g. dynamic scheduling, which will be covered later in the course)
42 Structural Hazard Example lw has to wait on a cache miss in MEM => stall for previous stages IF/ ID ID/ EX EX/ MEM MEM/ WB beq+ Shift left 2 Read addr. Registers Write addr. $8 $9 $7 $ ALU $5+100 Data Sign ext (beq+) beq $8, $9, 800 sw $, 00($7) lw $, 100($5) nop
43 Multicycle Operations in the ipeline Integer unit: Handles integer instructions, branches, and loads/stores Other units: May take several cycles each. Some units are pipelined (mult,add) others are not (div)
44 arallel Execution of s MULTDF2,F,F6 IFIDM1 M2M3M M5 M6 M7 MEMWB ADF8,F10,F12 IFIDA1 A2A3 A MEMWB SUBI R2,R3,#8 LD F1,0(R2) IFIDEXMEMWB IFIDEX MEMWB Structural and RAW hazards: Structural hazards. Stall in ID stage when the functional unit is occupied many instructions can reach the WB stage at the same time RAW hazards: Normal bypassing from MEM and WB stages Stall in ID stage if any of the source operands is a destination operand of an instruction in any of the F functional units
45 WAR and WAW Hazards for Multicycle Operations WAR hazards are a non-issue because operands are read in program order WAW hazards may occur Example of a WAW hazard: DIVF F0,F2,F F divide 2 cycles SUBF F0,F8,F10 F sub 3 cycles SUB finishes before DIV ; out-of-order completion WAW hazards are avoided by: stalling the SUBF until DIVF reaches the MEM stage, or disabling the write to register F0 for the DIVF instruction
46 Summary ipelining: Speeds up throughput, not latency Speedup #stages Hazards are fundamental limits: Structural: need more HW Data (RAW,WAR,WAW): need forwarding and compiler scheduling ontrol: delayed branch, branch prediction omplications: recise exceptions: maintain execution order ISA must be designed to match pipelining requirements Multi-cycle operations may result in out-of-order completion Out-of-order completion introduces WAW hazards and problems with precise interrupts
Appendix C: Pipelining: Basic and Intermediate Concepts
Appendix C: Pipelining: Basic and Intermediate Concepts Key ideas and simple pipeline (Section C.1) Hazards (Sections C.2 and C.3) Structural hazards Data hazards Control hazards Exceptions (Section C.4)
More informationCOSC 6385 Computer Architecture - Pipelining
COSC 6385 Computer Architecture - Pipelining Fall 2006 Some of the slides are based on a lecture by David Culler, Instruction Set Architecture Relevant features for distinguishing ISA s Internal storage
More informationInstruction Level Parallelism. Appendix C and Chapter 3, HP5e
Instruction Level Parallelism Appendix C and Chapter 3, HP5e Outline Pipelining, Hazards Branch prediction Static and Dynamic Scheduling Speculation Compiler techniques, VLIW Limits of ILP. Implementation
More informationLECTURE 3: THE PROCESSOR
LECTURE 3: THE PROCESSOR Abridged version of Patterson & Hennessy (2013):Ch.4 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU
More informationComputer Architecture
Lecture 3: Pipelining Iakovos Mavroidis Computer Science Department University of Crete 1 Previous Lecture Measurements and metrics : Performance, Cost, Dependability, Power Guidelines and principles in
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined
More informationPipeline Overview. Dr. Jiang Li. Adapted from the slides provided by the authors. Jiang Li, Ph.D. Department of Computer Science
Pipeline Overview Dr. Jiang Li Adapted from the slides provided by the authors Outline MIPS An ISA for Pipelining 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and
More informationInstruction Level Parallelism. ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction
Instruction Level Parallelism ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction Basic Block A straight line code sequence with no branches in except to the entry and no branches
More informationEI338: Computer Systems and Engineering (Computer Architecture & Operating Systems)
EI338: Computer Systems and Engineering (Computer Architecture & Operating Systems) Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building
More informationInstruction Pipelining Review
Instruction Pipelining Review Instruction pipelining is CPU implementation technique where multiple operations on a number of instructions are overlapped. An instruction execution pipeline involves a number
More informationEITF20: Computer Architecture Part2.2.1: Pipeline-1
EITF20: Computer Architecture Part2.2.1: Pipeline-1 Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Pipelining Harzards Structural hazards Data hazards Control hazards Implementation issues Multi-cycle
More informationLecture 3. Pipelining. Dr. Soner Onder CS 4431 Michigan Technological University 9/23/2009 1
Lecture 3 Pipelining Dr. Soner Onder CS 4431 Michigan Technological University 9/23/2009 1 A "Typical" RISC ISA 32-bit fixed format instruction (3 formats) 32 32-bit GPR (R0 contains zero, DP take pair)
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationMinimizing Data hazard Stalls by Forwarding Data Hazard Classification Data Hazards Present in Current MIPS Pipeline
Instruction Pipelining Review: MIPS In-Order Single-Issue Integer Pipeline Performance of Pipelines with Stalls Pipeline Hazards Structural hazards Data hazards Minimizing Data hazard Stalls by Forwarding
More informationEITF20: Computer Architecture Part2.2.1: Pipeline-1
EITF20: Computer Architecture Part2.2.1: Pipeline-1 Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Pipelining Harzards Structural hazards Data hazards Control hazards Implementation issues Multi-cycle
More informationPredict Not Taken. Revisiting Branch Hazard Solutions. Filling the delay slot (e.g., in the compiler) Delayed Branch
branch taken Revisiting Branch Hazard Solutions Stall Predict Not Taken Predict Taken Branch Delay Slot Branch I+1 I+2 I+3 Predict Not Taken branch not taken Branch I+1 IF (bubble) (bubble) (bubble) (bubble)
More informationPipelining. CSC Friday, November 6, 2015
Pipelining CSC 211.01 Friday, November 6, 2015 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory register file ALU data memory register file Not
More informationLecture 7: Pipelining Contd. More pipelining complications: Interrupts and Exceptions
Lecture 7: Pipelining Contd. Kunle Olukotun Gates 302 kunle@ogun.stanford.edu http://www-leland.stanford.edu/class/ee282h/ 1 More pipelining complications: Interrupts and Exceptions Hard to handle in pipelined
More informationCSEE 3827: Fundamentals of Computer Systems
CSEE 3827: Fundamentals of Computer Systems Lecture 21 and 22 April 22 and 27, 2009 martha@cs.columbia.edu Amdahl s Law Be aware when optimizing... T = improved Taffected improvement factor + T unaffected
More informationMIPS An ISA for Pipelining
Pipelining: Basic and Intermediate Concepts Slides by: Muhamed Mudawar CS 282 KAUST Spring 2010 Outline: MIPS An ISA for Pipelining 5 stage pipelining i Structural Hazards Data Hazards & Forwarding Branch
More informationFull Datapath. Chapter 4 The Processor 2
Pipelining Full Datapath Chapter 4 The Processor 2 Datapath With Control Chapter 4 The Processor 3 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationModern Computer Architecture
Modern Computer Architecture Lecture2 Pipelining: Basic and Intermediate Concepts Hongbin Sun 国家集成电路人才培养基地 Xi an Jiaotong University Pipelining: Its Natural! Laundry Example Ann, Brian, Cathy, Dave each
More informationFull Datapath. Chapter 4 The Processor 2
Pipelining Full Datapath Chapter 4 The Processor 2 Datapath With Control Chapter 4 The Processor 3 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory
More informationAppendix C. Instructor: Josep Torrellas CS433. Copyright Josep Torrellas 1999, 2001, 2002,
Appendix C Instructor: Josep Torrellas CS433 Copyright Josep Torrellas 1999, 2001, 2002, 2013 1 Pipelining Multiple instructions are overlapped in execution Each is in a different stage Each stage is called
More informationData Hazards Compiler Scheduling Pipeline scheduling or instruction scheduling: Compiler generates code to eliminate hazard
Data Hazards Compiler Scheduling Pipeline scheduling or instruction scheduling: Compiler generates code to eliminate hazard Consider: a = b + c; d = e - f; Assume loads have a latency of one clock cycle:
More informationSome material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier
Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier Science Cases that affect instruction execution semantics
More informationCISC 662 Graduate Computer Architecture Lecture 6 - Hazards
CISC 662 Graduate Computer Architecture Lecture 6 - Hazards Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer
More informationChapter 4 The Processor 1. Chapter 4A. The Processor
Chapter 4 The Processor 1 Chapter 4A The Processor Chapter 4 The Processor 2 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware
More informationCOMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle
More informationCMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3. Complications With Long Instructions
CMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3 Long Instructions & MIPS Case Study Complications With Long Instructions So far, all MIPS instructions take 5 cycles But haven't talked
More informationThe Processor Pipeline. Chapter 4, Patterson and Hennessy, 4ed. Section 5.3, 5.4: J P Hayes.
The Processor Pipeline Chapter 4, Patterson and Hennessy, 4ed. Section 5.3, 5.4: J P Hayes. Pipeline A Basic MIPS Implementation Memory-reference instructions Load Word (lw) and Store Word (sw) ALU instructions
More informationInstr. execution impl. view
Pipelining Sangyeun Cho Computer Science Department Instr. execution impl. view Single (long) cycle implementation Multi-cycle implementation Pipelined implementation Processing an instruction Fetch instruction
More informationCOMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction
More informationChapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction
More informationPipelining. Principles of pipelining. Simple pipelining. Structural Hazards. Data Hazards. Control Hazards. Interrupts. Multicycle operations
Principles of pipelining Pipelining Simple pipelining Structural Hazards Data Hazards Control Hazards Interrupts Multicycle operations Pipeline clocking ECE D52 Lecture Notes: Chapter 3 1 Sequential Execution
More informationECE154A Introduction to Computer Architecture. Homework 4 solution
ECE154A Introduction to Computer Architecture Homework 4 solution 4.16.1 According to Figure 4.65 on the textbook, each register located between two pipeline stages keeps data shown below. Register IF/ID
More informationAdvanced issues in pipelining
Advanced issues in pipelining 1 Outline Handling exceptions Supporting multi-cycle operations Pipeline evolution Examples of real pipelines 2 Handling exceptions 3 Exceptions In pipelined execution, one
More informationMulti-cycle Instructions in the Pipeline (Floating Point)
Lecture 6 Multi-cycle Instructions in the Pipeline (Floating Point) Introduction to instruction level parallelism Recap: Support of multi-cycle instructions in a pipeline (App A.5) Recap: Superpipelining
More informationEITF20: Computer Architecture Part2.2.1: Pipeline-1
EITF20: Computer Architecture Part2.2.1: Pipeline-1 Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Pipelining Harzards Structural hazards Data hazards Control hazards Implementation issues Multi-cycle
More informationLecture 2: Processor and Pipelining 1
The Simple BIG Picture! Chapter 3 Additional Slides The Processor and Pipelining CENG 6332 2 Datapath vs Control Datapath signals Control Points Controller Datapath: Storage, FU, interconnect sufficient
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle
More informationThere are different characteristics for exceptions. They are as follows:
e-pg PATHSHALA- Computer Science Computer Architecture Module 15 Exception handling and floating point pipelines The objectives of this module are to discuss about exceptions and look at how the MIPS architecture
More informationLecture 7 Pipelining. Peng Liu.
Lecture 7 Pipelining Peng Liu liupeng@zju.edu.cn 1 Review: The Single Cycle Processor 2 Review: Given Datapath,RTL -> Control Instruction Inst Memory Adr Op Fun Rt
More informationLecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1
Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Introduction Chapter 4.1 Chapter 4.2 Review: MIPS (RISC) Design Principles Simplicity favors regularity fixed size instructions small number
More information3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?
CSE 2021: Computer Organization Single Cycle (Review) Lecture-10b CPU Design : Pipelining-1 Overview, Datapath and control Shakil M. Khan 2 Single Cycle with Jump Multi-Cycle Implementation Instruction:
More informationCOMPUTER ORGANIZATION AND DESI
COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count Determined by ISA and compiler
More informationDepartment of Computer and IT Engineering University of Kurdistan. Computer Architecture Pipelining. By: Dr. Alireza Abdollahpouri
Department of Computer and IT Engineering University of Kurdistan Computer Architecture Pipelining By: Dr. Alireza Abdollahpouri Pipelined MIPS processor Any instruction set can be implemented in many
More informationProcessor Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Processor Architecture Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Moore s Law Gordon Moore @ Intel (1965) 2 Computer Architecture Trends (1)
More informationPipelining Analogy. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop: Speedup = 8/3.5 = 2.3.
Pipelining Analogy Pipelined laundry: overlapping execution Parallelism improves performance Four loads: Speedup = 8/3.5 = 2.3 Non-stop: Speedup =2n/05n+15 2n/0.5n 1.5 4 = number of stages 4.5 An Overview
More informationECE 486/586. Computer Architecture. Lecture # 12
ECE 486/586 Computer Architecture Lecture # 12 Spring 2015 Portland State University Lecture Topics Pipelining Control Hazards Delayed branch Branch stall impact Implementing the pipeline Detecting hazards
More informationProcessor (II) - pipelining. Hwansoo Han
Processor (II) - pipelining Hwansoo Han Pipelining Analogy Pipelined laundry: overlapping execution Parallelism improves performance Four loads: Speedup = 8/3.5 =2.3 Non-stop: 2n/0.5n + 1.5 4 = number
More informationAppendix A. Overview
Appendix A Pipelining: Basic and Intermediate Concepts 1 Overview Basics of Pipelining Pipeline Hazards Pipeline Implementation Pipelining + Exceptions Pipeline to handle Multicycle Operations 2 1 Unpipelined
More informationThe Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture
The Processor Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut CSE3666: Introduction to Computer Architecture Introduction CPU performance factors Instruction count
More information1 Hazards COMP2611 Fall 2015 Pipelined Processor
1 Hazards Dependences in Programs 2 Data dependence Example: lw $1, 200($2) add $3, $4, $1 add can t do ID (i.e., read register $1) until lw updates $1 Control dependence Example: bne $1, $2, target add
More informationLecture Topics. Announcements. Today: Data and Control Hazards (P&H ) Next: continued. Exam #1 returned. Milestone #5 (due 2/27)
Lecture Topics Today: Data and Control Hazards (P&H 4.7-4.8) Next: continued 1 Announcements Exam #1 returned Milestone #5 (due 2/27) Milestone #6 (due 3/13) 2 1 Review: Pipelined Implementations Pipelining
More informationOverview. Appendix A. Pipelining: Its Natural! Sequential Laundry 6 PM Midnight. Pipelined Laundry: Start work ASAP
Overview Appendix A Pipelining: Basic and Intermediate Concepts Basics of Pipelining Pipeline Hazards Pipeline Implementation Pipelining + Exceptions Pipeline to handle Multicycle Operations 1 2 Unpipelined
More informationProcessor Architecture
Processor Architecture Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE2030: Introduction to Computer Systems, Spring 2018, Jinkyu Jeong (jinkyu@skku.edu)
More informationCOSC4201 Pipelining. Prof. Mokhtar Aboelaze York University
COSC4201 Pipelining Prof. Mokhtar Aboelaze York University 1 Instructions: Fetch Every instruction could be executed in 5 cycles, these 5 cycles are (MIPS like machine). Instruction fetch IR Mem[PC] NPC
More informationComputer Architecture Spring 2016
Computer Architecture Spring 2016 Lecture 02: Introduction II Shuai Wang Department of Computer Science and Technology Nanjing University Pipeline Hazards Major hurdle to pipelining: hazards prevent the
More informationPipeline Hazards. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Pipeline Hazards Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Hazards What are hazards? Situations that prevent starting the next instruction
More informationLecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996
Lecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996 RHK.SP96 1 Review: Evaluating Branch Alternatives Two part solution: Determine
More informationPipelining. Principles of pipelining. Simple pipelining. Structural Hazards. Data Hazards. Control Hazards. Interrupts. Multicycle operations
Principles of pipelining Pipelining Simple pipelining Structural Hazards Data Hazards Control Hazards Interrupts Multicycle operations Pipeline clocking ECE D52 Lecture Notes: Chapter 3 1 Sequential Execution
More informationChapter 4 The Processor 1. Chapter 4B. The Processor
Chapter 4 The Processor 1 Chapter 4B The Processor Chapter 4 The Processor 2 Control Hazards Branch determines flow of control Fetching next instruction depends on branch outcome Pipeline can t always
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle
More informationPipelining. Maurizio Palesi
* Pipelining * Adapted from David A. Patterson s CS252 lecture slides, http://www.cs.berkeley/~pattrsn/252s98/index.html Copyright 1998 UCB 1 References John L. Hennessy and David A. Patterson, Computer
More informationComplications with long instructions. CMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3. How slow is slow?
Complications with long instructions CMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3 Long Instructions & MIPS Case Study So far, all MIPS instructions take 5 cycles But haven't talked
More informationEE557--FALL 1999 MAKE-UP MIDTERM 1. Closed books, closed notes
NAME: STUDENT NUMBER: EE557--FALL 1999 MAKE-UP MIDTERM 1 Closed books, closed notes Q1: /1 Q2: /1 Q3: /1 Q4: /1 Q5: /15 Q6: /1 TOTAL: /65 Grade: /25 1 QUESTION 1(Performance evaluation) 1 points We are
More informationPipelined Processor Design
Pipelined Processor Design Pipelined Implementation: MIPS Virendra Singh Indian Institute of Science Bangalore virendra@computer.org Lecture 20 SE-273: Processor Design Courtesy: Prof. Vishwani Agrawal
More informationThomas Polzer Institut für Technische Informatik
Thomas Polzer tpolzer@ecs.tuwien.ac.at Institut für Technische Informatik Pipelined laundry: overlapping execution Parallelism improves performance Four loads: Speedup = 8/3.5 = 2.3 Non-stop: Speedup =
More informationPage 1. CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Pipeline CPI (II) Michela Taufer
CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer Pipeline CPI http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson
More informationOutline. A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception
Outline A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception 1 4 Which stage is the branch decision made? Case 1: 0 M u x 1 Add
More informationComputer Architecture Computer Science & Engineering. Chapter 4. The Processor BK TP.HCM
Computer Architecture Computer Science & Engineering Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware
More informationT = I x CPI x C. Both effective CPI and clock cycle C are heavily influenced by CPU design. CPI increased (3-5) bad Shorter cycle good
CPU performance equation: T = I x CPI x C Both effective CPI and clock cycle C are heavily influenced by CPU design. For single-cycle CPU: CPI = 1 good Long cycle time bad On the other hand, for multi-cycle
More informationPipelined Processor Design
Pipelined Processor Design Pipelined Implementation: MIPS Virendra Singh Computer Design and Test Lab. Indian Institute of Science (IISc) Bangalore virendra@computer.org Advance Computer Architecture http://www.serc.iisc.ernet.in/~viren/courses/aca/aca.htm
More informationAdvanced Computer Architecture
Advanced Computer Architecture Chapter 1 Introduction into the Sequential and Pipeline Instruction Execution Martin Milata What is a Processors Architecture Instruction Set Architecture (ISA) Describes
More informationComputer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining
Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining Single-Cycle Design Problems Assuming fixed-period clock every instruction datapath uses one
More informationDetermined by ISA and compiler. We will examine two MIPS implementations. A simplified version A more realistic pipelined version
MIPS Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationPage # CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Michela Taufer
CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationComputer Systems Architecture I. CSE 560M Lecture 5 Prof. Patrick Crowley
Computer Systems Architecture I CSE 560M Lecture 5 Prof. Patrick Crowley Plan for Today Note HW1 was assigned Monday Commentary was due today Questions Pipelining discussion II 2 Course Tip Question 1:
More informationPipelined Processors. Ideal Pipelining. Example: FP Multiplier. 55:132/22C:160 Spring Jon Kuhl 1
55:3/C:60 Spring 00 Pipelined Design Motivation: Increase processor throughput with modest increase in hardware. Bandwidth or Throughput = Performance Pipelined Processors Chapter Bandwidth (BW) = no.
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations
More informationELE 655 Microprocessor System Design
ELE 655 Microprocessor System Design Section 2 Instruction Level Parallelism Class 1 Basic Pipeline Notes: Reg shows up two places but actually is the same register file Writes occur on the second half
More informationChapter 4. The Processor
Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations Determined by ISA
More informationAnnouncement. ECE475/ECE4420 Computer Architecture L4: Advanced Issues in Pipelining. Edward Suh Computer Systems Laboratory
ECE475/ECE4420 Computer Architecture L4: Advanced Issues in Pipelining Edward Suh Computer Systems Laboratory suh@csl.cornell.edu Announcement Lab1 is released Start early we only have limited computing
More informationSome material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier
Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier Science 6 PM 7 8 9 10 11 Midnight Time 30 40 20 30 40 20
More informationAdvanced Parallel Architecture Lessons 5 and 6. Annalisa Massini /2017
Advanced Parallel Architecture Lessons 5 and 6 Annalisa Massini - Pipelining Hennessy, Patterson Computer architecture A quantitive approach Appendix C Sections C.1, C.2 Pipelining Pipelining is an implementation
More informationCOSC4201. Prof. Mokhtar Aboelaze York University
COSC4201 Chapter 3 Multi Cycle Operations Prof. Mokhtar Aboelaze York University Based on Slides by Prof. L. Bhuyan (UCR) Prof. M. Shaaban (RTI) 1 Multicycle Operations More than one function unit, each
More informationChapter 3. Pipelining. EE511 In-Cheol Park, KAIST
Chapter 3. Pipelining EE511 In-Cheol Park, KAIST Terminology Pipeline stage Throughput Pipeline register Ideal speedup Assume The stages are perfectly balanced No overhead on pipeline registers Speedup
More informationThis Set. Scheduling and Dynamic Execution Definitions From various parts of Chapter 4. Description of Three Dynamic Scheduling Methods
10-1 Dynamic Scheduling 10-1 This Set Scheduling and Dynamic Execution Definitions From various parts of Chapter 4. Description of Three Dynamic Scheduling Methods Not yet complete. (Material below may
More informationPipelining: Basic and Intermediate Concepts
Appendix A Pipelining: Basic and Intermediate Concepts 1 Overview Basics of fpipelining i Pipeline Hazards Pipeline Implementation Pipelining + Exceptions Pipeline to handle Multicycle Operations 2 Unpipelined
More informationVery Simple MIPS Implementation
06 1 MIPS Pipelined Implementation 06 1 line: (In this set.) Unpipelined Implementation. (Diagram only.) Pipelined MIPS Implementations: Hardware, notation, hazards. Dependency Definitions. Hazards: Definitions,
More informationEIE/ENE 334 Microprocessors
EIE/ENE 334 Microprocessors Lecture 6: The Processor Week #06/07 : Dejwoot KHAWPARISUTH Adapted from Computer Organization and Design, 4 th Edition, Patterson & Hennessy, 2009, Elsevier (MK) http://webstaff.kmutt.ac.th/~dejwoot.kha/
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationECEC 355: Pipelining
ECEC 355: Pipelining November 8, 2007 What is Pipelining Pipelining is an implementation technique whereby multiple instructions are overlapped in execution. A pipeline is similar in concept to an assembly
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 17: Pipelining Wrapup Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Outline The textbook includes lots of information Focus on
More informationWhat is Pipelining? Time per instruction on unpipelined machine Number of pipe stages
What is Pipelining? Is a key implementation techniques used to make fast CPUs Is an implementation techniques whereby multiple instructions are overlapped in execution It takes advantage of parallelism
More informationPipelining! Advanced Topics on Heterogeneous System Architectures. Politecnico di Milano! Seminar DEIB! 30 November, 2017!
Advanced Topics on Heterogeneous System Architectures Pipelining! Politecnico di Milano! Seminar Room @ DEIB! 30 November, 2017! Antonio R. Miele! Marco D. Santambrogio! Politecnico di Milano! 2 Outline!
More informationECE/CS 552: Pipeline Hazards
ECE/CS 552: Pipeline Hazards Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and Jim Smith Pipeline Hazards Forecast Program Dependences
More informationDLX Unpipelined Implementation
LECTURE - 06 DLX Unpipelined Implementation Five cycles: IF, ID, EX, MEM, WB Branch and store instructions: 4 cycles only What is the CPI? F branch 0.12, F store 0.05 CPI0.1740.83550.174.83 Further reduction
More information