Assignment# 1 Solution Nanyang Technological University, Singapore

Assignment-1


Part (a) Section (i)


Write the MIPS-like assembly code for the following program segment to run on the 5-stage pipelined processor which you have developed.

for (i=6; i<=65; i=i+1)
{
a[i] = b[i] + a[i-6];
}

Section (ii)

Convert that assembly code to machine language format, and execute them on the 5-stage pipelined processor which you have developed.

Section (iii) 

Find the number of clock cycles and execution time to execute those machine instructions.

Part (b)  Section (i)

Perform maximal loop unrolling as well as instruction reordering of the assembly code segment obtained for part (a). Convert that assembly code segment to machine language format, and run on the 5-stage pipelined processor which you have developed.

Section (ii)

Find the number of clock cycles and execution time to run it.

Part (c)

Compare the execution times found for part (a) and part (b) and explain the effect of loop-carried dependency.

Get Project Solution Now

Comments