Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following MIPS code and answer the following questions 3. Consider the following code (this should look familiar from HW3...) li $t0, 5 liSt1,0x10010004

Consider the following MIPS code and answer the following questions

image text in transcribed

3. Consider the following code (this should look familiar from HW3...) li $t0, 5 liSt1,0x10010004 addi Sto, Sto, -1 lw St1, 0(St1) bne Sto, Szero, loop addSvO, St0, Szero loop: a. [5Assume 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 ofcycles? b. [5] How many dynamic instructions and cycles would this take with perfect branch prediction? [101 Assume a 1 bit branch predictor is used, where the original state is Not Taken. Give the full logofthebranchhistory table, showing predictedandactualbranches. Underlinethe incorrectpredictions.Whatis thefinalstate ofthebranchprediction, andhowmany cycles were required intotal? c. d. [5Thiscodeis executed on asinglecyclemachine (M1)at 100MHz, andonamulticycle machinewith 1 bitbranchpredictor (M2)at 133.33MHz,Compute TexonbothM1 and M2. What is the total branch misprediction overhead (that is, what percentage of the total execution time is due to mispredicting the branch?) 3. Consider the following code (this should look familiar from HW3...) li $t0, 5 liSt1,0x10010004 addi Sto, Sto, -1 lw St1, 0(St1) bne Sto, Szero, loop addSvO, St0, Szero loop: a. [5Assume 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 ofcycles? b. [5] How many dynamic instructions and cycles would this take with perfect branch prediction? [101 Assume a 1 bit branch predictor is used, where the original state is Not Taken. Give the full logofthebranchhistory table, showing predictedandactualbranches. Underlinethe incorrectpredictions.Whatis thefinalstate ofthebranchprediction, andhowmany cycles were required intotal? c. d. [5Thiscodeis executed on asinglecyclemachine (M1)at 100MHz, andonamulticycle machinewith 1 bitbranchpredictor (M2)at 133.33MHz,Compute TexonbothM1 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

How did you feel about taking piano lessons as a child? (general)

Answered: 1 week ago

Question

LO3 Define the difference between job satisfaction and engagement.

Answered: 1 week ago