Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We learned in figure 14.11 the effect of a conditional branch on an instruction pipeline operation: Ours is a six-stage pipeline, with a branch and

We learned in figure 14.11 the effect of a conditional branch on an instruction pipeline operation:

image text in transcribed

Ours is a six-stage pipeline, with a branch and an incorrect guess that caused us to run the wrong code for a little while. Assume the program has 16 instructions.

(2 pts) In which of the 6 pipeline stages do we learn whether or not to take a branch?

(1.5 pts) At which instruction number was the branch command?

(1.5 pts) How many commands entered the pipeline in total?

(1.5 pts) How many total individual pipeline stages were spent running the wrong instructions?

(1.5 pts) For how many clock cycles was the next correct instruction after the branch delayed because of the incorrect guess?

(1.5 pts) Of the instructions shown on the diagram, once we realized our branch guess was wrong, we flushed the pipeline. How many pipeline stages did this avoid? In other words, how many more pipeline stages would have been run for just the instructions shown in the diagram had our guess been correct?

(1.5 pts) Once we discovered we had guessed wrong about the branch, we flushed the pipeline and began running the correct instructions. Assuming the program has only one branch, how many lines of code (instructions) were skipped (never entered the pipeline) in this example that would have been run if the guess that we made had been correct?

_______

(1.5 pts) Had we guessed the other way, correctly, and not loaded and started to run any incorrect commands, how many instructions would have been loaded?

(1.5 pts) How many time slots did it take to complete this scenario?

(1.5 pts) How many time slots would it have taken had we guessed the other way, correctly?

(1.5 pts) To calculate the inefficiency of this scenario, we can divide the number of time slots we should have taken with the number of time slots we did take. What is that ratio?

______

(1.5 pts) Another way to calculate inefficiency is to take the total number of pipeline stages that should have been executed, divided by the total number that were executed. What is that ratio?

(1.5 pts) A final way to calculate inefficiency is to divide the total number of instructions that could have been run by the total number that were. What is that ratio?

Time Branch penalty 1 234 56 789 10 1 12 13 14 Instruction FIDI CO FO EI WO Instruction 2 Instruction 3 FI DI CO FOEI WO Instruction 4 FI DI CO FO FI DI COo FI DI Instruction 5 Instruction 6 Instruction 7 FI Instruction 15 Instruction 16 Time Branch penalty 1 234 56 789 10 1 12 13 14 Instruction FIDI CO FO EI WO Instruction 2 Instruction 3 FI DI CO FOEI WO Instruction 4 FI DI CO FO FI DI COo FI DI Instruction 5 Instruction 6 Instruction 7 FI Instruction 15 Instruction 16

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago

Question

What are oxidation and reduction reactions? Explain with examples

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago