Presentation is loading. Please wait.

Presentation is loading. Please wait.

Branch Predictor Animations Bi-modal, Local, Global CS450/650 Winter 2013 Andrew Morton.

Similar presentations


Presentation on theme: "Branch Predictor Animations Bi-modal, Local, Global CS450/650 Winter 2013 Andrew Morton."— Presentation transcript:

1 Branch Predictor Animations Bi-modal, Local, Global CS450/650 Winter 2013 Andrew Morton

2 Code Example 1 int i=0, j=3; 2 do { 3 j += 3; 4 b1: if(i == 0) 5 j %= 5; 6 b2: if(j < 2) 7 j++; 8 i++; 9 b3: } while(i<2); lineijb1b2b3 103 lineijb1b2b3 103 36 lineijb1b2b3 103 36 40 lineijb1b2b3 103 36 40 51 lineijb1b2b3 103 36 40 51 60 lineijb1b2b3 103 36 40 51 60 72 lineijb1b2b3 103 36 40 51 60 72 81 lineijb1b2b3 103 36 40 51 60 72 81 91 lineijb1b2b3 103 36 40 51 60 72 81 91 35 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 82 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 82 90

3 Bimodal Predictor (b2) individual 2-bit up/down counter – initial state = 10 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 82 90 xx 10 xx counters PC 0110

4 Local Predictor (b2) shared 2-bit up/down counters – initial states = 10 individual local histories – initialized to 11 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 82 90 counters PC10 local histories 11 xx 01 10 11 01

5 Global Predictor (b1,b2,b3) shared 2-bit up/down counters – initial states = 10 one global history – initialized to 11 lineijb1b2b3 103 36 40 51 60 72 81 91 35 41 61 82 90 counters PC10 global history 11 01 10 01 00 11 01


Download ppt "Branch Predictor Animations Bi-modal, Local, Global CS450/650 Winter 2013 Andrew Morton."

Similar presentations


Ads by Google