Question: Q 2 . Assume a piece of code which executes two branches b 1 and b 2 in alternating sequence ( i . e .

Q2. Assume a piece of code which executes two branches b1 and b2 in alternating sequence (i.e.
b1,b2,b1,b2,b1,b2,dotsdots. The first six actual outcomes of b1 and b2 are as shown below:-
bl: NT T NT T NT NT
b2: NT T NT T NT NT
(b) Repeat part (a) with a Gag predictor with 2 bit GBHR and 2 bit GPHT. All entries of GBHR are
initialized to 'T'. The two bits of GPHT are adjusted as a saturating counter and are initialized to the
maximum count.Q2. Assume a piece of code which executes two branches b1 and b2 in alternating sequence (i.e.
b1,b2,b1,b2,b1,b2,dotsdots. The first six actual outcomes of b1 and b2 are as shown below:
bl: NT T NT T NT NT
b2: NT T NT T NT NT
6(a) Assume that a PAg branch predictor with 2 bit PABHR and 2 bit GPHT is used. All entries of PABHR
are initialized to 'T', and there is no aliasing in PABHR. The two bits of GPHT are adjusted as a
saturating counter and are initialized to the maximum count. Draw a table as shown below in your
answer sheet and show the predictions made for each execution of the branches. Also write the final
values of all counters. Show your work.
(b) Repeat part (a) with a Gag predictor with 2 bit GBHR and 2 bit GPHT. All entries of GBHR are
initialized to 'T'. The two bits of GPHT are adjusted as a saturating counter and are initialized to the
maximum count.
[12]
 Q2. Assume a piece of code which executes two branches b1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!