Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.

Slides:



Advertisements
Similar presentations
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Advertisements

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
Chapter Six 1.
Instruction-Level Parallelism (ILP)
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.
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
Chapter Six Enhancing Performance with Pipelining
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
Computer ArchitectureFall 2007 © October 24nd, 2007 Majd F. Sakr CS-447– 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?
DLX Instruction Format
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
Appendix A Pipelining: Basic and Intermediate Concepts
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.
Pipelining Basics Assembly line concept An instruction is executed in multiple steps Multiple instructions overlap in execution A step in a pipeline is.
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.
-1.1- PIPELINING 2 nd week. -2- Khoa Coâng Ngheä Thoâng Tin – Ñaïi Hoïc Baùch Khoa Tp.HCM PIPELINING 2 nd week References Pipelining concepts The DLX.
Pipeline Hazard CT101 – Computing Systems. Content Introduction to pipeline hazard Structural Hazard Data Hazard Control Hazard.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
1 Appendix A Pipeline implementation Pipeline hazards, detection and forwarding Multiple-cycle operations MIPS R4000 CDA5155 Spring, 2007, Peir / University.
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.
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.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2012 Revised from original slides provided by MKP.
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.
CMPE 421 Parallel Computer Architecture
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.
Electrical and Computer Engineering University of Cyprus LAB3: IMPROVING MIPS PERFORMANCE WITH PIPELINING.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
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.
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.
Simulator Outline of MIPS Simulator project  Write a simulator for the MIPS five-stage pipeline that does the following: Implements a subset of.
Computer Organization
CDA3101 Recitation Section 8
Pipelining: Hazards Ver. Jan 14, 2014
CSCI206 - Computer Organization & Programming
Single Clock Datapath With Control
Pipeline Implementation (4.6)
Appendix C Pipeline implementation
ECE232: Hardware Organization and Design
CDA 3101 Spring 2016 Introduction to Computer Organization
\course\cpeg323-08F\Topic6b-323
Processor Pipelining Yasser Mohammad.
Lecture 5: Pipelining Basics
CSC 4250 Computer Architectures
Systems Architecture II
CSCI206 - Computer Organization & Programming
\course\cpeg323-05F\Topic6b-323
Data Hazards Data Hazard
Pipeline control unit (highly abstracted)
Instruction Execution Cycle
Pipeline control unit (highly abstracted)
Pipelining: Basic Concepts
Lecture 4: Advanced Pipelines
Pipeline Control unit (highly abstracted)
Reducing pipeline hazards – three techniques
Pipelining.
ARM ORGANISATION.
Morgan Kaufmann Publishers The Processor
Introduction to Computer Organization and Architecture
Throughput = #instructions per unit time (seconds/cycles etc.)
Guest Lecturer: Justin Hsia
Pipelining Hazards.
Presentation transcript:

Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors Impact of compilers

Appendix A, Chapters Three and Four Pipelining

Introduction “Assembly line” execution Multiple pipe stages (or pipe segments) Ideally: Or:

Introduction (cont.) There are overheads due to the pipeline Three views: –Reducing CPI –Reducing clock cycle time –A combination Major advantage: Invisible to programmers

Implementation of MIPS Without pipelining: –Five clock cycles: Instruction fetch (IF) Instruction decode/register fetch/branch resolution (ID) Execution/Effective address calc. (EX) Memory access (MEM) Write-back (WB) –Branch requires two cycles, store requires four cycles –CPI: 4.54

The Basic Pipeline for MIPS Each cycle becomes a pipe stage Need to ensure hardware is not used in more than one stage –E.g. ALU for PC incrementing –Register accesses Can use half cycles –Memory accesses Can use separate caches

Basic Pipeline Branches become problematic –IF is first stage –Branch resolved in ID (2 nd ) stage Registers required between stages –Pipeline registers (or pipeline latches) –Carry data and control signals

Performance Pipeline runs at speed of slowest stage Overheads due to: –Pipeline registers –Clock skew

A.2. Pipeline Hazards Prevent execution of next instruction Three classes: –Structural hazards Hardware contention –Data hazards Data dependencies –Control hazards PC-changing instructions

Pipeline Hazards May need to stall the pipeline Performance impact (simplified):

Structural Hazards Resource contention E.g. one memory port –IF stalls when there is a data-memory access Introduces a pipeline bubble

Why Allow Structural Hazards? Expense Reduced latency –Simple, non-pipelined unit may run faster –E.g. FP units

Data Hazards Dependent instructions add %g1, %g2, %g3 sub %l1, %g3, %o0 Result available in WB, needed in ID Non-deterministic!

Data Hazards Problem may span several cycles add %l0, %i0, %g3 sub %l1, %g3, %o0 ! Problem and %l2, %g3, %o1 ! Problem or %l3, %g3, %o2 xor %l4, %g3, %o3 ! OK

Minimising Impact of Data Hazards Simple hardware technique: forwarding (or bypassing, or short-circuiting) Feed ALU output back as an ALU input –Hardware detects hazard –Ignores fetched register value –Selects forwarded result

Forwarding Need to include all functional units add %g1, %g2, %g3 sw %g3, [%fp-12]

Data Hazards Requiring Stalls Cannot prevent all stalls lw [%fp-12], %g3 add %g3, %l0, %l1 A pipeline interlock detects the hazard and stalls the pipeline MIPS: 1 clock cycle

What is the impact? Assume 30% of instructions are loads; 50% of these are followed by a dependent instruction; the ideal CPI is 1.