Question: 4 . 2 5 Consider the following loop. Assume that perfect branch prediction is used ( no stalls due to control hazards ) , that
Consider the following loop.
Assume that perfect branch prediction is used no stalls due to control hazards
that there are no delay slots, that the pipeline has full forwarding support, and that
branches are resolved in the EX as opposed to the ID stage.
$ Show a pipeline execution diagram for the first two iterations
of this loop.
$ Mark pipeline stages that do not perform useful work. How
often while the pipeline is full do we have a cycle in which all five pipeline stages are
doing useful work? Begin with the cycle during which the addi is in the IF stage.
End with the cycle during which the bnez is in the IF stage.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
