• retagged by
574 views
0 0 votes
Consider the following code :

Load R1,M

Load R2,N

CMP R1,R2

JGE END

Store [300],R2

END: Store [300],R1

 

Assume that M=30 and N=25. The above sequence of instructions is to be executed on a pipelined processor with IF ,ID, OF, EX and WB stages. OF refers to operand fetch i.e register read of operand. Operand forwarding and static branch prediction with prediction not taken are considered. The IF, ID, OF and WB stages take 1 clock cycle each for all instructions. The EX stage takes 2 clock cycles for CMP instruction, and 1 clock cycle for all other instructions. The branch outcome is known after EX stage. Determine the number of clock cycles required for completion of execution of all instructions.

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
1 1 answer
467
467 views
BOB asked Oct 15, 2018
467 views
Assume branch instruction occurs 15% of the time and are predicted as not taken, while in practice they are taken 40% of the time with a penalty of 3 cycles. With forward...
0 0 votes
1 1 answer
635
635 views
Deepak9000 asked Nov 5, 2023
635 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,142 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
1 1 answer
786
786 views
Sagar475 asked Dec 26, 2021
786 views
Assume that we are using the classic MIPS five-stage(IF, ID, EX, MEM and WB) integer pipeling.