Pipeline Processors David Rye :: MTRX3700 Pipelining :: Slide 1 of 15

Similar documents
Chapter 8. Pipelining

Chapter 5 (a) Overview

CPS104 Computer Organization and Programming Lecture 19: Pipelining. Robert Wagner

Computer Architecture. Lecture 6.1: Fundamentals of

Pipeline: Introduction

CS 110 Computer Architecture. Pipelining. Guest Lecture: Shu Yin. School of Information Science and Technology SIST

Module 4c: Pipelining

Pipelining. Maurizio Palesi

Computer Systems Architecture Spring 2016

Outline Marquette University

Lecture 15: Pipelining. Spring 2018 Jason Tang

Page 1. Pipelining: Its Natural! Chapter 3. Pipelining. Pipelined Laundry Start work ASAP. Sequential Laundry A B C D. 6 PM Midnight

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Modern Computer Architecture

CSE 141 Computer Architecture Spring Lectures 11 Exceptions and Introduction to Pipelining. Announcements

CS 61C: Great Ideas in Computer Architecture Control and Pipelining

UNIT 3 - Basic Processing Unit

Pipelining, Instruction Level Parallelism and Memory in Processors. Advanced Topics ICOM 4215 Computer Architecture and Organization Fall 2010

Typical DSP application

ELCT 501: Digital System Design

Lecture 6: Pipelining

MC9211Computer Organization. Unit 4 Lesson 1 Processor Design

Lecture 3. Pipelining. Dr. Soner Onder CS 4431 Michigan Technological University 9/23/2009 1

Working on the Pipeline

Ti Parallel Computing PIPELINING. Michał Roziecki, Tomáš Cipr

Pipelining: Overview. CPSC 252 Computer Organization Ellen Walker, Hiram College

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

CS 3510 Comp&Net Arch

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14

Instruction Pipelining

Instruction Pipelining

CPE Computer Architecture. Appendix A: Pipelining: Basic and Intermediate Concepts

Overview. Appendix A. Pipelining: Its Natural! Sequential Laundry 6 PM Midnight. Pipelined Laundry: Start work ASAP

Orange Coast College. Business Division. Computer Science Department. CS 116- Computer Architecture. Pipelining

EITF20: Computer Architecture Part2.2.1: Pipeline-1

EITF20: Computer Architecture Part2.2.1: Pipeline-1

What is Pipelining? RISC remainder (our assumptions)

Parallelism. Execution Cycle. Dual Bus Simple CPU. Pipelining COMP375 1

Appendix A. Overview

Midnight Laundry. IC220 Set #19: Laundry, Co-dependency, and other Hazards of Modern (Architecture) Life. Return to Chapter 4

Control Hazards - branching causes problems since the pipeline can be filled with the wrong instructions.

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 14 Instruction Level Parallelism and Superscalar Processors

Pipelining and Vector Processing

Processing Unit CS206T

COMPUTER ORGANIZATION AND DESIGN

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

Pipelining. Principles of pipelining Pipeline hazards Remedies. Pre-soak soak soap wash dry wipe. l Chapter 4.4 and 4.5

The Pipelined MIPS Processor

Pipelining, Branch Prediction, Trends

Design and Implementation of a FPGA-based Pipelined Microcontroller

What is Superscalar? CSCI 4717 Computer Architecture. Why the drive toward Superscalar? What is Superscalar? (continued) In class exercise

EITF20: Computer Architecture Part2.2.1: Pipeline-1

UNIT- 5. Chapter 12 Processor Structure and Function

Topics. Lecture 12: Pipelining. Introduction to pipelining. Pipelined datapath. Hazards in pipeline. Performance. Design issues.

What is Pipelining? Time per instruction on unpipelined machine Number of pipe stages

CPU Structure and Function

Chapter 9. Pipelining Design Techniques

William Stallings Computer Organization and Architecture

Multiple Instruction Issue. Superscalars

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Photo David Wright STEVEN R. BAGLEY PIPELINES AND ILP

Chapter 4. The Processor

CPE300: Digital System Architecture and Design

ECE260: Fundamentals of Computer Engineering

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

EE 457 Unit 6a. Basic Pipelining Techniques

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Modern Processors. RISC Architectures

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Advanced Computer Architecture

CPU Structure and Function. Chapter 12, William Stallings Computer Organization and Architecture 7 th Edition

The Big Picture Problem Focus S re r g X r eg A d, M lt2 Sub u, Shi h ft Mac2 M l u t l 1 Mac1 Mac Performance Focus Gate Source Drain BOX

微算機系統第六章. Enhancing Performance with Pipelining 陳伯寧教授電信工程學系國立交通大學. Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold

Processor Architecture

Superscalar Processors Ch 13. Superscalar Processing (5) Computer Organization II 10/10/2001. New dependency for superscalar case? (8) Name dependency

CPE300: Digital System Architecture and Design

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

RISC & Superscalar. COMP 212 Computer Organization & Architecture. COMP 212 Fall Lecture 12. Instruction Pipeline no hazard.

CPU Structure and Function

Lecture 05: Pipelining: Basic/ Intermediate Concepts and Implementation

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome

Chapter 7. Microarchitecture. Copyright 2013 Elsevier Inc. All rights reserved.

Lecture 5: Instruction Pipelining. Pipeline hazards. Sequential execution of an N-stage task: N Task 2

Chapter 12. CPU Structure and Function. Yonsei University

Chapter 9 Pipelining. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Background: Pipelining Basics. Instruction Scheduling. Pipelining Details. Idealized Instruction Data-Path. Last week Register allocation

Pipelining and Vector Processing

Improve performance by increasing instruction throughput

Chapter 06: Instruction Pipelining and Parallel Processing. Lesson 14: Example of the Pipelined CISC and RISC Processors

Pipelining: Basic and Intermediate Concepts

ECEC 355: Pipelining

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome

Lecture 19 Introduction to Pipelining

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 32: Pipeline Parallelism 3

Design a MIPS Processor (2/2)

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Like scalar processor Processes individual data items Item may be single integer or floating point number. - 1 of 15 - Superscalar Architectures

Computer Systems Architecture I. CSE 560M Lecture 10 Prof. Patrick Crowley

More advanced CPUs. August 4, Howard Huang 1

TECH. CH14 Instruction Level Parallelism and Superscalar Processors. What is Superscalar? Why Superscalar? General Superscalar Organization

Transcription:

Pipeline Processors Pipelining :: Slide 1 of 15

Pipeline Processors A common feature of modern processors Works like a series production line An operation is divided into k decoupled (independent) elementary sub-operations A k stage pipeline is formed The pipeline can handle k sets of data simultaneously Pipelining :: Slide 2 of 15

Pipeline Types Instruction Pipeline Different stages of instruction fetch and execution are handled by the pipeline Very common in current processors Arithmetic Pipeline Different stages of an arithmetic operation are handled along the segments of a pipeline Highly specialised digital design - uncommon Pipelining :: Slide 3 of 15

Pipelining Laundry Example (from Dan Conners) Ann, Brian, Cathy, Dave each have one bag of clothes to wash, dry, fold, put away A B C D Washer takes 30 minutes Dryer takes 30 minutes Folder takes 30 minutes Put-away-er takes 30 minutes to put clothes into drawers Pipelining :: Slide 4 of 15

Sequential Laundry 6pm 7 8 9 10 11 12 1 2am O r d e r A B C D 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 Time Sequential laundry takes 8 hours for 4 loads If they used a pipeline, how long would laundry take? Pipelining :: Slide 5 of 15

Pipelined Laundry 6pm 7 8 9 10pm partytime Time O r d e r A B C D 30 30 30 30 30 30 30 Pipelined laundry takes 3.5 hours for 4 loads! Pipelining :: Slide 6 of 15

Pipelining Observations Pipelining doesn t change duration of a single task, but increases throughput Multiple tasks execute simultaneously using different (decoupled) resources Potential speedup = Number of pipeline stages Pipeline rate limited by slowest pipeline stage Unbalanced lengths of pipe stages reduces speedup Time to fill pipeline and time to flush it reduces speedup Pipelining :: Slide 7 of 15

Instruction Pipeline Simple example of a (4-stage) instruction pipeline (this is not a PIC18 ) Cycle i i+1 i+2 i+3 F D E W F D E W F D E W F D E W 0 1 2 3 4 5 6 7 Ensure each segment completes in one CPU cycle Usually possible only for RISC Clock ticks Pipelining :: Slide 8 of 15

PIC18Fxxx Instruction Pipeline Microchip PIC1 8Fxxx Cs have a 2-stage pipeline First stage is Fetch 4 Q cycles, uses instruction bus: Q1: increment PC; Q2: write instruction address; Q3: fetch opcode; Q4: latch instruction Second stage is Execute 4 Q cycles, uses data bus: Cycle varies, but is typically Q1: decode instruction; Q2: fetch operand; Q3: execute; Q4: write result Pentium III has 10-stage pipeline, P4 has 20 stages Pipelining :: Slide 9 of 15

Pipeline Hazards A pipeline hazard is anything that disrupts orderly flow of data through the pipeline Structural Hazards Data Hazards Control Hazards Pipelining :: Slide 10 of 15

Structural Hazards Occur when more than one segment of the pipeline needs access to the same hardware resource This is a failure of hardware design modularity e.g. pipeline segments fetching opcode and operand simultaneously both need to use the memory access register May be alleviated by duplication of resources Harvard architecture Pipelining :: Slide 11 of 15

Data Hazards When the structure of the program causes a pipeline segment to access data before it has been updated by a prior segment Generally, where an instruction depends on the result of a prior instruction that is still in the pipeline Find out about a real example Can be eliminated by Inserting some (wasted) cycles of stall to allow the data to be refreshed Adding specialised hardware for passing a result directly back to the ALU input without storage in the register file Pipelining :: Slide 12 of 15

Control Hazards When a jump or branch instruction is encountered, subsequent (fetched) instructions must be flushed from the pipeline since they don t need to execute Can be minimised by Detecting the branch early in the pipeline Getting the target address into the PC as early as possible Attempting to predict the branch target Using a branch target cache containing first instructions of both possible branches Pipelining :: Slide 13 of 15

Superscalar Design Number of instructions issued simultaneously for execution e.g. many modern processors are twoissue superscalar (dual pipelines) Instruction cache loads the prefetch unit. Prefetch unit issues i instructions at a time and forwards them to decoder Dispatch unit generates activation commands for a number of pipelined segments (multiple execution units) Often used to avoid pipeline hazards by Branch prediction Speculative execution (executing both branches) Pipelining :: Slide 14 of 15

For Interest 25 Microchips that Shook the World http://spectrum.ieee.org/static/25chips References Hayes, JP. Computer Architecture and Organization. McGraw- Hill, 3 ed., 1998. Tabak, D. Advanced Microprocessors. McGraw-Hill, 2 ed., 1995. Pipelining :: Slide 15 of 15