Computer Architecture

Slides:



Advertisements
Similar presentations
1 Lecture 5: Static ILP Basics Topics: loop unrolling, VLIW (Sections 2.1 – 2.2)
Advertisements

CS 6461: Computer Architecture Basic Compiler Techniques for Exposing ILP Instructor: Morris Lancaster Corresponding to Hennessey and Patterson Fifth Edition.
Advanced Pipelining Optimally Scheduling Code Optimally Programming Code Scheduling for Superscalars (6.9) Exceptions (5.6, 6.8)
Pipeline Optimization
Dynamic Branch PredictionCS510 Computer ArchitecturesLecture Lecture 10 Dynamic Branch Prediction, Superscalar, VLIW, and Software Pipelining.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
ELEN 468 Advanced Logic Design
1 Lecture 10: Static ILP Basics Topics: loop unrolling, static branch prediction, VLIW (Sections 4.1 – 4.4)
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2013 Zhao Zhang Iowa State University Revised from original.
CPE432 Chapter 4C.1Dr. W. Abu-Sufah, UJ Chapter 4C: The Processor, Part C Read Section 4.10 Parallelism and Advanced Instruction-Level Parallelism Adapted.
Instruction Level Parallelism Chapter 4: CS465. Instruction-Level Parallelism (ILP) Pipelining: executing multiple instructions in parallel To increase.
Chapter 4 CSF 2009 The processor: Instruction-Level Parallelism.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Pipelined Processor.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 19 - Pipelined.
1  1998 Morgan Kaufmann Publishers Chapter Six Enhancing Performance with Pipelining.
Instruction Level Parallelism (ILP) Colin Stevens.
1  2004 Morgan Kaufmann Publishers Chapter Six. 2  2004 Morgan Kaufmann Publishers Pipelining The laundry analogy.
1 Chapter Six - 2nd Half Pipelined Processor Forwarding, Hazards, Branching EE3055 Web:
Chapter 2 Instruction-Level Parallelism and Its Exploitation
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 3.
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Computer Organization Lecture Set – 06 Chapter 6 Huei-Yung Lin.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
1  1998 Morgan Kaufmann Publishers Chapter Six Enhancing Performance with Pipelining.
1  1998 Morgan Kaufmann Publishers Chapter Six. 2  1998 Morgan Kaufmann Publishers Pipelining Improve performance by increasing instruction throughput.
Multiple Issue Processors: Superscalar and VLIW
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
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.
Instruction Level Parallelism Pipeline with data forwarding and accelerated branch Loop Unrolling Multiple Issue -- Multiple functional Units Static vs.
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.
Chapter 6 Pipelined CPU Design. Spring 2005 ELEC 5200/6200 From Patterson/Hennessey Slides Pipelined operation – laundry analogy Text Fig. 6.1.
5/13/99 Ashish Sabharwal1 Pipelining and Hazards n Hazards occur because –Don’t have enough resources (ALU’s, memory,…) Structural Hazard –Need a value.
1  1998 Morgan Kaufmann Publishers Chapter Six. 2  1998 Morgan Kaufmann Publishers Pipelining Improve perfomance by increasing instruction throughput.
PROCESSOR PIPELINING YASSER MOHAMMAD. SINGLE DATAPATH DESIGN.
LECTURE 10 Pipelining: Advanced ILP. EXCEPTIONS An exception, or interrupt, is an event other than regular transfers of control (branches, jumps, calls,
Csci 136 Computer Architecture II – Superscalar and Dynamic Pipelining Xiuzhen Cheng
Use of Pipelining to Achieve CPI < 1
Chapter Six.
CS 352H: Computer Systems Architecture
Exceptions Another form of control hazard Could be caused by…
Computer Organization CS224
CS2100 Computer Organization
Morgan Kaufmann Publishers
ELEN 468 Advanced Logic Design
Basic Pipeline Datapath
Pipeline Architecture since 1985
Single Clock Datapath With Control
ECE232: Hardware Organization and Design
Design of the Control Unit for Single-Cycle Instruction Execution
Pipelining: Advanced ILP
Chapter 4 The Processor Part 6
Vishwani D. Agrawal James J. Danaher Professor
Pipelining review.
The processor: Pipelining and Branching
Design of the Control Unit for One-cycle Instruction Execution
Lecture 9. MIPS Processor Design – Pipelined Processor Design #2
CSCI206 - Computer Organization & Programming
Systems Architecture II
Data Hazards Data Hazard
Chapter Six.
Chapter Six.
Instruction Level Parallelism (ILP)
Vishwani D. Agrawal James J. Danaher Professor
Pipelining: Basic Concepts
CS 286 Computer Architecture & Organization
CSC3050 – Computer Architecture
Systems Architecture II
MIPS Pipelined Datapath
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,
Presentation transcript:

Computer Architecture Exception Handling and Advanced Pipelining

Datapath with Controls to Handle Exceptions

Exception Handling Example overflow exception

Exception Handling Example start of exception handling routine

Advanced Pipelining Superpipelining Superscalar Dynamic Pipeline Scheduling

Superpipelining IF-1 ID EX-1 EX-2 MEM WB IF-1 ID EX-1 EX-2 MEM WB IF-1

Superscalar IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB IF ID EX ALU or Branch Load or Store IF ID EX MEM WB ALU or Branch Load or Store IF ID EX MEM WB ALU or Branch Load or Store IF ID EX MEM WB ALU or Branch Load or Store IF ID EX MEM WB

Superscalar Pipeline

Simple Superscalar Code Scheduling Loop: lw $t0, 0($s1) # $t0=array element addu $t0, $t0, $s2 # add scalar in $s2 sw $t0, 0($s1) # store result addi $s1, $s1, -4 # decrement pointer bne $s1, $zero, Loop # branch $s1!=0

Scheduled Code

Loop Unrolling

Dynamic Pipeline Scheduling Example: Power PC 604, Pentium Pro, Alpha 21264, MIPS R10000

Dynamic Pipeline Scheduling Overcome key performance limitations of in-order pipeline instruction execution Structural hazard Replicate pipelines Data hazard Execute instructions out of program order Rename registers as needed Control hazard Execute instructions speculatively across branches

Dynamic Branch Prediction One-bit prediction scheme not-taken taken not-taken predict not-taken predict taken taken Problem : Loop case

Dynamic Branch Prediction Two-bit prediction scheme taken not-taken predict taken predict taken taken not-taken taken not-taken predict not-taken predict not-taken taken not-taken

Summary Three major handles in pipelined implementation Structural hazard Data hazard Control hazard Advanced pipelining Superpipelining (clock cycle time ↓) Superscalar (CPI ↓, possibly < 1) Dynamic pipeline scheduling Structural hazard: resource replication Data Hazard: out-of-order execution Register renaming Control Hazard: speculative execution