Question: Please solve only part (b). I have already posted (A) before Please give proper explaination [20 pts.] 3- Consider the following code segment within a

 Please solve only part (b). I have already posted (A) before

Please give proper explaination [20 pts.] 3- Consider the following code segment

Please solve only part (b). I have already posted (A) before

Please give proper explaination

[20 pts.] 3- Consider the following code segment within a loop body: if(aa==2)aa=0; if (bb==2) bb=0; if (aa!=bb) i Here is the equivalent MIPS code assuming aa and bb are assigned to registers R1 and R2, respectively. Assume that the following list of 8 values of aa and bb are to be processed: itoration (a) Suppose 2-bit BPBs are used to predict the execution of the three branches in this loop. 2-bit BPBs flip when they are wrong two consecutive times and consist of four states: strongly not taken (sNT), weakly not taken (wNT), strongly taken (sT), and weakly taken (wT). Show the trace of predictions and the actual outcome of branches b1, b2, and b3 in the table shown below. The initial values of the 2-bit predictors are all initialized to sNT. What are the prediction accuracies for b1, b2, and b3. What is the overall prediction accuracy? (b) Suppose a two-level (2,2) branch prediction is used predict the execution of the three branches in this loop. That is, in addition to the 2-bit predictor, a 2-bit global register (g ) is used. Assume the 2-bit predictors are all initialized to sNT and g is initialized to ( T,NT), with the LSB representing the most recent branch outcome. Therefore, initial predictions, g, and their meaning are given below: Show the trace of predictions for branches b1,b2, and b3 and updated g values in the table shown below. What are the prediction accuracies for b1,b2, and b3 ? What is the overall prediction accuracy? g=T,NT

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!