retagged by
701 views
7 votes
7 votes
Consider a processor with an in-order five-stage pipeline (IF, ID, EX, MEM, and WB) with clock cycle time $10 \mathrm{~ns}$. This processor is executing a program in which $30 \%$ of the instructions are conditional branch instructions, $10 \%$ of the instructions are unconditional branch instructions. $40 \%$ of the conditional branches are taken. Branch target is available at the end of $2$nd stage for unconditional branches and at the end of $3$rd stage for conditional branches. Assume that the instruction following the branch is always started and ignored if the branch is taken. What is the throughput (Million instructions per second) of the system?
retagged by

1 Answer

Best answer
7 votes
7 votes

uncondtional branch instruction penalty = 1 cycle (drop 1 instruction)

condtional branch instruction penalty = 2 cycle (drop 2 instructions, if taken)

 

CPI = normal instructions excution + uncondtional branch instruction penalty + conditional branch instruction penalty

=> CPI = $1 + 0.1(1) + 0.3(0.4*2) = 1.34$

 

number of instructions per second = $1/(CPI * cycle time)$

= $1/(1.34 * 10ns)$

= $1/13.4ns$

= 109/13.4

 

since we want number of instruction per second in millions:

109/(13.4 * 106)

= 1000/13.4

= 74.626… $\approx$ 74.63

 

selected by
Answer:

Related questions