Part (a) Above is the assembly code for the function declared as: tomato(int array[], int x, int y). Assume that “myarray” is an array of 500 integers, and the function is called as tomato(myarray, 5, 21). (i) How many times is the “slt” instruction executed? Justify your answer to receive credit. ( (ii) How many times is the “lw” instruction executed? Justify your answer to receive credit. ?
Part (a) Above is the assembly code for the function declared as: tomato(int array[], int x, int y). Assume that
“myarray” is an array of 500 integers, and the function is called as tomato(myarray, 5, 21).
(i) How many times is the “slt” instruction executed? Justify your answer to receive credit. (
(ii) How many times is the “lw” instruction executed? Justify your answer to receive credit. ?
Part (b) Calculate the total number of cycles it takes to execute tomato(myarray, 5, 21). Show your work ?
Part (c) What is the execution time in milliseconds for the tomato(myarray, 5, 21) function if the processor operates at
60KHz? Show your work
Part (d) Your manager claims that it is possible to achieve an overall speedup of 2.2x by optimizing the data memory
access time. Is this claim correct? If so how much speed up is necessary for the data memory accesses to achieve an
overall speedup of 2.2x?


Trending now
This is a popular solution!
Step by step
Solved in 2 steps









