Professional Documents
Culture Documents
Name: ______________________________________________________________
[Problem 1]
[Part A] Determine which data dependences occur in executing this program fragment.
Operation (dest) (src0) (src1)
Instruction
[Q3] Show the number of cycles the code takes with the 5-stage pipeline
Instruction/ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Cycle
I0
I1
I2
I3
I4
[Part B] Determine which data dependences occur in executing this program fragment.
Operation (dest) (src0) (src1)
Instruction
[Q3] Show the number of cycles the code takes with the 5-stage pipeline:
Instruction/Cycle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[Problem 2] Consider the following code to copy a 1D array from one location in
memory to another. Assume that the src array starts at address passed by a1 and that
the dest array address is passed by a0.
# define N 100
[Part B] For the assembly code of Part A, what is the frequency of each of the three
types of instructions (create a formula based on the value N)
[Part D] For the assembly code of Part C, what is the frequency of each of the three
types of instructions (create a formula based on the value N)