Show the step-by-step execution using the tables below -EXCEL- (HW-based speculation).

What are the numbers of cycles to finish the first two iterations using the above two approached? Count the cycles from the first instruction being issued to the last instruction that finishes.

Consider the code below.


fld f0, 0(x1)

fmul.d f4, f0, f2

fsd f4, 0(x1)

fsub.d f4, f10, f14

addi x1, x1, 8

bne x1, x2, Loop // branches if x1 /= x2

Assume the following latencies:

(a) fld/fsd: 1 cycle

(b) fsub.d: 2 cycles

(c) addi/bne: 1 cycle

(d) fmul.d: 6 cycles

Assume that branches are predicted as taken. Execute the above code for two iterations using

b) Hardware-based speculation

Hardware based speculation worksheet

丘 0 Al A Iteration Reerder Buffer Entry Busy Instruction State Reservation Stations Register Status

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now