| B1 | | B2 | | B3 | | | | | |
---|
R1 = 0 | act | | act | | act | | | | | |
| N | | T | | N | | | | | |
R1 = 2 | N | | T | | T | | | | | |
R1 = 4 | T | | N | | N | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| R1 = 0 | | R1 =2 | | R1 = 4 | | | | | |
| 1 | | 3 | | | | | | | |
| N | | N | | T | | | | | |
| | | | | | | | | | |
| 0 | | 2 | | 3 | | | | | |
| T | | T | | N | | | | | |
| | | | | 4 | | | | | |
| -2 | | 0 | | 2 | | | | | |
| 2 | | 0 | | 2 | | | | | |
| N | | T | | N | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| B1 | | B2 | | B3 | | | | | |
R1=? | PRED | ACT | PRED | ACT | PRED | ACT | | | | |
0 | N/N | N | N/N | T | N/N | N | | | | |
2 | N/N | N | T/N | T | N/N | T | | | | |
4 | N/N | T | T/N | N | N/T | N | | | | |
0 | N/T | N | T/N | T | N/T | N | | | | |
2 | N/T | N | T/N | T | N/N | T | | | | |
4 | N/T | T | T/N | N | N/T | N | | | | |
| | | | | | | | | | |
| | | total of 5/18 missed predictions | | | | | | | |
| | | 0.28 | | | | | | | |
| | | 2/9 miss predictons thereafter for this sequence. | | | | | | | |
| | | 0.22 | | | | | | | |
| | | Because the ones for the first two columns are correctly seeded and will not miss going forward. But the third column will still flip flop. | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| Now we neeed to make one predictor that has 4 states. | | | | | | | | | |
| Begin by considering B3 | | | | | | | | | |
| (0,2) predictor. | | | | | | | | | |
| | | | | | | | | | |
| | | | required | N | T | N | N | T | N |
| Consider B3 sequence: | | | actual | N | T | N | N | T | N |
| | | | | | | | | | |
| design this predictor to give you that sequence. | | | | | | | | | |
| | | | | | | | | | |
| Consider B1 sequence | | | required | N | N | T | N | N | T |
| | | | actual | N | T | T | N | N | T |
| | | | | | | | | | |
| Consider B2 sequence | | | required | t | t | n | t | t | n |
| | | | actual | n | t | n | t | n | n |
| | | | | | | | | | |
| | | | | | | | | | |
| What if we now see the traditional loopy code sequence | | | | | | | | | |
| T | T | T | T | T | T | N | REQ | | |
| N | T | N | T | N | T | T | ACT | | |