Question: . Consider the following code (this should look familiar from HW3...): li to, 5 li St1, 0x10010004 addi to, $to, -1 lw St1, 0(Sti) bne

. Consider the following code (this should look familiar from HW3...): li to, 5 li St1, 0x10010004 addi to, $to, -1 lw St1, 0(Sti) bne Sto, Szero, loop add vo, Sto, Szero loop: [5] Assume this is executed on a standard 5 stage MIPS pipeline with no branch prediction. How many dynamic instructions are executed, including NOPs? How does this relate to the number of cycles? a. [5] How many dynamic instructions and cycles would this take with perfect branch prediction? b. c. 10] Assume a 1 bit branch predictor is used, where the original state is Not Taken. Give the full log of the branch history table, showing predicted and actual branches. Underline the incorrect predictions. What is the final state of the branch prediction, and how many cycles were required in total? d. [5] This code is executed on a single cycle machine (M1) at 100 MHz, and on a multicycle machine with 1 bit branch predictor (M2) at 133.33 MHz. Compute Texe on both M1 and M2. What is the total branch misprediction overhead (that is, what percentage of the total execution time is due to mispredicting the branch?) . Consider the following code (this should look familiar from HW3...): li to, 5 li St1, 0x10010004 addi to, $to, -1 lw St1, 0(Sti) bne Sto, Szero, loop add vo, Sto, Szero loop: [5] Assume this is executed on a standard 5 stage MIPS pipeline with no branch prediction. How many dynamic instructions are executed, including NOPs? How does this relate to the number of cycles? a. [5] How many dynamic instructions and cycles would this take with perfect branch prediction? b. c. 10] Assume a 1 bit branch predictor is used, where the original state is Not Taken. Give the full log of the branch history table, showing predicted and actual branches. Underline the incorrect predictions. What is the final state of the branch prediction, and how many cycles were required in total? d. [5] This code is executed on a single cycle machine (M1) at 100 MHz, and on a multicycle machine with 1 bit branch predictor (M2) at 133.33 MHz. Compute Texe on both M1 and M2. What is the total branch misprediction overhead (that is, what percentage of the total execution time is due to mispredicting the branch?)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
