Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 4 Please analyze the following loop.Assume that perfect branch predictio

ID: 644947 • Letter: P

Question

Problem 4

Please analyze the following loop.Assume that perfect branch prediction is used (no stalls due to control hazards).The pipeline has full forwarding support.Assume that many iterations of this look are executed before the loop exits.

Loop: ADD R1,R2,RI

           LW R2,O(RI)

   LW R2,I6(R2)

STL R1,R2,R4

BEQ RI,R9,loop

A.)Show a pipeline execution diagram for a complete iteration of this loop,from the cycle in which the first instruction of that iteration is fetched up to (but not including) the cycle in which the first instruction of the next instruction is fetched.please use the pipeline execution diagram below:-

Instuctions!      Clock -

Explanation / Answer

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
LW R1, 0(RI) | IF | ID | EX | M | W | | | | | | |
LW R2, I6(R2) | | IF | ID | EX | M | W | | | | | |
ADD1 R1,R2,RI | | | IF | ID | * | EX | M | W | | | |
SW R3, 0(R4) | | | | IF | * | ID | EX | M | W | | |

Answer B.) The number of cycles will be depending on the values stored in Registers.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote