retagged by
461 views
2 votes
2 votes
The instruction pipeline of RISC processor has 200 instruction in which 100 are performing addition, 25 performing division and 75 are performing multiplication, where Execution state for addition take 1 clock, multiplication take 3 clock cycles and division take 5 clock cycles. Assume pipeline has 5 stages IF, ID EX, MA and WB and their is no data and control hazard. The number of clock cycles required for execution of sequence of instruction are ________.

my ans is 354 where iam wrong.

approch  totel 200 in which (100 add having 1 cc)  +(25*5-1) +(75*(3-1))=354
retagged by

2 Answers

Best answer
0 votes
0 votes
Lets consider that every instruction takes one cycle for execution .

As there are 200 instructions and 5 stages so (k+n-1) clock cycles for the execution = 5+200-1 = 204 CC.

Now consider the fact that it requires 5 clock cycles for division and 3 clock cycles for multiplication . there are extra 4 clock cycles due to division and 2 clock cycles due to multiplication .

Hence there are 25*4 = 100 stall cycles due to Division and 75*2 = 150 stall cycles due to mutiplication.

Total Cycles = 204+100+150 = 454 .
selected by
0 votes
0 votes

There are total 200 Instruction

Total No Of cycle Required : (5+(200-1))+75*2+25*4 => 454

Related questions

2 votes
2 votes
0 answers
3
loki2023 asked Aug 23, 2022
347 views
Consider the following algorithm,Dosomething( x, n){m= n, temp= 1,z= x;while(m>0) do{while((m mod z)=0) do{m= Floor(m/2);z=z^2;}m = m-1, temp= temp* z;}return temp;}The c...