Question: electrical engineer The following codes run on the five - stage pipelined datapath. For each piece of code, answer the following questions. a ) Without

electrical engineer
The following codes run on the five-stage pipelined datapath. For each piece of code, answer
the following questions.
a) Without forwarding, insert the necessary number of nops for the code to execute correctly.
b) With the forwarding unit available (only supports forwards MEM-> EX and WB->EX), show how
the code will execute. Mention the data thats forwarded between the stages. Use nops only when
necessary.
Code 1:
sub t1, t2, t3
add t1, t4, t5
or t4, t2, t6
Code 2:
and t2, t5, t1
sub t3, t2, t0
nor t7, t1, t5
Code 3:
and t2, t5, t1
sub t3, t2, t0
nor t7, t2, t1
Code 4:
lw t1,22(t0)
and t2, t1, t3
Code 5:
lw t1,22(t0)
sub t6, t0, t2
xor t3, t1, t5

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 Programming Questions!