EECS 370 Discussion smbc-comics.com.

Slides:



Advertisements
Similar presentations
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Advertisements

COMP25212 Further Pipeline Issues. Cray 1 COMP25212 Designed in 1976 Cost $8,800,000 8MB Main Memory Max performance 160 MFLOPS Weight 5.5 Tons Power.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
1 Quiz 3, Answers 1,3 The CPI is: 0.22* * * *12 = = 5.42 In the 2nd case the CPI is 1.0. Every instruction.
Pipeline Hazards Hakim Weatherspoon CS 3410, Spring 2011 Computer Science Cornell University See P&H Appendix 4.7.
Chapter 6. (1)Long cycle time (2)Idle transistors.
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.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 23 - Course.
EECS 470 Pipeline Hazards Lecture 4 Coverage: Appendix A.
Pipelining III Andreas Klappenecker CPSC321 Computer Architecture.
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?
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 Architecture - A Pipelined Datapath A Pipelined Datapath  Resisters are used to save data between stages. 1/14.
1  1998 Morgan Kaufmann Publishers Chapter Six Enhancing Performance with Pipelining.
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.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 12 Overview and Concluding Remarks.
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.
Comp Sci pipelining 1 Ch. 13 Pipelining. Comp Sci pipelining 2 Pipelining.
Pipeline Hazards. CS5513 Fall Pipeline Hazards Situations that prevent the next instructions in the instruction stream from executing during its.
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.
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.
Sample Code (Simple) Run the following code on a pipelined datapath: add1 2 3 ; reg 3 = reg 1 + reg 2 nand ; reg 6 = reg 4 & reg 5 lw ; reg.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Pipelining Basics.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
EECS 370 Discussion 1 xkcd.com. EECS 370 Discussion Mid-semester Feedback Thanks! 2.
1  1998 Morgan Kaufmann Publishers Chapter Six. 2  1998 Morgan Kaufmann Publishers Pipelining Improve perfomance by increasing instruction throughput.
Lecture 16: Basic Pipelining
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.
Introduction to Computer Organization Pipelining.
EECS 370 Discussion 1 Sample Exam Questions. EECS 370 Discussion 2 Not Really… xkcd.com.
EECS 370 Discussion 1 Calvin and Hobbes by Bill Watterson.
Chapter Six.
CDA3101 Recitation Section 8
Pipelining Chapter 6.
CSCI206 - Computer Organization & Programming
Lecture 15: Basic CPU Design
Lecture 16: Basic Pipelining
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards
Single Clock Datapath With Control
CDA 3101 Spring 2016 Introduction to Computer Organization
The fetch-execute cycle
Team A.W.E.S.O.M.-O 4000 February 27, 2007.
Lecture 16: Basic Pipelining
Pipelining Chapter 6.
Computer Architecture
Pipelining in more detail
CSCI206 - Computer Organization & Programming
Computer Architecture
CSCI206 - Computer Organization & Programming
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards.
Chapter Six.
Chapter Six.
November 5 No exam results today. 9 Classes to go!
Data Hazard Example (stall).
Pipelining: Basic Concepts
Pipelining Chapter 6.
Appendix C Practice Problem Set 1
Acceleration How to improve speed? At what costs?.
Introduction to Computer Organization and Architecture
Pipelining Chapter 6.
Seoul National University
Guest Lecturer: Justin Hsia
Lecture: Pipelining Basics
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,
Need to stall for one cycle.
Presentation transcript:

EECS 370 Discussion smbc-comics.com

EECS 370 Discussion Topics Today: 5-stage Pipeline Exams Basic Design Performance Data Hazards Exams

Single Cycle CPI = Clock Period = EECS 370 Discussion Single Cycle CPI = Clock Period =

Single Cycle CPI = 1 Clock Period = long EECS 370 Discussion Single Cycle CPI = 1 Clock Period = long Multi-Cycle CPI = Clock Period =

Single Cycle CPI = 1 Clock Period = long EECS 370 Discussion Single Cycle CPI = 1 Clock Period = long Multi-Cycle CPI = >1 Clock Period = short Pipelined CPI = Clock Period =

Single Cycle CPI = 1 Clock Period = long EECS 370 Discussion Single Cycle CPI = 1 Clock Period = long Multi-Cycle CPI = >1 Clock Period = short Pipelined CPI ≈ 1 Clock Period = short

EECS 370 Discussion 5-stage Pipeline

EECS 370 Discussion 5-stage Pipeline Pipeline Example add 1 2 3 nand 4 5 6 lw 0 4 26 add 2 2 2 nand 1 1 1

EECS 370 Discussion 5-stage Pipeline Key Concept 1000 instructions are run on a 5-stage pipeline (no hazards) How many cycles are needed to complete them?

EECS 370 Discussion 5-stage Pipeline Key Concept 1000 instructions are run on a 5-stage pipeline (no hazards) How many cycles are needed to complete them? 1004 cycles

EECS 370 Discussion Multi-Cycle Datapath Timing Example 100 Instructions: What is the total execution time? (No Hazards) Single Cycle: 100 * 60 = 6000 ns Multi-Cycle: 20 * (35*5 + 15*4 + 30*4 + 20*4) = 8700 ns Pipelined: 35% lw 15% sw 30% add/nand 20% beq 5 ns – Register Read/Write 10 ns – ALU Operations 20 ns – Memory Access

EECS 370 Discussion Multi-Cycle Datapath Timing Example 100 Instructions: What is the total execution time? (No Hazards) Single Cycle: 100 * 60 = 6000 ns Multi-Cycle: 20 * (35*5 + 15*4 + 30*4 + 20*4) = 8700 ns Pipelined: 20 * (4 + 100) = 2080 ns 35% lw 15% sw 30% add/nand 20% beq 5 ns – Register Read/Write 10 ns – ALU Operations 20 ns – Memory Access

EECS 370 Discussion Data Hazards Key Concepts In what stage is data read from registers? In what stage is data written to registers?

EECS 370 Discussion Data Hazards Key Concepts In what stage is data read from registers? Decode In what stage is data written to registers? Writeback

EECS 370 Discussion Data Hazards The Problem: x = 5*y+3; LDR R1 [R0, #wherever y is] MUL R2 R1 #5 ADD R2 R2 #3 STR R2 [R0, #wherever x is]

Data Hazards Solutions: Avoidance Detect and Stall Detect and Forward EECS 370 Discussion Data Hazards Solutions: Avoidance Detect and Stall Detect and Forward

EECS 370 Discussion Data Hazards Pipeline Example add 1 2 3 nand 3 5 6 lw 0 3 26 add 6 2 4 nand 4 3 1

EECS 370 Discussion Exam Results Answer Keys are posted online Exams will be returned now next week Regrade Requests: Submit Scantron + written statement to IA/GSI/Professor Before Friday