Question: Consider the following RISC-V loop in a machine without data pipeline forwarding and does not handle data hazards i.e. the programmer is responsible for data
Consider the following RISC-V loop in a machine without data pipeline forwarding and does not handle data hazards i.e. the programmer is responsible for data hazards by inserting NOP instructions where necessary.) :
addi x11,x12, 5
add x13,x11, x12
addi x14,x11, 15
add x15,x11, x11
Question) Assume that the register x11 is initialized to the value 11 and x12 is initially 12. What is the final value in the register x15?
Question) rewrite the code adding the necessary NOP instructions for correctness. What is the final values for registers x15 and x14 after the 4th instruction completes?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
