Lecture: Pipelining Basics

Slides:



Advertisements
Similar presentations
1 ITCS 3181 Logic and Computer Systems B. Wilkinson Slides9.ppt Modification date: March 30, 2015 Processor Design.
Advertisements

Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
Pipelining I (1) Fall 2005 Lecture 18: Pipelining I.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
Lecture: Pipelining Basics
1 Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations.
1 Lecture: Pipeline Wrap-Up and Static ILP Topics: multi-cycle instructions, precise exceptions, deep pipelines, compiler scheduling, loop unrolling, software.
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.
1 Lecture 3: Pipelining Basics Biggest contributors to performance: clock speed, parallelism Today: basic pipelining implementation (Sections A.1-A.3)
CSCE 212 Quiz 4 – 2/16/11 *Assume computes take 1 clock cycle, loads and stores take 10 cycles and branches take 4 cycles and that they are running on.
1 Lecture 2: System Metrics and Pipelining Today’s topics: (Sections 1.6, 1.7, 1.9, A.1)  Quantitative principles of computer design  Measuring cost.
©UCB CS 162 Computer Architecture Lecture 3: Pipelining Contd. Instructor: L.N. Bhuyan
1 Lecture 8: Instruction Fetch, ILP Limits Today: advanced branch prediction, limits of ILP (Sections , )
DLX Instruction Format
Lecture 16: Basic CPU Design
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Appendix A Pipelining: Basic and Intermediate Concepts
Lecture: Pipelining Basics
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.
Lecture 24: CPU Design Today’s topic –Multi-Cycle ALU –Introduction to Pipelining 1.
CSC 4250 Computer Architectures September 15, 2006 Appendix A. Pipelining.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Pipeline Hazards. CS5513 Fall Pipeline Hazards Situations that prevent the next instructions in the instruction stream from executing during its.
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.
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Lecture 16: Basic Pipelining
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
1 Lecture 3: Pipelining Basics Today: chapter 1 wrap-up, basic pipelining implementation (Sections C.1 - C.4) Reminders:  Sign up for the class mailing.
1 Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations.
Advanced Computer Architecture CS 704 Advanced Computer Architecture Lecture 10 Computer Hardware Design (Pipeline Datapath and Control Design) Prof. Dr.
1 Lecture 20: OOO, Memory Hierarchy Today’s topics:  Out-of-order execution  Cache basics.
1 Lecture: Pipeline Wrap-Up and Static ILP Topics: multi-cycle instructions, precise exceptions, deep pipelines, compiler scheduling, loop unrolling, software.
Lecture 18: Pipelining I.
Lecture 15: Basic CPU Design
Lecture 16: Basic Pipelining
CMSC 611: Advanced Computer Architecture
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards
Morgan Kaufmann Publishers
Lecture: Pipelining Extensions
Lecture: Out-of-order Processors
Lecture: Pipelining Basics
Lecture 16: Basic Pipelining
Lecture 19: Branches, OOO Today’s topics: Instruction scheduling
Lecture: Pipelining Hazards
Lecture: Static ILP Topics: compiler scheduling, loop unrolling, software pipelining (Sections C.5, 3.2)
Lecture 5: Pipelining Basics
Serial versus Pipelined Execution
Lecture 18: Pipelining Today’s topics:
Lecture: Pipelining Hazards
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards.
Lecture: Static ILP Topics: loop unrolling, software pipelines (Sections C.5, 3.2) HW3 posted, due in a week.
Lecture 19: Branches, OOO Today’s topics: Instruction scheduling
An Introduction to pipelining
Lecture: Pipelining Extensions
Lecture 20: OOO, Memory Hierarchy
Lecture: Pipelining Extensions
Lecture 20: OOO, Memory Hierarchy
Lecture 18: Pipelining Today’s topics:
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards.
Lecture 4: Advanced Pipelines
Pipelining: critical path, pipeline hazards Prof. Eric Rotenberg
Pipelining Appendix A and Chapter 3.
Lecture 10: ILP Innovations
Seoul National University
Lecture: Pipelining Basics
Single Cycle MIPS Implementation
Presentation transcript:

Lecture: Pipelining Basics Topics: Basic pipelining implementation

Clocks and Latches Stage 1 Stage 2

Clocks and Latches Stage 1 L Stage 2 L Clk

Some Equations Unpipelined: time to execute one instruction = T + Tovh For an N-stage pipeline, time per stage = T/N + Tovh Total time per instruction = N (T/N + Tovh) = T + N Tovh Clock cycle time = T/N + Tovh Clock speed = 1 / (T/N + Tovh) Ideal speedup = (T + Tovh) / (T/N + Tovh) Cycles to complete one instruction = N Average CPI (cycles per instr) = 1

Problem 1 An unpipelined processor takes 5 ns to work on one instruction. It then takes 0.2 ns to latch its results into latches. I was able to convert the circuits into 5 equal sequential pipeline stages. Answer the following, assuming that there are no stalls in the pipeline. What are the cycle times in the two processors? What are the clock speeds? What are the IPCs? How long does it take to finish one instr? What is the speedup from pipelining?

Problem 1 An unpipelined processor takes 5 ns to work on one instruction. It then takes 0.2 ns to latch its results into latches. I was able to convert the circuits into 5 equal sequential pipeline stages. Answer the following, assuming that there are no stalls in the pipeline. What are the cycle times in the two processors? 5.2ns and 1.2ns What are the clock speeds? 192 MHz and 833 MHz What are the IPCs? 1 and 1 How long does it take to finish one instr? 5.2ns and 6ns What is the speedup from pipelining? 833/192 = 4.34

Problem 2 An unpipelined processor takes 5 ns to work on one instruction. It then takes 0.2 ns to latch its results into latches. I was able to convert the circuits into 5 sequential pipeline stages. The stages have the following lengths: 1ns; 0.6ns; 1.2ns; 1.4ns; 0.8ns. Answer the following, assuming that there are no stalls in the pipeline. What is the cycle time in the new processor? What is the clock speed? What is the IPC? How long does it take to finish one instr? What is the speedup from pipelining? What is the max speedup from pipelining?

Problem 2 An unpipelined processor takes 5 ns to work on one instruction. It then takes 0.2 ns to latch its results into latches. I was able to convert the circuits into 5 sequential pipeline stages. The stages have the following lengths: 1ns; 0.6ns; 1.2ns; 1.4ns; 0.8ns. Answer the following, assuming that there are no stalls in the pipeline. What is the cycle time in the new processor? 1.6ns What is the clock speed? 625 MHz What is the IPC? 1 How long does it take to finish one instr? 8ns What is the speedup from pipelining? 625/192 = 3.26 What is the max speedup from pipelining? 5.2/0.2 = 26

A 5-Stage Pipeline Source: H&P textbook

A 5-Stage Pipeline Use the PC to access the I-cache and increment PC by 4

A 5-Stage Pipeline Read registers, compare registers, compute branch target; for now, assume branches take 2 cyc (there is enough work that branches can easily take more)

A 5-Stage Pipeline ALU computation, effective address computation for load/store

A 5-Stage Pipeline Memory access to/from data cache, stores finish in 4 cycles

A 5-Stage Pipeline Write result of ALU computation or load into register file

RISC/CISC Loads/Stores Registers and memory Complex and reduced instrs Format of a load/store

Title Bullet