Question: Problem #6 (Loop Unrolling) Unroll the loop two times and then draw a pipeline diagram for the following code executed on a 2- issue processor

 Problem #6 (Loop Unrolling) Unroll the loop two times and then

Problem #6 (Loop Unrolling) Unroll the loop two times and then draw a pipeline diagram for the following code executed on a 2- issue processor (where one of the instructions can be integer ALU or branch and the other can be load or store). Reorder the instructions to avoid as many pipeline stalls as possible to schedule the instructions in minimum number of clock cycles. Compute the IPC for the code too. ;This code computes the dot product of two arrays pointed by $1 and $2 Loop: lw $5,0($1) ; Load element from first array lw $6, 0($2) ; Load element from second array mult $7, S5, $6 ; Multiply elements add $4, S4, S7 ; Add elements to accumulator in $4, initially S4 is zero addi ST, SI, #4 ; Increment pointers addi $2, S2, #4 addi S3, S3, # 1 Decrement element count, S3 contains the length of the array bne S3, SO, Loop ; Continue until all elements done

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!