Download presentation
Presentation is loading. Please wait.
1
Computer Architecture
Exception Handling and Advanced Pipelining
2
Datapath with Controls to Handle Exceptions
3
Exception Handling Example
overflow exception
4
Exception Handling Example
start of exception handling routine
5
Advanced Pipelining Superpipelining Superscalar
Dynamic Pipeline Scheduling
6
Superpipelining IF-1 ID EX-1 EX-2 MEM WB IF-1 ID EX-1 EX-2 MEM WB IF-1
7
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
8
Superscalar Pipeline
9
Simple Superscalar Code Scheduling
Loop: lw $t0, 0($s1) # $t0=array element addu $t0, $t0, $s # add scalar in $s2 sw $t0, 0($s1) # store result addi $s1, $s1, # decrement pointer bne $s1, $zero, Loop # branch $s1!=0
10
Scheduled Code
11
Loop Unrolling
12
Dynamic Pipeline Scheduling
Example: Power PC 604, Pentium Pro, Alpha 21264, MIPS R10000
13
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
14
Dynamic Branch Prediction
One-bit prediction scheme not-taken taken not-taken predict not-taken predict taken taken Problem : Loop case
15
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
16
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.