Structura pipeline a unui procesor MIPS

Slides:



Advertisements
Similar presentations
CMPT 334 Computer Organization
Advertisements

Pipeline Hazards CS365 Lecture 10. D. Barbara Pipeline Hazards CS465 2 Review  Pipelined CPU  Overlapped execution of multiple instructions  Each on.
ECE 445 – Computer Organization
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Pipelined Processor.
Part 2 - Data Hazards and Forwarding 3/24/04++
Review: MIPS Pipeline Data and Control Paths
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 18 - Pipelined.
Chapter Six Enhancing Performance with Pipelining
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?
 The actual result $1 - $3 is computed in clock cycle 3, before it’s needed in cycles 4 and 5  We forward that value to later instructions, to prevent.
Computer Organization Lecture Set – 06 Chapter 6 Huei-Yung Lin.
Lecture 28: Chapter 4 Today’s topic –Data Hazards –Forwarding 1.
Enhancing Performance with Pipelining Slides developed by Rami Abielmona and modified by Miodrag Bolic High-Level Computer Systems Design.
1 Pipelining Reconsider the data path we just did Each instruction takes from 3 to 5 clock cycles However, there are parts of hardware that are idle many.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Pipeline Data Hazards: Detection and Circumvention Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly.
Pipelined Datapath and Control
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.
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.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2012 Revised from original slides provided by MKP.
Basic Pipelining & MIPS Pipelining Chapter 6 [Computer Organization and Design, © 2007 Patterson (UCB) & Hennessy (Stanford), & Slides Adapted from: Mary.
CMPE 421 Parallel Computer Architecture Part 2: Hardware Solution: Forwarding.
2/15/02CSE Data Hazzards Data Hazards in the Pipelined Implementation.
CSE431 L07 Overcoming Data Hazards.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 07: Overcoming Data Hazards Mary Jane Irwin (
Computing Systems Pipelining: enhancing performance.
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Topic 9: MIPS Pipeline.
CSIE30300 Computer Architecture Unit 05: Overcoming Data Hazards Hsin-Chou Chi [Adapted from material by and
Introduction to Computer Organization Pipelining.
CPE432 Chapter 4B.1Dr. W. Abu-Sufah, UJ Chapter 4B: The Processor, Part B-1 Read Sections 4.7 Adapted from Slides by Prof. Mary Jane Irwin, Penn State.
Pipelining: Implementation CPSC 252 Computer Organization Ellen Walker, Hiram College.
CSE 340 Computer Architecture Spring 2016 Overcoming Data Hazards.
Note how everything goes left to right, except …
Pipelining Chapter 6.
Morgan Kaufmann Publishers The Processor
Basic Pipeline Datapath
Single Clock Datapath With Control
CDA 3101 Spring 2016 Introduction to Computer Organization
IntraShip inovatie, flexibilitate, rapiditate.
ECE232: Hardware Organization and Design
Placa de bază.
Morgan Kaufmann Publishers The Processor
Data Hazards and Stalls
Data Hazards and Stalls
Forwarding Now, we’ll introduce some problems that data hazards can cause for our pipelined processor, and show how to handle them with forwarding.
Chapter 4 The Processor Part 3
Review: MIPS Pipeline Data and Control Paths
Morgan Kaufmann Publishers The Processor
Csci 136 Computer Architecture II – Data Hazard, Forwarding, Stall
Morgan Kaufmann Publishers The Processor
Primirea si procesarea cererilor
Funcții C/C++ continuare
Morgan Kaufmann Publishers Enhancing Performance with Pipelining
Computer Organization CS224
Computer Architecture
CSCI206 - Computer Organization & Programming
Pipelined Control (Simplified)
The Processor Lecture 3.5: Data Hazards
Pipelining: Basic Concepts
CSC3050 – Computer Architecture
Pipelining (II).
Data Path Diagrams.
Morgan Kaufmann Publishers The Processor
Pipelined Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Systems Architecture II
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,
©2003 Craig Zilles (derived from slides by Howard Huang)
Need to stall for one cycle.
Presentation transcript:

Structura pipeline a unui procesor MIPS

Considerații preliminare Tip instructiune Faza de fetch Citire registri Operatie ALU Acces la date Scriere registru Timp total Load word (lw) 200ps 100ps 800ps Stoare word (sw) 700ps R-format (add, sub...) 600ps Branch (beq) 500ps

Considerații preliminare

Considerații preliminare

Considerații preliminare

Etapele pipeline

Calea de date pentru pipeline

Execuţia instrucţiunii lw – IF

Execuţia instrucţiunii lw - ID

Execuţia instrucţiunii lw - EX

Execuţia instrucţiunii lw - MEM

Execuţia instrucţiunii lw - WB

Execuţia instrucţiunii sw – MEM

Execuţia instrucţiunii sw – WB

Execuția pipline a unei secvențe de instrucțiuni independente

Controlul ȋn execuția pipeline

Controlul ȋn execuția pipeline - detalii

Hazardul ȋn execuția pipeline Prin hazard ȋn funcționarea pipeline vom ȋnțelege acele situații când execuția unei noi instrucțiuni nu se poate realiza pe următorul ciclu. Pot fi puse ȋn evidență trei tipuri de hazard: Hazard structural (structural hazard) – atunci când hardware-ul nu suportă execuția unei anumite combinații de instrucțiuni ȋn acelaşi ciclu. În cazul procesoarelor MIPS setul de instrucțiuni a fost astfel gandit ȋncât să evite acest tip de hazard atât timp cât există o memorie de instrucțiuni şi o memorie de date. Hazard al datelor (data hazard) – atunci când execuția unei instrucțiuni este blocată deoarece instrucțiunile anterioare nu i-au furnizat ȋncă datele necesare. Hazard la citirea din memorie (load-use data hazard) – o formă specifică de hazard al datelor ȋn care data care se ȋncarcă din memorie nu este ȋncă disponibilă pentru următoarea instrucțiune. Hazard al controlului (control hazard, branch hazard) - atunci când instrucțiunea executată nu este instrucțiunea corectă (ȋn cazul instrucțiunilor de ramificare).

Hazardul datelor ȋn execuția pipeline Se datorează dependenței execuției unei instrucțiuni de rezultatul execuției unei instrucțiuni anterioare ȋncă nefinalizată. add $s0, $t0, $t1 sub $t2, $s0, $t3

Hazardul datelor ȋn execuția pipeline lw $t1, 0($t0) lw $t2, 4($t0) add $t3, $t1, $t2 sw $t3,12($t0) lw $t4, 8($t0) add $t5, $t1, $t4 sw $t5, 16($t0) sw $5, 16($t0)

Hazardul datelor ȋn execuția pipeline

Hazardul datelor ȋn execuția pipeline

Modificarea procesorului pentru eliminarea hazardurilor

Modificarea procesorului pentru eliminarea hazardurilor

Modificarea procesorului pentru eliminarea hazardurilor 1a. EX/MEM.RegisterRd=ID/EX.RegisterRs 1b. EX/MEM.RegisterRd=ID/EX.RegisterRt 2a. MEM/WB.RegisterRd=ID/EX.RegisterRs 2b. MEM/WB.RegisterRd=ID/EX.RegisterRt

Modificarea procesorului pentru eliminarea hazardurilor

Modificarea procesorului pentru eliminarea hazardurilor EX hazard: IF (EX/MEM.RegWrite and (EX/MEM.registerRd0) and (EX/MEM.RegisterRd=ID/EX.RegisterRs)) ForwardA=10 and (EX/MEM.RegisterRd=ID/EX.RegisterRt)) ForwardB=10

Modificarea procesorului pentru eliminarea hazardurilor MEM hazard: IF (MEM/WB.RegWrite and (MEM/WB.registerRd0) and (MEM/WB.RegisterRd=ID/EX.RegisterRs)) ForwardA=01 and (MEM/WB.RegisterRd=ID/EX.RegisterRt)) ForwardB=01

Modificarea procesorului pentru eliminarea hazardurilor add $1, $1, $2 add $1, $1, $3 add $1, $1, $4

Modificarea procesorului pentru eliminarea hazardurilor

Modificarea procesorului pentru eliminarea hazardurilor IF (MEM/WB.RegWrite and (MEM/WB.registerRd0) and (EX/MEM.RegisterRdID/EX.RegisterRs) and (MEM/WB.RegisterRd=ID/EX.RegisterRs)) ForwardA=01 and (EX/MEM.RegisterRdID/EX.RegisterRt) and (MEM/WB.RegisterRd=ID/EX.RegisterRt)) ForwardB=01

Furtul de ciclu if (ID/EX.MemRead and ((ID/EX.RegisterRt=IF/ID.RegisterRs) or (ID/EX.Register Rt=IF/ID.RegisterRt))) stall the pipeline

Furtul de ciclu

Furtul de ciclu

Furtul de ciclu

Hazardul controlului

Hazardul controlului

Întrebări?