Question 1 12 pts
In-Order Pipelines. A processor has expected CPI = 1 for programs with no hazards. Caches remove the structural memory hazard. Branches are converted to predication, removing the control hazard. For each program, measure expected CPI.
| Load (%) | Store (%) | ALU (%) | % of all instructions dependent on the instruction in front of them | Expected CPI |
|---|---|---|---|---|
| 15 | 15 | 70 | 10 | ? |
| 25 | 25 | 50 | 20 | ? |
| 40 | 40 | 20 | 30 | ? |
Only a load followed immediately by a dependent instruction causes the remaining one-cycle load-use stall (a RAW hazard not coverable by forwarding). Therefore:
Expected CPI = 1 + LoadFraction * DependentFraction * 1-cycle stall| Load fraction | Dependent fraction | CPI calculation | Expected CPI |
|---|---|---|---|
| 0.15 | 0.10 | 1 + 0.15 * 0.10 | 1.015 |
| 0.25 | 0.20 | 1 + 0.25 * 0.20 | 1.05 |
| 0.40 | 0.30 | 1 + 0.40 * 0.30 | 1.12 |