A computer with a 5 stage pipeline is measured and has the f
A computer with a 5 stage pipeline is measured and has the following characteristics Instruction Type % of instructions. Avg. stall cycles/instructions Branches .3 .7 Loads&Stores; .2 .2 ALU ops .4 0 Other .1 .2 what is the average CPI for the computer? What is the speedup (compared to an unpipelined machine) for this machine?
Solution
Answer:
1)What is the average cpi for the computer?
instruction type % of instruction avg,stall cycle/instruction
branches .3 .7
loads& store .2 .2
ALU OPS .4 .0
OTHERS .1 .2
Result:
CPI=(.3*.7+.2*.2+.4*.0+.1*.2)=0.27
2) what is speedup for this machine?
If you want calculate speedup your machine follow the below equation
We can also measure speedup in instructions per cycle (IPC), which is a throughput and the inverse of CPI. Using the speedup formula gives.
Speedup = IPC/CPI
Here IPC=1.1, CPI=0.27
Speedup = IPC/CPI = 1.1/0.27 = 4.07
| speedup = n = performent A/performence B = Execution Time B/Execution Time A |
