Question: Consider the following code: addi x5, x0, 32 srli x6, x5, 2 add x28, x6, x0 addi x29, x0, 12 Loop: addi x28, x28, 3
Consider the following code: addi x5, x0, 32 srli x6, x5, 2 add x28, x6, x0 addi x29, x0, 12 Loop: addi x28, x28, 3 bge x28, x29, Loop a)Please run the program in Venus simulator. How many iterations the Loop executed? b)We can assume that the processor supports the 5-stage pipeline. How many cycles it would take for the program to execute without forwarding and reordering (by just adding stalls)? c)Please draw the execution table for one iteration and identify the hazards and their types. d)We can assume that the processor can handle the hazards using reordering, forwarding and adding stalls. What is the minimum number of cycles to execute one iteration of the program? Please explain what combination of hazard resolution techniques must be used to achieve this and how. Please draw the execution table to justify your explanation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
