• retagged by
1,637 views
1 1 vote
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 ?

1 Answer

0 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.

Position:
Show:

Related questions

0 0 votes
2 2 answers
1.9k
1.9k views
Abhilash Mishra asked Jan 2, 2019
1,937 views
Data forwarding is used to avoid which type of conflict??(1) RAW(2) WAR(3) WAW(4) RAR
0 0 votes
1 1 answer
636
636 views
Deepak9000 asked Nov 5, 2023
636 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...
1 1 vote
1 1 answer
2.1k
2.1k views
Chaitanya Kale asked Jan 30, 2023
2,144 views
Consider 4-stage (IF, ID, EX, WB) pipeline used to execute the following code. All instructions are spending are spending one cycle on all the stages but ALU instructions...
0 0 votes
0 0 answers
1.8k
1.8k views
Na462 asked Sep 3, 2018
1,804 views
I dont understand here:- Load R2,(R3)1. Fetch2. Decode: Rz < - Address of R3 given in instruction3. Compute : NOP4. Memory Memory address < -[RZ] , read memory, Ry < -Mem...