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 cycles. Div 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