Consider the given code below and the clock cycles are given. Identify all the stalls that are produced when one single code iteration is being executed. Show the overall number of cycles per...


Consider the given code below and the clock cycles are given.



  1. Identify all the stalls that are produced when one single code iteration is being executed. Show the overall number of cycles per iteration.

  2. Schedule the loop instructions in order to reduce the number of stalls.(Hint: Loop scheduling Reordering instructions can reduce the number of stalls)

  3. Unroll the loop in the following way: each unrolled iteration processes four array positions. Unrolled loop Unrolling the loop with a factor of four obtains


loop :


lw $ f0 , 22( $t0 )


lw $ f2 , 32( $t1 )


add.d $ f4 , $ f0 , $ f 2


mul.d $ f4 , $ f4 , $ f 6


sw $ f4 , ( $t2 )


addi $t0 , $t0 , 8


addi $t1 , $t1 , 8


subi $t3 , $t3 , 1


bnez $t3 , loop









Lw and store—takes 2 clock cycles


add.d  takes 4 clock cycles


mul.d takes 6 clock cycles


 addi and subi takes 0 clock cycles


bnez takes 1 clock cycles




Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here