Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Determine the number of branch mispredictions that occurs during the execution if we use one-bit predictor with 8 entries. Assume all predictors are initialized
a) Determine the number of branch mispredictions that occurs during the execution if we use one-bit predictor with 8 entries. Assume all predictors are initialized with 0 values.
b) Repeat part (a) using a 2-bit local history predictor and 4, 2-bit counters with 8 entries. Assume all predictors are initialized at the 00 state (strongly not taken) and the history predictor initialized at 00.
0x110 0x114 0x118 li R2,0 li R3,16 li R4,0 Loop bound for Loopl i-0 Loopl 0x11C 0x120 beq R4,R3,EndLoopl; Exit Loopl if i-16 li R5,0 j=0 LoopJ 0x124 0x128 0x12C 0x130 0x134 beq R5,R3 EndLoopJ ; Exit LoopJ if j= 16 add R6,R5,R4 andi R6,R6,3 bne R6,R0,Endif Skip if +i)%41 0 add R2,R2,R5 jti Endif 0x138 0x13C addi R5,R5,1 beq RO,RO,LoopJ Go back to LoopJ EndLoop 0x140 0x144 addi R4,R4,1 beq RO,RO,Loopl Go back to Loopl +4 EndLooplStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started