© Kavita Bala, Computer Science, Cornell University Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipelining See: P&H Chapter 4.5.

Slides:



Advertisements
Similar presentations
CMPE 421 Advanced Parallel Computer Architecture Pipeline datapath and Control.
Advertisements

PipelineCSCE430/830 Pipeline: Introduction CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Prof. Yifeng Zhu, U of Maine Fall,
Lecture 4: CPU Performance
Computer Organization and Architecture
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
CMPT 334 Computer Organization
Pipelining Principles Prof. Sirer CS 316 Cornell University.
1 RISC Pipeline Han Wang CS3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 4.6.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipeline Hazards See: P&H Chapter 4.7.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University RISC Pipeline See: P&H Chapter 4.6.
1 CS3410 Guest Lecture A Simple CPU: remaining branch instructions CPU Performance Pipelined CPU Tudor Marian.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Performance See: P&H 1.4.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Chapter: 1.6,
Mary Jane Irwin ( ) [Adapted from Computer Organization and Design,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1 Recap (Pipelining). 2 What is Pipelining? A way of speeding up execution of tasks Key idea : overlap execution of multiple taks.
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 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Computer ArchitectureFall 2007 © October 22nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Lec 9: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
1 Atanasoff–Berry Computer, built by Professor John Vincent Atanasoff and grad student Clifford Berry in the basement of the physics building at Iowa State.
Computer ArchitectureFall 2008 © October 6th, 2008 Majd F. Sakr CS-447– Computer Architecture.
CSE378 Pipelining1 Pipelining Basic concept of assembly line –Split a job A into n sequential subjobs (A 1,A 2,…,A n ) with each A i taking approximately.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Chapter: 1.6,
Instruction Sets and Pipelining Cover basics of instruction set types and fundamental ideas of pipelining Later in the course we will go into more depth.
CSC 4250 Computer Architectures September 15, 2006 Appendix A. 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.
Computer Science Education
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University CPU Performance Pipelined CPU See P&H Chapters 1.4 and 4.5.
MIPS Pipeline Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See P&H Chapter 4.6.
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.
1 Pipelining Part I CS What is Pipelining? Like an Automobile Assembly Line for Instructions –Each step does a little job of processing the instruction.
Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University MIPS Pipeline See P&H Chapter 4.6.
Pipelining Example Laundry Example: Three Stages
Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University MIPS Pipeline See P&H Chapter 4.6.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
CMPE 421 REVIEW: MIDTERM 1. A MODIFIED FIVE-Stage Pipeline PC A Y R MD1 addr inst Inst Memory Imm Ext add rd1 GPRs rs1 rs2 ws wd rd2 we wdata addr wdata.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Simulator Outline of MIPS Simulator project  Write a simulator for the MIPS five-stage pipeline that does the following: Implements a subset of.
CPU Performance Pipelined CPU Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See P&H Chapters 1.4 and 4.5.
CPU Performance Pipelined CPU
Computer Organization
Pipelines An overview of pipelining
CDA3101 Recitation Section 8
Performance of Single-cycle Design
CMSC 611: Advanced Computer Architecture
Pipelining.
Morgan Kaufmann Publishers The Processor
ECE232: Hardware Organization and Design
Pipelining.
Hakim Weatherspoon CS 3410 Computer Science Cornell University
Morgan Kaufmann Publishers The Processor
Chapter 4 The Processor Part 2
Lecturer: Alan Christopher
Serial versus Pipelined Execution
Systems Architecture II
Pipelining Basic concept of assembly line
An Introduction to pipelining
Pipelining Basic concept of assembly line
Pipelining Basic concept of assembly line
Pipelining Appendix A and Chapter 3.
Pipelining Hakim Weatherspoon CS 3410 Computer Science
A relevant question Assuming you’ve got: One washer (takes 30 minutes)
MIPS Pipeline Hakim Weatherspoon CS 3410, Spring 2013 Computer Science
Pipelining.
Presentation transcript:

© Kavita Bala, Computer Science, Cornell University Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipelining See: P&H Chapter 4.5

© Kavita Bala, Computer Science, Cornell University 2 The Kids Alice Bob They don’t always get along…

© Kavita Bala, Computer Science, Cornell University 3 The Bicycle

© Kavita Bala, Computer Science, Cornell University 4 The Materials Saw Drill Glue Paint

© Kavita Bala, Computer Science, Cornell University 5 The Instructions N pieces, each built following same sequence: SawDrillGluePaint

© Kavita Bala, Computer Science, Cornell University 6 Design 1: Sequential Schedule Alice owns the room Bob can enter when Alice is finished Repeat for remaining tasks No possibility for conflicts

© Kavita Bala, Computer Science, Cornell University 7 Elapsed Time for Alice: 4 Elapsed Time for Bob: 4 Total elapsed time: 4*N Can we do better? Sequential Performance time … Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 8 Design 2: Pipelined Design Partition room into stages of a pipeline One person owns a stage at a time 4 stages 4 people working simultaneously Everyone moves right in lockstep AliceBobCarolDave

© Kavita Bala, Computer Science, Cornell University 9 Pipelined Performance time … Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 10 Unequal Pipeline Stages 0h1h2h3h… 15 min 30 min 45 min 90 min Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 11 Poorly-balanced Pipeline Stages 0h1h2h3h… 15 min 30 min 45 min 90 min Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 12 Re-Balanced Pipeline Stages 0h1h2h3h… 15 min 30 min 45 min 90 min Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 13 Splitting Pipeline Stages 0h1h2h3h… 15 min 30 min 45 min min Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 14 Pipeline Hazards 0h1h2h3h… Q: What if glue step of task 3 depends on output of task 1? Latency: Throughput: Concurrency:

© Kavita Bala, Computer Science, Cornell University 15 Lessons Principle: Latencies can be masked by parallel execution Pipelining: Identify pipeline stages Isolate stages from each other Resolve pipeline hazards

© Kavita Bala, Computer Science, Cornell University 16 A Processor alu PC imm memo ry d in d o ut addr target offset cmp control =? new pc register file inst extend +4

© Kavita Bala, Computer Science, Cornell University 17 Write- Back Memory Instruction Fetch Execute Instruction Decode register file control A Processor alu imm mem ory d in d o ut addr inst PC memo ry compute jump/branch targets new pc +4 extend

© Kavita Bala, Computer Science, Cornell University 18 Basic Pipeline Five stage “RISC” load-store architecture 1.Instruction fetch (IF) –get instruction from memory, increment PC 2.Instruction Decode (ID) –translate opcode into control signals and read registers 3.Execute (EX) –perform ALU operation, compute jump/branch targets 4.Memory (MEM) –access memory if needed 5.Writeback (WB) –update register file Slides thanks to Sally McKee & Kavita Bala

© Kavita Bala, Computer Science, Cornell University 19 Pipelined Implementation Break instructions across multiple clock cycles (five, in this case) Design a separate stage for the execution performed during each clock cycle Add pipeline registers to isolate signals between different stages