edited by
941 views
0 votes
0 votes

consider a 4-stage pipeline (IF, ID, EX, WB) used to execute the following code. All the instructions are spending 1 cycle in all the stags but MUL takes 4 cyclesDiv takes 3 cycles in EX stages. The pipeline uses operand forwarding as an optimization

a- how many cycles are required to complete the program with optimization?

b- how many cycles are required to complete without optimization?

I1 : MUL  r0 , r1 , r2

I2 : DIV  r3 , r1 , r2

I3: SUB  r4, r3, r2

I4: ADD r5, r4, r1

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
2 answers
4