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 subparts of this problem
add x x x ; zero register
addi x x ; set counter lcv
addi x x ; get address of As first element
Strt: ld xx ; get A i
addi x x ; update value
sd xx ; save A i
addi x x ; update array pointer
subi x x ; decrement lcv
bne x x Strt ; loop again?
End: xor, x x
a Make the pipeline timing diagram for the "standard RISCV 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 nonpipelined run of the same sequence.
c Compute the CPI for the nonpipelined 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 ie no transitiveindirect 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 x depends Line s x true data dependency.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
