Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Architecture Metrics Reference
  • Workload Taxonomy for Architects
  • Architecture Glossary
  • Computer Architecture Cheatsheet
  • Pipeline Fundamentals14
  • Memory Hierarchy15
  • NoC and Interconnect Architecture6
  • Coherency and Memory Ordering9
  • Performance Analysis9
    • Performance Method: Counters, Top-Down and Triage
      • What a PMU Counts
      • CPI, IPC, MPKI and Derived Metrics
      • Multiplexing, Denominators and Trust
      • Top-Down Bottleneck Attribution
      • Freeze the Workload, One Experiment, Replay
    • Roofline and Tuning
  • Accelerator Architectures6
  • SoC Architecture Tradeoffs9
  • Architecture Interview Prep14
Loading lesson

‹Performance Method: Counters, Top-Down and Triage
  1. Topics
  2. Computer Architecture
  3. Performance Analysis
  4. Performance Method: Counters, Top-Down and Triage
  5. CPI, IPC, MPKI and Derived Metrics

Computer Architecture · All levels

CPI, IPC, MPKI and Derived Metrics

CPI, IPC, MPKI and bandwidth math with a worked example for every formula.

On this page

    CPI and IPC

    Instructions per cycle is IPC = instructions / cycles. Cycles per instruction is CPI = cycles / instructions, which equals 1 / IPC.

    Elapsed time follows from cycles and frequency: time = cycles / frequency. Assume a 3 GHz core retires 2.4e9 instructions in 3.0e9 cycles.

    Diagram
    IPC  = 2.4e9 inst / 3.0e9 cycles = 0.80
    CPI  = 3.0e9 cycles / 2.4e9 inst = 1.25
    time = 3.0e9 cycles / 3.0e9 cycles/s = 1.00 s

    CPI decomposes into a base plus one penalty term per miss class: CPI = CPI_base + sum(rate_i x penalty_i). Assume CPI_base 1.0, a 5 percent data-miss rate with 10-cycle penalty, and a 2 percent mispredict rate with 15-cycle penalty.

    Diagram
    CPI = 1.0 + 0.05 x 10 + 0.02 x 15
        = 1.0 + 0.50 + 0.30
        = 1.80

    Miss and branch rates

    Misses per kilo-instructions is MPKI = misses x 1000 / instructions. It stays comparable across runs of different length because instructions are the denominator.

    Assume 200,000 last-level misses and 150,000 branch mispredicts over 50 million instructions.

    Diagram
    LLC MPKI    = 200000 x 1000 / 50000000 = 4.0
    branch MPKI = 150000 x 1000 / 50000000 = 3.0

    Rate

    Formula

    Worked value

    Hit rate

    hits / accesses

    950000 / 1000000 = 0.95 (95 percent)

    Miss rate

    1 - hit rate

    1 - 0.95 = 0.05 (5 percent)

    LLC MPKI

    misses x 1000 / instructions

    4.0

    Branch MPKI

    mispredicts x 1000 / instructions

    3.0

    Latency and bandwidth

    Average memory access time is AMAT = hit_latency + miss_rate x miss_penalty. Assume a 2-cycle hit, a 4 percent miss rate, and a 120-cycle miss penalty.

    Sustained bandwidth is accesses/s x bytes/access, capped by the slowest of link, controller, and DRAM. Assume 312.5 million 64-byte accesses per second.

    Diagram
    AMAT = 2 + 0.04 x 120 = 2 + 4.8 = 6.8 cycles
    BW   = 312.5e6 x 64 B = 20.0e9 B/s = 20 GB/s

    Related topics

    • Memory bandwidth and latency

    Common mistakes

    Equal IPC can hide different stress patterns, so IPC alone never declares success. Always pair it with the stall composition from the top-down lesson.

    Common pitfall

    Comparing normalized counters without matching denominator semantics silently corrupts every ratio. MPKI over instructions, misses per access, and events per cycle answer different questions and never mix.

    Interview

    Likely probes: deriving one metric from another under pressure.

    • CPI is 1 / IPC, and time is cycles / frequency: three numbers that must agree.

    • MPKI pins misses to instructions so runs of different length stay comparable.

    • Bandwidth needs a measured sustained ceiling, never a peak marketing number.

    Check yourself A core retires 2.4e9 instructions in 3.0e9 cycles. What are IPC and CPI?

    IPC = 2.4 / 3.0 = 0.80 and CPI = 1 / 0.80 = 1.25. The calc block above shows each substitution.

    Check yourself Two runs report equal IPC but very different LLC MPKI. Which run stresses memory more, and why?

    The high-MPKI run. Equal IPC hides composition, and MPKI exposes the memory pressure that IPC averages away.

    Previous

    50 / 86

    Next: Multiplexing, Denominators and Trust

    Up next

    Up nextMultiplexing, Denominators and Trust

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Top-Down Bottleneck Attribution
    • Freeze the Workload, One Experiment, Replay