SlideShare a Scribd company logo
ECE 4100/6100
Advanced Computer Architecture
Lecture 5 Branch Prediction
Prof. Hsien-Hsin Sean Lee
School of Electrical and Computer Engineering
Georgia Institute of Technology
2
Predict What?
• Direction (1-bit)
– Single direction for unconditional jumps and calls/returns
– Binary for conditional branches
• Target (32-bit or 64-bit addresses)
– Some are easy
• One: Uni-directional jumps
• Two: Fall through (Not Taken) vs. Taken
– Many: Function Pointer or Indirect Jump (e.g. jr r31)
3
Categorizing Branches
8%
10%
82%
19%
6%
75%
0% 20% 40% 60% 80% 100%
Call/Return
Jump
Conditional
Branch
Frequency of branch instructions
SPEC2000INT
SPEC2000FP
Source: H&P using Alpha
4
Branch Misprediction
PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Single Issue
5
Branch Misprediction
PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Single Issue
Mispredict
6
Branch Misprediction
PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Single Issue (flush entailed instructions and refetch)
Mispredict
7
Branch Misprediction
PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Single Issue
Fetch the correct path
8
Branch Misprediction
PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Single Issue
Mispredict
8-issue Superscalar Processor (Worst case)
9
Why Branch is Predictable?
for (i=0; i<100; i++) {
….
}
addi r10, r0, 100
add r1, r0, r0
L1:
… …
… …
addi r1, r1, 1
bne r1, r10, L1
… …
if (aa==2)
aa = 0;
if (bb==2)
bb = 0;
if (aa!=bb)
….
addi r2, r0, 2
bne r10, r2, L_bb
xor r10, r10, r10
L_bb:
bne r11, r2, L_xx
xor r11, r11, r11
L_xx:
beq r10, r11, L_exit
…
Lexit:
10
Control Speculation
• Execute instruction beyond a branch before
the branch is resolved  Performance
• Speculative execution
• What if mis-speculated? need
– Recovery mechanism
– Squash instructions on the incorrect path
• Branch prediction: Dynamic vs. Static
• What to predict?
11
Static Branch Prediction
• Uni-directional, always predict taken (or not
taken)
• Backward taken, Forward not taken
– Need offset information (when?)
• Compiler hints with branch annotation
– When the info will be available? Post-decode?
12
Simplest Dynamic Branch Predictor
• Prediction based on latest outcome
• Index by some bits in the branch PC
– Aliasing
T
NT
T
T
NT
NT
.
.
.
for (i=0; i<100; i++) {
….
}
addi r10, r0, 100
addi r1, r1, r0
L1:
… …
… …
addi r1, r1, 1
bne r1, r10, L1
… …
0x40010100
0x40010104
0x40010108
…
0x40010A04
0x40010A08
How accurate?
NT
T
1-bit
Branch
History
Table
13
Typical Table Organization
Hash
PC (32 bits)
.
.
.
.
.
2N
entries
Prediction
N bits
FSM
Update
Logic
table update
Actual outcome
14
Simplest Dynamic Branch Predictor
T
NT
T
T
NT
NT
.
.
.
addi r10, r0, 100
addi r1, r1, r0
L1:
add r21, r20, r1
lw r2, (r21)
beq r2, r0, L2
… …
j L3
L2:
… … …
L3:
addi r1, r1, 1
bne r1, r10, L1
0x40010100
0x40010104
0x40010108
0x4001010c
0x40010110
0x40010210
0x40010B0c
0x40010B10
for (i=0; i<100; i++) {
if (a[i] == 0) {
…
}
…
}
NT
T
1-bit
Branch
History
Table
15
FSM of the Simplest Predictor
• A 2-state machine
• Change mind fast
00 11
If branch not taken
If branch taken
00
11
Predict not taken
Predict taken
16
Example using 1-bit branch history table
for (i=0; i<44; i++) {
….
}
00Pred
Actual T T
√
11 11
√
T T
√
11 11
addi r10, r0, 4
addi r1, r1, r0
L1:
… …
addi r1, r1, 1
bne r1, r10, L1
NT
00
 
T
11

T
√
11
√
T T
√
11 11
NT
00

T
11

60% accuracy
17
2-bit Saturating Up/Down Counter Predictor
Not Taken
Taken
Predict Not taken
Predict taken
ST: Strongly Taken
WT: Weakly Taken
WN: Weakly Not Taken
SN: Strongly Not Taken
01/
WN
01/
WN
00/
SN
00/
SN
10/
WT
10/
WT
11/
ST
11/
ST
MSB: Direction bit
LSB: Hysteresis bit
18
2-bit Counter Predictor (Another Scheme)
Not Taken
Taken
Predict Not taken
Predict taken
ST: Strongly Taken
WT: Weakly Taken
WN: Weakly Not Taken
SN: Strongly Not Taken
01/
WN
01/
WN
00/
SN
00/
SN
11/
ST
11/
ST
10/
WT
10/
WT
19
Example using 2-bit up/down counter
for (i=0; i<44; i++) {
….
}
0101Pred
Actual T T
√
1010 1111
√
T T
√
1111 1111
addi r10, r0, 4
addi r1, r1, r0
L1:
… …
addi r1, r1, 1
bne r1, r10, L1
NT
1010
 
T
1111
√
T
√
1111
√
T T
√
1111 1111
NT
1010

T
1111
√
80% accuracy
20
Branch Correlation
• Branch direction
– Not independent
– Correlated to the path taken
• Example: Path 1-1 of b3 can be surely known beforehand
• Track path using a 2-bit register
if (aa==2) // b1
aa = 0;
if (bb==2) // b2
bb = 0;
if (aa!=bb) { // b3
…….
}
b1
b2 b2
b3 b3 b3
1 (T)
1 1
0 (NT)
0
b3
0
Path: A:1-1 B:1-0 C:0-1 D:0-0
aa=0
bb=0
aa=0
bb≠2
aa≠2
bb=0
aa≠2
bb≠2
Code Snippet
21
Correlated Branch Predictor [PanSoRahmeh’92]
• (M,N) correlation scheme
– M: shift register size (# bits)
– N: N-bit counter
2-bit
counter
hash .
.
.
.
X X
Branch PC
hash
2-bit
counter
.
.
.
.
2-bit
counter
.
.
.
.
X X
2-bit
counter
.
.
.
.
2-bit
counter
.
.
.
.
Prediction Prediction
2-bit shift register
(global branch history)
select
Subsequent
branch
direction
(2,2) Correlation Scheme
2-bit Sat. Counter Scheme
2w
w
Branch PC
22
Two-Level Branch Predictor [YehPatt91,92,93]
• Generalized correlated branch predictor
• 1st
level keeps branch history in Branch History Register (BHR)
• 2nd
level segregates pattern history in Pattern History Table (PHT)
1 1 . . . . . 1 0
00…..00
00…..01
00…..10
11…..11
11…..10
Branch History Pattern
Pattern History Table (PHT)
Prediction
Rc-k Rc-1
Rc: Actual Branch Outcome
FSM
Update
Logic
Branch History Register (BHR)
(Shift left when update)
N
2N
entries
Current StatePHT update
23
Branch History Register
• An N-bit Shift Register = 2N
patterns in PHT
• Shift-in branch outcomes
– 1 ⇒ taken
– 0 ⇒ not taken
• First-in First-Out
• BHR can be
– Global
– Per-set
– Local (Per-address)
24
Pattern History Table
• 2N
entries addressed by N-bit BHR
• Each entry keeps a countercounter (2-bit or more) for
prediction
– Counter update: the same as 2-bit counter
– Can be initialized in alternate patterns (01, 10,
01, 10, ..)
• Alias (or interference) problem
25
Global History Schemes
Global
BHR
Global
PHT
GAg
Global
BHR
..
SetP(B) Per-set
PHTs
(SPHTs)
GAs
Global
BHR
..
Addr(B) Per-addr
PHTs
(PPHTs)
GAp
** [PanSoRahmeh’92] similar to GAp
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Set can be determined by branch
opcode, compiler classification,
or branch PC address.
26
GAs Two-Level Branch Prediction
01100110
BHR
PC = 0x4001000C
.
.
.
PHT
00110110
.
.
00110110
00110111
11111101
11111110
00000000
00000001
00000010
11111111
10
MSB = 1
Predict Taken
The 2 LSBs are insignificant for
32-bit instruction
27
Predictor Update (Actually, Not Taken)
01100110
BHR
PC = 0x4001000C
.
.
.
PHT
00110110
.
.
00110110
00110111
11111101
11111110
00000000
00000001
00000010
11111111
1001 decremented
11001100
00111100
00111100
Wrong
Predictio
n
• Update Predictor after branch is resolved
28
Per-Address History Schemes
Global
PHT
PAg
SetP(B) Per-set
PHTs
(SPHTs)
PAs
Addr(B) Per-addr
PHTs
(PPHTs)
PAp
.
.
.
Addr(B)
Per-addr
BHT (PBHT)
.
.
.
Addr(B)
Per-addr
BHT (PBHT)
.
.
.
Addr(B)
Per-set
BHT (PBHT)
•Ex: P6, Itanium
•Ex: Alpha 21264’s
local predictor
.
.
.
..
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
29
PAs Two-Level Branch Predictor
PC = 1110 0000 1001 1001 0010 1100 1110 1000
000
001
010
011
100
101
110
111
BHT
11010110
.
.
.
PHT
.
.
11010101
11010110
11111101
11111110
00000000
00000001
00000010
11111111
MSB = 1
Predict
Taken
11
110
30
Per-Set History Schemes
Global
PHT
SAg
SetP(B) Per-set
PHTs
(SPHTs)
SAs
Addr(B) Per-addr
PHTs
(PPHTs)
SAp
.
.
.
Per-set
BHT (SBHT)
.
.
.
SetH(B)
Per-set
BHT (SBHT)
.
.
.
SetH(B)
Per-set
BHT (SBHT)
..
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
SetH(B)
31
PHT Indexing
Branch addr
Global
history
Gselect
4/4
00000000 00000001 00000001
00000000 00000000 00000000
11111111 00000000 11110000
11111111 10000000 11110000
Insufficient
History
• Tradeoff between more history bits and address bits
• Too many bits needed in Gselect ⇒ sparse table entries
32
Gshare Branch Predictor [McFarling93]
• Tradeoff between more history bits and address bits
• Too many bits needed in Gselect ⇒ sparse table entries
• Gshare ⇒ Not to lose global history bits
• Ex: AMD Athlon, MIPS R12000, Sun MAJC, Broadcom SiByte’s SB-1
Branch addr
Global
history
Gselect
4/4
Gshare
8/8
00000000 00000001 00000001 00000001
00000000 00000000 00000000 00000000
11111111 00000000 11110000 11111111
11111111 10000000 11110000 01111111
GselectGselect 4/4: Index PHT by concatenateconcatenate low order 4 bits
GshareGshare 8/8: Index PHT by {Branch address ⊕ Global history}
33
Gshare Branch Predictor
.
.
.
PHT
.
.
00
MSB = 0
Predict Not Taken
1 1 . . . . . 1 0
0 1 . . . . . 0 1 0 01. . . . .1 1
⊕
PC Address
Global BHR
34
Aliasing Example
PHT
BHR 1101
PC 0110
----
XOR 1011
BHR 1001
PC 1010
----
XOR 0011
1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000
PHT (indexed by 10)
BHR 1101
PC 0110
----
|| 1001
BHR 1001
PC 1010
----
|| 1001
1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000
GApGAp GshareGshare
35
Hybrid Branch Predictor [McFarling93]
• Some branches correlated to global history, some correlated to local
history
• Only update the meta-predictor when 2 predictors disagree
P0P0 P1P1
.
.
.
Choice (or Meta)
Predictor
Branch PC
Final Prediction
36
Alpha 21264 (EV6) Hybrid Predictor
Local
History
Table
1024 x
10 bits
Single
Local
Predictor
1024 x
3 bits
Global
Predictor
4096 x
2 bits
Choice
Predictor
4096 x
2 bits
Global history
12
Local
prediction
Global
prediction Meta
prediction
Next
Line/set
Prediction
L1 I-cache
(64KB 2w)
&
TLB
4 instr./cycle4 instr./cycle
Virtual address
Final Branch Prediction
PCPC
10
• A “tournament branch
predictor”
• Multi-predictor scheme w/
– Local predictorLocal predictor (~PAg)
• Self-correlation
– Global predictorGlobal predictor
• Inter-correlation
– Choice predictorChoice predictor as the
decision maker: a 2-bit
sat. counter to credit either
local or global predictors.
• Die size impact
– History info tables ~2%
– BTB ~ 2.7% (associated
with I-$ on a per-line basis)
• 2 cycle latency, we will discuss
more later
For Single-cycle
Prediction
37
Alpha EV8 Branch Predictor
Branch PC Global history
F1 F2 F3
majority vote
prediction
G0 G1 Meta
F4
Bimodal
e-gskew
predictor
• Real silicon never sees the daylight
• Use a 2Bc-gskew predictor (one form of enhanced gskew)
– Bimodal predictor used as (1) static biased predictor and (2) part of e-gskew predictor
– Global predictors G0 and G1 are part of e-gskew predictor
– Table sizes: 352Kbits in total (208Kbits for prediction table; 144Kbits for hysteresis table.)
38
Branch Target Prediction
• Try the easy ones first
– Direct jumps
– Call/Return
– Conditional branch (bi-directional)
• Branch Target Buffer (BTB)
• Return Address Stack (RAS)
39
Branch Target Buffer (BTB)
TargetTag TargetTag TargetTag…
BTBBranch PC
== == ==…
++
4
Branch
Target
Predicted
Branch
Direction
0
1
40
Return Address Stack (RAS)
• Different call sites make return address hard
to predict
– Printf() being called by many callers
– The target of “return” instruction in printf() is a
moving target
• A hardware stack (LIFO)
– Call will push return address on the stack
– Return uses the prediction off of TOS
41
Return Address Stack
• Does it always work?
– Call depth
– Setjmp/Longjmp
– Speculative call?
++
4
Call PC
Push
Return
Address
BTBBTB
Return PC
BTBBTB
Return?
• May not know it is a return instruction
prior to decoding
– Rely on BTB for speculation
– Fix once recognize Return
42
Indirect Jump
• Need Target Prediction
– Many (potentially 230
for 32-bit machine)
– In reality, not so many
– Similar to predicting values
• Tagless Target Prediction
• Tagged Target Prediction
43
Tagless Target Prediction [ChangHaoPatt’97]
1 1 . . . . . 1 0
Branch History RegisterBranch History Register
(BHR)(BHR)
00…..00
00…..01
00…..10
11…..11
11…..10
PC ⊗ BHR Pattern
Target Cache (2N
entries)
Predicted Target
Address
Branch PCBranch PC
HashHash
• Modify the PHT to be a “Target Cache”
– (indirect jump) ? (from target cache) : (from BTB)
• Alias?
44
Tagged Target Prediction [ChangHaoPatt’97]
• To reduce aliasing with set-associative target cache
• Use branch PC and/or history for tags
1 1 . . . . . 1 0
BHR
00…..00
00…..01
00…..10
11…..11
11…..10
Target Cache (2n
entries per way)
Predicted Target
Address
Branch PC
Hash
n
=?
Tag Array
45
Multiple Branch Prediction
• For a really wide machine
– Across several basic blocks
– Need to predict multiple branches per cycle
• How to fetch non-contiguous instructions in one
cycle?
• Prediction accuracy extremely critical (will be
reduced geometrically)

More Related Content

What's hot

The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
George Thomas
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
Quine mccluskey method
Quine mccluskey methodQuine mccluskey method
Quine mccluskey method
Kanmani R
 
itft-Clock generator
itft-Clock generatoritft-Clock generator
itft-Clock generator
Shifali Sharma
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
Dr.YNM
 
Lpc2148 i2c
Lpc2148 i2cLpc2148 i2c
Lpc2148 i2c
anishgoel
 
Microprocessor and Microcontroller Lab Manual!
Microprocessor and Microcontroller Lab Manual!Microprocessor and Microcontroller Lab Manual!
Microprocessor and Microcontroller Lab Manual!
PRABHAHARAN429
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecture
komal mistry
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
Abu Zaman
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism)
A B Shinde
 
INTERFACING WITH INTEL 8251A (USART)
INTERFACING WITH INTEL 8251A (USART)INTERFACING WITH INTEL 8251A (USART)
INTERFACING WITH INTEL 8251A (USART)
Prof Ansari
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
Rai University
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
BBDITM LUCKNOW
 
Introduction to Digital Signal processors
Introduction to Digital Signal processorsIntroduction to Digital Signal processors
Introduction to Digital Signal processors
PeriyanayagiS
 
Networking Protocols for Internet of Things
Networking Protocols for Internet of ThingsNetworking Protocols for Internet of Things
Networking Protocols for Internet of Things
rjain51
 
Pipelining
PipeliningPipelining
Pipelining
sarith divakar
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V Introduction
Yi-Hsiu Hsu
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
Nahian Ahmed
 
Bit pair recoding
Bit pair recodingBit pair recoding
Bit pair recoding
Basit Ali
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
mudulin
 

What's hot (20)

The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Quine mccluskey method
Quine mccluskey methodQuine mccluskey method
Quine mccluskey method
 
itft-Clock generator
itft-Clock generatoritft-Clock generator
itft-Clock generator
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Lpc2148 i2c
Lpc2148 i2cLpc2148 i2c
Lpc2148 i2c
 
Microprocessor and Microcontroller Lab Manual!
Microprocessor and Microcontroller Lab Manual!Microprocessor and Microcontroller Lab Manual!
Microprocessor and Microcontroller Lab Manual!
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecture
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism)
 
INTERFACING WITH INTEL 8251A (USART)
INTERFACING WITH INTEL 8251A (USART)INTERFACING WITH INTEL 8251A (USART)
INTERFACING WITH INTEL 8251A (USART)
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
 
Introduction to Digital Signal processors
Introduction to Digital Signal processorsIntroduction to Digital Signal processors
Introduction to Digital Signal processors
 
Networking Protocols for Internet of Things
Networking Protocols for Internet of ThingsNetworking Protocols for Internet of Things
Networking Protocols for Internet of Things
 
Pipelining
PipeliningPipelining
Pipelining
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V Introduction
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Bit pair recoding
Bit pair recodingBit pair recoding
Bit pair recoding
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
 

Viewers also liked

Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PipeliningLec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
Hsien-Hsin Sean Lee, Ph.D.
 
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISALec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
Hsien-Hsin Sean Lee, Ph.D.
 
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- IntroLec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
Hsien-Hsin Sean Lee, Ph.D.
 
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Hsien-Hsin Sean Lee, Ph.D.
 
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Hsien-Hsin Sean Lee, Ph.D.
 

Viewers also liked (20)

Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PipeliningLec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
Lec1 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Pipelining
 
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
 
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISALec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
Lec4 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ISA
 
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec7 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
 
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
 
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
Lec6 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Can...
 
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
 
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- IntroLec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
Lec1 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Intro
 
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
 
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
Lec10 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Mu...
 
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
 
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
Lec19 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Pr...
 
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
Lec8 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Qui...
 
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
 
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
 
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
Lec17 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Me...
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
 
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
Lec16 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Fi...
 
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
 

Similar to Lec5 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Branch Predictor

Computer organiztion2
Computer organiztion2Computer organiztion2
Computer organiztion2
Umang Gupta
 
Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
gollasaidulu1
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
thearticlenow
 
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Hsien-Hsin Sean Lee, Ph.D.
 
Ch3
Ch3Ch3
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
Dr. Ajay Kumar Singh
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperations
mahesh kumar prajapat
 
PROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNITPROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNIT
Amirthavalli Senthil
 
microprocessors
microprocessorsmicroprocessors
microprocessors
Hossam Zein
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
AliaaTarek5
 
Micro operations
Micro operationsMicro operations
Micro operations
Ramakrishna Reddy Bijjam
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
Rokonuzzaman Rony
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
asslang
 
Like 2014214
Like 2014214Like 2014214
Like 2014214
Jingwen Leng
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Asuka Nakajima
 
Multipliers in VLSI
Multipliers in VLSIMultipliers in VLSI
Multipliers in VLSI
Kiranmai Sony
 
8086 architecture
8086 architecture8086 architecture
8086 architecture
karthiga selvaraju
 
REGISTER TRANSFER AND MICROOPERATIONS2017-3-5.ppt
REGISTER  TRANSFER  AND  MICROOPERATIONS2017-3-5.pptREGISTER  TRANSFER  AND  MICROOPERATIONS2017-3-5.ppt
REGISTER TRANSFER AND MICROOPERATIONS2017-3-5.ppt
NARENDRAKUMARCHAURAS1
 
system software.ppt
system software.pptsystem software.ppt
system software.ppt
byuvashreeitITDept
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
David Evans
 

Similar to Lec5 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Branch Predictor (20)

Computer organiztion2
Computer organiztion2Computer organiztion2
Computer organiztion2
 
Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
Lec8 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Dynamic Sch...
 
Ch3
Ch3Ch3
Ch3
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperations
 
PROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNITPROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNIT
 
microprocessors
microprocessorsmicroprocessors
microprocessors
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
 
Micro operations
Micro operationsMicro operations
Micro operations
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
Kaizen cso002 l1
Kaizen cso002 l1Kaizen cso002 l1
Kaizen cso002 l1
 
Like 2014214
Like 2014214Like 2014214
Like 2014214
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
 
Multipliers in VLSI
Multipliers in VLSIMultipliers in VLSI
Multipliers in VLSI
 
8086 architecture
8086 architecture8086 architecture
8086 architecture
 
REGISTER TRANSFER AND MICROOPERATIONS2017-3-5.ppt
REGISTER  TRANSFER  AND  MICROOPERATIONS2017-3-5.pptREGISTER  TRANSFER  AND  MICROOPERATIONS2017-3-5.ppt
REGISTER TRANSFER AND MICROOPERATIONS2017-3-5.ppt
 
system software.ppt
system software.pptsystem software.ppt
system software.ppt
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 

More from Hsien-Hsin Sean Lee, Ph.D.

Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOSLec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
Hsien-Hsin Sean Lee, Ph.D.
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Hsien-Hsin Sean Lee, Ph.D.
 
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- CoherenceLec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
Hsien-Hsin Sean Lee, Ph.D.
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMPLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
Hsien-Hsin Sean Lee, Ph.D.
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Hsien-Hsin Sean Lee, Ph.D.
 
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Hsien-Hsin Sean Lee, Ph.D.
 
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
Hsien-Hsin Sean Lee, Ph.D.
 
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Hsien-Hsin Sean Lee, Ph.D.
 
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
Hsien-Hsin Sean Lee, Ph.D.
 

More from Hsien-Hsin Sean Lee, Ph.D. (13)

Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
 
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
Lec7 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Kar...
 
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
Lec5 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Boo...
 
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOSLec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
Lec4 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMOS
 
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIWLec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
Lec15 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- EPIC VLIW
 
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- CoherenceLec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
Lec14 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech --- Coherence
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMPLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- SMP
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
 
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
 
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
Lec11 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part3
 
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
 
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
Lec9 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part 1
 

Recently uploaded

1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
2g3om49r
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
yizxn4sx
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SethiLilu
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
zpc0z12
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
ei8c4cba
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
1jtj7yul
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
terpt4iu
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
1jtj7yul
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
xuqdabu
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
lorraineandreiamcidl
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
8db3cz8x
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
terpt4iu
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
6oo02s6l
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
xuqdabu
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
byfazef
 
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
kuehcub
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
nudduv
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
snfdnzl7
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
nudduv
 

Recently uploaded (20)

1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
 
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginnersSOLIDWORKS 2024 Enhancements eBook.pdf for beginners
SOLIDWORKS 2024 Enhancements eBook.pdf for beginners
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
 
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
一比一原版(Monash文凭证书)莫纳什大学毕业证如何办理
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
 
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
一比一原版(KCL文凭证书)伦敦国王学院毕业证如何办理
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 

Lec5 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Branch Predictor

  • 1. ECE 4100/6100 Advanced Computer Architecture Lecture 5 Branch Prediction Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology
  • 2. 2 Predict What? • Direction (1-bit) – Single direction for unconditional jumps and calls/returns – Binary for conditional branches • Target (32-bit or 64-bit addresses) – Some are easy • One: Uni-directional jumps • Two: Fall through (Not Taken) vs. Taken – Many: Function Pointer or Indirect Jump (e.g. jr r31)
  • 3. 3 Categorizing Branches 8% 10% 82% 19% 6% 75% 0% 20% 40% 60% 80% 100% Call/Return Jump Conditional Branch Frequency of branch instructions SPEC2000INT SPEC2000FP Source: H&P using Alpha
  • 4. 4 Branch Misprediction PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Single Issue
  • 5. 5 Branch Misprediction PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Single Issue Mispredict
  • 6. 6 Branch Misprediction PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Single Issue (flush entailed instructions and refetch) Mispredict
  • 7. 7 Branch Misprediction PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Single Issue Fetch the correct path
  • 8. 8 Branch Misprediction PC Next PC Fetch DriveAlloc Rename Queue Schedule Dispatch Reg File ExecFlags Br Resolve 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Single Issue Mispredict 8-issue Superscalar Processor (Worst case)
  • 9. 9 Why Branch is Predictable? for (i=0; i<100; i++) { …. } addi r10, r0, 100 add r1, r0, r0 L1: … … … … addi r1, r1, 1 bne r1, r10, L1 … … if (aa==2) aa = 0; if (bb==2) bb = 0; if (aa!=bb) …. addi r2, r0, 2 bne r10, r2, L_bb xor r10, r10, r10 L_bb: bne r11, r2, L_xx xor r11, r11, r11 L_xx: beq r10, r11, L_exit … Lexit:
  • 10. 10 Control Speculation • Execute instruction beyond a branch before the branch is resolved  Performance • Speculative execution • What if mis-speculated? need – Recovery mechanism – Squash instructions on the incorrect path • Branch prediction: Dynamic vs. Static • What to predict?
  • 11. 11 Static Branch Prediction • Uni-directional, always predict taken (or not taken) • Backward taken, Forward not taken – Need offset information (when?) • Compiler hints with branch annotation – When the info will be available? Post-decode?
  • 12. 12 Simplest Dynamic Branch Predictor • Prediction based on latest outcome • Index by some bits in the branch PC – Aliasing T NT T T NT NT . . . for (i=0; i<100; i++) { …. } addi r10, r0, 100 addi r1, r1, r0 L1: … … … … addi r1, r1, 1 bne r1, r10, L1 … … 0x40010100 0x40010104 0x40010108 … 0x40010A04 0x40010A08 How accurate? NT T 1-bit Branch History Table
  • 13. 13 Typical Table Organization Hash PC (32 bits) . . . . . 2N entries Prediction N bits FSM Update Logic table update Actual outcome
  • 14. 14 Simplest Dynamic Branch Predictor T NT T T NT NT . . . addi r10, r0, 100 addi r1, r1, r0 L1: add r21, r20, r1 lw r2, (r21) beq r2, r0, L2 … … j L3 L2: … … … L3: addi r1, r1, 1 bne r1, r10, L1 0x40010100 0x40010104 0x40010108 0x4001010c 0x40010110 0x40010210 0x40010B0c 0x40010B10 for (i=0; i<100; i++) { if (a[i] == 0) { … } … } NT T 1-bit Branch History Table
  • 15. 15 FSM of the Simplest Predictor • A 2-state machine • Change mind fast 00 11 If branch not taken If branch taken 00 11 Predict not taken Predict taken
  • 16. 16 Example using 1-bit branch history table for (i=0; i<44; i++) { …. } 00Pred Actual T T √ 11 11 √ T T √ 11 11 addi r10, r0, 4 addi r1, r1, r0 L1: … … addi r1, r1, 1 bne r1, r10, L1 NT 00   T 11  T √ 11 √ T T √ 11 11 NT 00  T 11  60% accuracy
  • 17. 17 2-bit Saturating Up/Down Counter Predictor Not Taken Taken Predict Not taken Predict taken ST: Strongly Taken WT: Weakly Taken WN: Weakly Not Taken SN: Strongly Not Taken 01/ WN 01/ WN 00/ SN 00/ SN 10/ WT 10/ WT 11/ ST 11/ ST MSB: Direction bit LSB: Hysteresis bit
  • 18. 18 2-bit Counter Predictor (Another Scheme) Not Taken Taken Predict Not taken Predict taken ST: Strongly Taken WT: Weakly Taken WN: Weakly Not Taken SN: Strongly Not Taken 01/ WN 01/ WN 00/ SN 00/ SN 11/ ST 11/ ST 10/ WT 10/ WT
  • 19. 19 Example using 2-bit up/down counter for (i=0; i<44; i++) { …. } 0101Pred Actual T T √ 1010 1111 √ T T √ 1111 1111 addi r10, r0, 4 addi r1, r1, r0 L1: … … addi r1, r1, 1 bne r1, r10, L1 NT 1010   T 1111 √ T √ 1111 √ T T √ 1111 1111 NT 1010  T 1111 √ 80% accuracy
  • 20. 20 Branch Correlation • Branch direction – Not independent – Correlated to the path taken • Example: Path 1-1 of b3 can be surely known beforehand • Track path using a 2-bit register if (aa==2) // b1 aa = 0; if (bb==2) // b2 bb = 0; if (aa!=bb) { // b3 ……. } b1 b2 b2 b3 b3 b3 1 (T) 1 1 0 (NT) 0 b3 0 Path: A:1-1 B:1-0 C:0-1 D:0-0 aa=0 bb=0 aa=0 bb≠2 aa≠2 bb=0 aa≠2 bb≠2 Code Snippet
  • 21. 21 Correlated Branch Predictor [PanSoRahmeh’92] • (M,N) correlation scheme – M: shift register size (# bits) – N: N-bit counter 2-bit counter hash . . . . X X Branch PC hash 2-bit counter . . . . 2-bit counter . . . . X X 2-bit counter . . . . 2-bit counter . . . . Prediction Prediction 2-bit shift register (global branch history) select Subsequent branch direction (2,2) Correlation Scheme 2-bit Sat. Counter Scheme 2w w Branch PC
  • 22. 22 Two-Level Branch Predictor [YehPatt91,92,93] • Generalized correlated branch predictor • 1st level keeps branch history in Branch History Register (BHR) • 2nd level segregates pattern history in Pattern History Table (PHT) 1 1 . . . . . 1 0 00…..00 00…..01 00…..10 11…..11 11…..10 Branch History Pattern Pattern History Table (PHT) Prediction Rc-k Rc-1 Rc: Actual Branch Outcome FSM Update Logic Branch History Register (BHR) (Shift left when update) N 2N entries Current StatePHT update
  • 23. 23 Branch History Register • An N-bit Shift Register = 2N patterns in PHT • Shift-in branch outcomes – 1 ⇒ taken – 0 ⇒ not taken • First-in First-Out • BHR can be – Global – Per-set – Local (Per-address)
  • 24. 24 Pattern History Table • 2N entries addressed by N-bit BHR • Each entry keeps a countercounter (2-bit or more) for prediction – Counter update: the same as 2-bit counter – Can be initialized in alternate patterns (01, 10, 01, 10, ..) • Alias (or interference) problem
  • 25. 25 Global History Schemes Global BHR Global PHT GAg Global BHR .. SetP(B) Per-set PHTs (SPHTs) GAs Global BHR .. Addr(B) Per-addr PHTs (PPHTs) GAp ** [PanSoRahmeh’92] similar to GAp . . . . . . . . . . . . . . . . . . . . . Set can be determined by branch opcode, compiler classification, or branch PC address.
  • 26. 26 GAs Two-Level Branch Prediction 01100110 BHR PC = 0x4001000C . . . PHT 00110110 . . 00110110 00110111 11111101 11111110 00000000 00000001 00000010 11111111 10 MSB = 1 Predict Taken The 2 LSBs are insignificant for 32-bit instruction
  • 27. 27 Predictor Update (Actually, Not Taken) 01100110 BHR PC = 0x4001000C . . . PHT 00110110 . . 00110110 00110111 11111101 11111110 00000000 00000001 00000010 11111111 1001 decremented 11001100 00111100 00111100 Wrong Predictio n • Update Predictor after branch is resolved
  • 28. 28 Per-Address History Schemes Global PHT PAg SetP(B) Per-set PHTs (SPHTs) PAs Addr(B) Per-addr PHTs (PPHTs) PAp . . . Addr(B) Per-addr BHT (PBHT) . . . Addr(B) Per-addr BHT (PBHT) . . . Addr(B) Per-set BHT (PBHT) •Ex: P6, Itanium •Ex: Alpha 21264’s local predictor . . . .. . . . . . . . . . .. . . . . . . . . .
  • 29. 29 PAs Two-Level Branch Predictor PC = 1110 0000 1001 1001 0010 1100 1110 1000 000 001 010 011 100 101 110 111 BHT 11010110 . . . PHT . . 11010101 11010110 11111101 11111110 00000000 00000001 00000010 11111111 MSB = 1 Predict Taken 11 110
  • 30. 30 Per-Set History Schemes Global PHT SAg SetP(B) Per-set PHTs (SPHTs) SAs Addr(B) Per-addr PHTs (PPHTs) SAp . . . Per-set BHT (SBHT) . . . SetH(B) Per-set BHT (SBHT) . . . SetH(B) Per-set BHT (SBHT) .. . . . . . . . . . . . . .. . . . . . . . . . SetH(B)
  • 31. 31 PHT Indexing Branch addr Global history Gselect 4/4 00000000 00000001 00000001 00000000 00000000 00000000 11111111 00000000 11110000 11111111 10000000 11110000 Insufficient History • Tradeoff between more history bits and address bits • Too many bits needed in Gselect ⇒ sparse table entries
  • 32. 32 Gshare Branch Predictor [McFarling93] • Tradeoff between more history bits and address bits • Too many bits needed in Gselect ⇒ sparse table entries • Gshare ⇒ Not to lose global history bits • Ex: AMD Athlon, MIPS R12000, Sun MAJC, Broadcom SiByte’s SB-1 Branch addr Global history Gselect 4/4 Gshare 8/8 00000000 00000001 00000001 00000001 00000000 00000000 00000000 00000000 11111111 00000000 11110000 11111111 11111111 10000000 11110000 01111111 GselectGselect 4/4: Index PHT by concatenateconcatenate low order 4 bits GshareGshare 8/8: Index PHT by {Branch address ⊕ Global history}
  • 33. 33 Gshare Branch Predictor . . . PHT . . 00 MSB = 0 Predict Not Taken 1 1 . . . . . 1 0 0 1 . . . . . 0 1 0 01. . . . .1 1 ⊕ PC Address Global BHR
  • 34. 34 Aliasing Example PHT BHR 1101 PC 0110 ---- XOR 1011 BHR 1001 PC 1010 ---- XOR 0011 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 PHT (indexed by 10) BHR 1101 PC 0110 ---- || 1001 BHR 1001 PC 1010 ---- || 1001 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 GApGAp GshareGshare
  • 35. 35 Hybrid Branch Predictor [McFarling93] • Some branches correlated to global history, some correlated to local history • Only update the meta-predictor when 2 predictors disagree P0P0 P1P1 . . . Choice (or Meta) Predictor Branch PC Final Prediction
  • 36. 36 Alpha 21264 (EV6) Hybrid Predictor Local History Table 1024 x 10 bits Single Local Predictor 1024 x 3 bits Global Predictor 4096 x 2 bits Choice Predictor 4096 x 2 bits Global history 12 Local prediction Global prediction Meta prediction Next Line/set Prediction L1 I-cache (64KB 2w) & TLB 4 instr./cycle4 instr./cycle Virtual address Final Branch Prediction PCPC 10 • A “tournament branch predictor” • Multi-predictor scheme w/ – Local predictorLocal predictor (~PAg) • Self-correlation – Global predictorGlobal predictor • Inter-correlation – Choice predictorChoice predictor as the decision maker: a 2-bit sat. counter to credit either local or global predictors. • Die size impact – History info tables ~2% – BTB ~ 2.7% (associated with I-$ on a per-line basis) • 2 cycle latency, we will discuss more later For Single-cycle Prediction
  • 37. 37 Alpha EV8 Branch Predictor Branch PC Global history F1 F2 F3 majority vote prediction G0 G1 Meta F4 Bimodal e-gskew predictor • Real silicon never sees the daylight • Use a 2Bc-gskew predictor (one form of enhanced gskew) – Bimodal predictor used as (1) static biased predictor and (2) part of e-gskew predictor – Global predictors G0 and G1 are part of e-gskew predictor – Table sizes: 352Kbits in total (208Kbits for prediction table; 144Kbits for hysteresis table.)
  • 38. 38 Branch Target Prediction • Try the easy ones first – Direct jumps – Call/Return – Conditional branch (bi-directional) • Branch Target Buffer (BTB) • Return Address Stack (RAS)
  • 39. 39 Branch Target Buffer (BTB) TargetTag TargetTag TargetTag… BTBBranch PC == == ==… ++ 4 Branch Target Predicted Branch Direction 0 1
  • 40. 40 Return Address Stack (RAS) • Different call sites make return address hard to predict – Printf() being called by many callers – The target of “return” instruction in printf() is a moving target • A hardware stack (LIFO) – Call will push return address on the stack – Return uses the prediction off of TOS
  • 41. 41 Return Address Stack • Does it always work? – Call depth – Setjmp/Longjmp – Speculative call? ++ 4 Call PC Push Return Address BTBBTB Return PC BTBBTB Return? • May not know it is a return instruction prior to decoding – Rely on BTB for speculation – Fix once recognize Return
  • 42. 42 Indirect Jump • Need Target Prediction – Many (potentially 230 for 32-bit machine) – In reality, not so many – Similar to predicting values • Tagless Target Prediction • Tagged Target Prediction
  • 43. 43 Tagless Target Prediction [ChangHaoPatt’97] 1 1 . . . . . 1 0 Branch History RegisterBranch History Register (BHR)(BHR) 00…..00 00…..01 00…..10 11…..11 11…..10 PC ⊗ BHR Pattern Target Cache (2N entries) Predicted Target Address Branch PCBranch PC HashHash • Modify the PHT to be a “Target Cache” – (indirect jump) ? (from target cache) : (from BTB) • Alias?
  • 44. 44 Tagged Target Prediction [ChangHaoPatt’97] • To reduce aliasing with set-associative target cache • Use branch PC and/or history for tags 1 1 . . . . . 1 0 BHR 00…..00 00…..01 00…..10 11…..11 11…..10 Target Cache (2n entries per way) Predicted Target Address Branch PC Hash n =? Tag Array
  • 45. 45 Multiple Branch Prediction • For a really wide machine – Across several basic blocks – Need to predict multiple branches per cycle • How to fetch non-contiguous instructions in one cycle? • Prediction accuracy extremely critical (will be reduced geometrically)