Question: Please briefly explain your answer. thanks Problem 1: Given the following code: LOOP: w $5, 100($1) lw $6, 800($1) add $5, $5, $6 sw $5,

Please briefly explain your answer. thanks

Please briefly explain your answer. thanks Problem 1: Given the following code:

LOOP: w $5, 100($1) lw $6, 800($1) add $5, $5, $6 sw

Problem 1: Given the following code: LOOP: w $5, 100($1) lw $6, 800($1) add $5, $5, $6 sw $5, 100($1) addi $1, $1,-4 bne $1, ?Zero, LOOP Assume the initial value in $1 equals 400, such that the loop executes 100 iterations. 1. Execute the code on a pipelined computer based on the following assumptions: i) Forwarding is not available; ii) The branch decision is made during the EX phase, and if the branch is taken, the new PC is available by the end of the MEM phase (Fig. 4.51); iii)iii) Do not alter the code sequence a) Filling in the slots of the following table. Insert stalls where they are necessary b) How many cycles does the whole loop take to execute? Show your calculation. 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 Instruction lw $5, 100 ($1 lw $6, 800($1 add $5, $5, $6 sw $5, 100($1 addi $1, $1, -4 bne $1, $Zero, LOOP **lw $5, 100($1 **This is the lw in the next iteration. Problem 1: Given the following code: LOOP: w $5, 100($1) lw $6, 800($1) add $5, $5, $6 sw $5, 100($1) addi $1, $1,-4 bne $1, ?Zero, LOOP Assume the initial value in $1 equals 400, such that the loop executes 100 iterations. 1. Execute the code on a pipelined computer based on the following assumptions: i) Forwarding is not available; ii) The branch decision is made during the EX phase, and if the branch is taken, the new PC is available by the end of the MEM phase (Fig. 4.51); iii)iii) Do not alter the code sequence a) Filling in the slots of the following table. Insert stalls where they are necessary b) How many cycles does the whole loop take to execute? Show your calculation. 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 Instruction lw $5, 100 ($1 lw $6, 800($1 add $5, $5, $6 sw $5, 100($1 addi $1, $1, -4 bne $1, $Zero, LOOP **lw $5, 100($1 **This is the lw in the next iteration

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!