Question: Use the code shown below to complete all the sub - parts of this problem add x 1 , x 0 , x 0 ;

Use the code shown below to complete all the sub-parts of this problem
add x1, x0, x0 ; zero register
addi x2, x1,10 ; set counter (lcv)
addi x5, x0,2000 ; get address of A[]s first element
Strt: ld x7,0(x5) ; get A[ i ]
addi x7, x7,12 ; update value
sd x7,0(x5) ; save A[ i ]
addi x5, x5,8 ; update array pointer
subi x2, x2,1 ; decrement lcv
bne x2, x1, Strt ; loop again?
End: xor, x4, x1
a. Make the pipeline timing diagram for the "standard RISC-V pipe" for this code, running through the clock cycle that the second completion of sd occurs.
b. Compute the speedup for the sequence in (a) over a non-pipelined run of the same sequence.
c. Compute the CPI for the non-pipelined version when run on the sequence in (a).
d. Compute the CPI for the timing diagram case completed in (a).
e. List all dependencies in the code fragment shown above (this part is not limited to the sequence shown in (a)). Show only first order ones (i.e., no transitive/indirect ones!). Write each one on a line by itself, recording line identifier, dependent register, and the instruction and register it depends on, and the dependency type. For example, one entry might be:
Line 100, x14 depends Line 90's x14, true data dependency.
 Use the code shown below to complete all the sub-parts of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!