Datorteknik DelayedLoad bild 1 Delayed Load. Datorteknik DelayedLoad bild 2 All problems solved? NO, what will happen if...... lw $6 $0($1) add $4 $6.

Slides:



Advertisements
Similar presentations
Datorteknik DelayedBranch bild 1 Delayed Branch All problems solved? NO, what will happen if b loop add $4 $6 $1... loop sub.
Advertisements

Morgan Kaufmann Publishers The Processor
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.
Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
Datorteknik DataHazard bild 1 Data Hazards 0x30 sub $6 $0 $1 0x34 add $7 $6 $
Datorteknik IntegerMulDiv bild 1 MIPS mul/div instructions Multiply: mult $2,$3Hi, Lo = $2 x $3;64-bit signed product Multiply unsigned: multu$2,$3Hi,
Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?
Datorteknik Pipeline1 bild 1 No Assembly line. Datorteknik Pipeline1 bild 2 Assembly line - start up ChassisAxelsMotorSeatsBody Start up waste.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipeline Hazards See: P&H Chapter 4.7.
Pipeline Hazards Hakim Weatherspoon CS 3410, Spring 2011 Computer Science Cornell University See P&H Appendix 4.7.
Review: MIPS Pipeline Data and Control Paths
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 ( )
©UCB CS 162 Computer Architecture Lecture 3: Pipelining Contd. Instructor: L.N. Bhuyan
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
1 Stalling  The easiest solution is to stall the pipeline  We could delay the AND instruction by introducing a one-cycle delay into the pipeline, sometimes.
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.
1 CSE SUNY New Paltz Chapter Six Enhancing Performance with Pipelining.
Lec 9: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
CSCE 212 Quiz 9a – 4/1/11 For the following questions, assume the clock cycle times given above and the following set of instructions: lw $5, -16($5) sw.
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.
Spring W :332:331 Computer Architecture and Assembly Language Spring 2005 Week 11 Introduction to Pipelined Datapath [Adapted from Dave Patterson’s.
Pipeline Data Hazards: Detection and Circumvention Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly.
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.
Comp Sci pipelining 1 Ch. 13 Pipelining. Comp Sci pipelining 2 Pipelining.
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.
Computer Organization CS224 Chapter 4 Part b The Processor Spring 2010 With thanks to M.J. Irwin, T. Fountain, D. Patterson, and J. Hennessy for some lecture.
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.
CMPE 421 Parallel Computer Architecture Part 2: Hardware Solution: Forwarding.
CECS 440 Pipelining.1(c) 2014 – R. W. Allison [slides adapted from D. Patterson slides with additional credits to M.J. Irwin]
Winter 2002CSE Topic Branch Hazards in the Pipelined Processor.
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.
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.
CSE431 L07 Overcoming Data Hazards.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 07: Overcoming Data Hazards Mary Jane Irwin (
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
Instructor: Senior Lecturer SOE Dan Garcia CS 61C: Great Ideas in Computer Architecture Pipelining Hazards 1.
CSIE30300 Computer Architecture Unit 05: Overcoming Data Hazards Hsin-Chou Chi [Adapted from material by and
EE524/CptS561 Jose G. Delgado-Frias 1 Processor Basic steps to process an instruction IFID/OFEXMEMWB Instruction Fetch Instruction Decode / Operand Fetch.
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
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.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 13: Branch prediction (Chapter 4/6)
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
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.
CSE 340 Computer Architecture Spring 2016 Overcoming Data Hazards.
Computer Organization
Exceptions Another form of control hazard Could be caused by…
Pipelining: Hazards Ver. Jan 14, 2014
CSCI206 - Computer Organization & Programming
Review: MIPS Pipeline Data and Control Paths
Pipelining review.
Pipelining in more detail
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Data Hazards Data Hazard
Pipeline control unit (highly abstracted)
The Processor Lecture 3.6: Control Hazards
The Processor Lecture 3.5: Data Hazards
Pipeline control unit (highly abstracted)
Delayed Load What will happen if lw $6 $0($1) add $4 $6 $1
Assembly line - start up
Pipelining (II).
Acceleration How to improve speed? At what costs?.
Introduction to Computer Organization and Architecture
Presentation transcript:

Datorteknik DelayedLoad bild 1 Delayed Load

Datorteknik DelayedLoad bild 2 All problems solved? NO, what will happen if lw $6 $0($1) add $4 $6 $1 add $7 $6 $2

Datorteknik DelayedLoad bild 3 IM Reg DMReg Critical path “DM” to “EX” ? IM Reg DMReg IM Reg DMReg 0x30 lw $6 $0($1) 0x34 add $4 $6 $1 0x38 add $7 $6 $2

Datorteknik DelayedLoad bild 4 Branch logic Sgn/Ze extend Zero ext. ALU A B = = = = The Model We Use

Datorteknik DelayedLoad bild 5 Fix or Not? The Critical path would be 2T (ALU+DM) Clockspeed only half WE CHOOSE NOT TO FIX

Datorteknik DelayedLoad bild 6 Delayed Load One “delayed load” slot –lw $6 $0($1) –other useful operation, or nop –add $4 $6 $1 –add $7 $6 $4 Still better than NO forward –lw $6 $0($1) –other useful operation, or nop –add $4 $6 $1 –other useful operation, or nop –add $7 $6 $4

Datorteknik DelayedLoad bild 7 Pipeline Efficiency Critical path cut to 1/4 Can we do the same with only three stages?

Datorteknik DelayedLoad bild 8 IM Reg DMReg 4 Stage Pipe IM Reg DM Reg 3 Stage Pipe

Datorteknik DelayedLoad bild 9 Branch logic Sgn/Ze extend Zero ext. ALU A B = = = = 4 Stage Pipe

Datorteknik DelayedLoad bild 10 Branch logic Sgn/Ze extend Zero ext. ALU A B = = = =

Datorteknik DelayedLoad bild 11 Critical Path? ALU + DM No, it’s too long, no can do!

Datorteknik DelayedLoad bild 12 Branch logic Sgn/Ze extend Zero ext. ALU A B = = = =

Datorteknik DelayedLoad bild 13 What about the instruction set? lw $t2 4($t4)? NO, ALU is not in path lw $t2 $t4? OK, No need for ALU

Datorteknik DelayedLoad bild 14 Avoid Delayed Load? Yes, by moving DM to EX, we can forward the result

Datorteknik DelayedLoad bild 15 Different Pipelength/depth Is it possible to implement both version in one structure (MIPS pipe). NO! There might be collisions, both EX, and DM accesses memory at the same time.

Datorteknik DelayedLoad bild 16 Pipeline Efficiency Did we change the critical path? NO!, ALU and DM are not in sequence