Question: Question 0 2 [ 4 + 4 + 2 = 1 0 marks, CLO 1 ] Consider the following RISC - V Assembly code that

Question 02[4+4+2=10 marks, CLO1]
Consider the following RISC-V Assembly code that is required to be executed on a classical 5-stage pipelined
processor.
add 15,12,11
lw13,4(15)
lw12,(2)
or13,15,13
sw13,(15)
a) List down all the hazards that are present in assembly code
b) Assume that pipeline implementation does not have any support for stalling and forwarding to resolve the
hazards. Rewrite the program by inserting the appropriate number of NOP instructions after each hazard for
proper execution. How many cycles will be required to execute this code?
c) Now assume that the hardware implements the forwarding from write back to execute, and memory to
execute stage. How many cycles will now be required to execute this code?
 Question 02[4+4+2=10 marks, CLO1] Consider the following RISC-V Assembly code that

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!