Total clock cycles = Σ (count × CPI) = 400×1 + 300×3 + 200×2 + 100×3 = 400 + 900 + 400 + 300 = 2000 cycles.
Clock period at 500 MHz: \(T = \dfrac{1}{500 \times 10^6} = 2\ \text{ns}\).
1. CPU execution time = 2000 × 2 ns = 4 µs.
2. MIPS. Instructions = 400 + 300 + 200 + 100 = 1000, so average CPI = 2000 / 1000 = 2.
\(\text{MIPS} = \dfrac{f}{\text{CPI} \times 10^6} = \dfrac{500 \times 10^6}{2 \times 10^6} = 250\) (equivalently 1000 instructions / 4 µs = 250 million per second).
— rhs