retagged by
795 views
1 votes
1 votes
Consider the following sequence of instructions executed on the five-stage pipelined processor:
I1: lw $1, 40($6)
I2: add $2, $3, $1

I3: add $1, $2, $6
I4: sw $2, 20($4)
I5 : and $1, $1, $4
Assuming there is no forwarding, calculate the number of clock cycles needed to execute above program ?
retagged by

1 Answer

0 votes
0 votes
WB         I1       I2       I3       I4 I5            
M       I1       I2       I3       I4 I5              
EX     I1       I2       I3       I4 I5                
ID   I1       I2       I3       I4 I5                  
IF I1 I2 I3 I4 I5                                      

I2 depend on I1.

I3 depend on I2

I3 and I4 are also dependent

I5 Depend on I1

So total 18 Clock cycles will be Required Without operand forwarding.

Related questions

0 votes
0 votes
2 answers
1
0 votes
0 votes
1 answer
2
Deepak9000 asked Nov 5, 2023
242 views
I have a Self doubt question on Operand Forwarding . The data forwarded should be done in EX-EX stage or Mem-EX ? Which one to follow and when ?Using EX-EX we require les...