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.

About

CS2IT is about Computer Science and Information Technology. Help to develop Java, C/C++, WordPress and Marketing projects effectively and efficiently. CS2IT is fully sponsored by Hjosft.
Hjsoft was founded on September 09, 2015 to develop and sell the basic computer programs. The company is providing the creative solutions for daily basis problems and awarded by Level 2 from Fiverr Marketplace in 2015.
Hjsoft is working in desktop applications, web applications, and advertisement campaigns.
At Hjsoft, our mission is to enable people and businesses throughout the world to realize their full potential. We consider our mission statement a commitment to our customers.