Presentation is loading. Please wait.

Presentation is loading. Please wait.

Recovery: Redirect fetch unit to T path if actually T.

Similar presentations


Presentation on theme: "Recovery: Redirect fetch unit to T path if actually T."— Presentation transcript:

1 Recovery: Redirect fetch unit to T path if actually T.
IF stage ID stage 2 PC 4 + 1 NPC + taken target Imm Actual T/NT A op 0 ? taken? decode is a branch Always predict NT. 1 Recovery: Redirect fetch unit to T path if actually T. 2

2 IF stage ID stage == 4 PC BTB NPC + taken target Imm target read port
A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted?

3 BTB miss OR (BTB hit & prev. outcome = NT)
+ PC BTB NPC 4 Imm A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted? 1 Predict NT if: BTB miss OR (BTB hit & prev. outcome = NT) 1

4 (BTB hit & prev. outcome = T)
+ PC BTB NPC 4 Imm A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted? 2 Predict T if: (BTB hit & prev. outcome = T) 2

5 Recovery: Redirect fetch unit to NT path if:
+ PC BTB NPC 4 Imm A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted? 3 Recovery: Redirect fetch unit to NT path if: (Predicted T & Actually NT) 3

6 Recovery: Redirect fetch unit to T path if:
+ PC BTB NPC 4 Imm A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted? 4 Recovery: Redirect fetch unit to T path if: (Predicted NT & Actually T) 4

7 IF stage ID stage == Update BTB: 4 PC BTB NPC + taken target Imm
A op 0 ? decode taken target Actual T/NT is a branch write port read port IF stage ID stage hit t/nt target T/NT pred. == Predicted T/NT mispredicted? 5 Update BTB: If branch missed in BTB, add it to BTB. Whether branch missed or hit in BTB, always update prev. outcome field. 5

8 Backup Slides

9 Training BTB IF stage ID stage Taken Target T / NT direction
PC 4 + NPC + Taken Target Imm read port BTB A op 0 ? T / NT direction decode is a branch write port PC

10 Using BTB IF stage ID stage Taken Target == is a branch 4 PC BTB PC
+ NPC + Taken Target Imm target read port BTB t/nt A op 0 ? Actual T/NT hit T/NT pred. Predicted T/NT == mispredicted? write port decode is a branch PC


Download ppt "Recovery: Redirect fetch unit to T path if actually T."

Similar presentations


Ads by Google