Question: Computer Architecture Problem 2: Dynamic Branch Prediction (10 points) Consider the following MIPS code. The register RO is always 0 DADDI R1, RO, 2 LI:
Computer Architecture





Problem 2: Dynamic Branch Prediction (10 points) Consider the following MIPS code. The register RO is always 0 DADDI R1, RO, 2 LI: DADDI R12, RO, 5 2: DSUB! R12, R12, 1 BNEZ R12, L2 Branch 1 DSUBI R1, R1, 1 BNEZ R1, L1 - Branch 2 Each table below refers to only one branch. For instance, branch 1 will be executed 10 times. Those 10 times should be recorded in the table for branch 1. Similarly branch 2 is executed only 2 times Part A I4 pointsl Assume that 1-bit branch predictors are used. When the processor starts to execute the above code, both predictors contain value N (Not taken). What is the number of correct predictions? Use the following tables to record the prediction and action of each branch. The first entry is filled in for you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
