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. Top-Down Bottleneck Attribution

Computer Architecture · All levels

Top-Down Bottleneck Attribution

Slot-based top-down attribution with a worked four-bucket breakdown that sums to 100 percent.

On this page

    Slots, not cycles

    A W-wide core offers W issue slots per cycle, so slots = cycles x width. Top-down attribution partitions slots, never cycles, into exclusive buckets.

    The four buckets are retiring, frontend bound, bad speculation, and backend bound. Backend bound splits further into core bound and memory bound when the evidence supports it.

    Percentages partition the slot total and must sum to 100 percent, stating any rounding. Overlapping contributor lists are labeled as overlapping, never as shares.

    Worked four-bucket breakdown

    Assume a 4-wide core at 1 GHz running 1e9 cycles, hence 4.0e9 slots. Measured shares are 35 percent retiring, 20 percent frontend bound, 10 percent bad speculation, 15 percent backend core, and 20 percent backend memory.

    Diagram
    slots total = 1.0e9 cycles x 4 = 4.0e9 slots
    retiring  35% -> 1.40e9 slots
    frontend  20% -> 0.80e9 slots
    bad-spec  10% -> 0.40e9 slots
    BE core   15% -> 0.60e9 slots
    BE memory 20% -> 0.80e9 slots
    sum = 35 + 20 + 10 + 15 + 20 = 100%
    IPC = 1.40e9 retire slots / 1.0e9 cycles = 1.40
    CPI = 1 / 1.40 = 0.714 (rounded)

    Backend bound totals 35 percent, and memory is 20 of those 35 points, about 57 percent of the backend. Memory is therefore the first hypothesis, not the verdict.

    One total splitting into five bucket shares.
    Slot partition of the worked example: five exclusive shares of one total.

    Resolving conflicting counters

    One counter says memory bound while another says backend idle. Resolve the conflict with one experiment that moves only one cause, such as halving the working set or pinning the frequency.

    Removing every backend-memory slot would at most lift IPC to (35 + 20) / 100 x 4 = 2.20 from 1.40. That bound sizes the prize before any work starts.

    Diagram
    IPC ceiling = (35 + 20) / 100 x 4 = 0.55 x 4 = 2.20
    headroom  = 2.20 - 1.40 = 0.80 IPC (upper bound, not a promise)

    Common pitfall

    Stacked stall bars that sum past 100 percent double-count overlapping causes. Repartition into exclusive slot buckets first, then rank.

    Interview

    Likely probes: defending a top-down ranking on a whiteboard.

    • Slots sum to 100 percent, so the dominant bucket is arithmetic, not opinion.

    • Each bucket names its falsifying experiment before any fix is proposed.

    • The ceiling calculation bounds the gain, which stops oversized fixes.

    Check yourself Why must top-down shares sum to 100 percent?

    They partition one exclusive slot total. A sum past 100 proves overlapping categories were counted twice.

    Check yourself Backend memory holds 20 of 100 slot points. What is the most IPC could gain if all of it retired instead?

    0.80 IPC. The ceiling is (35 + 20) / 100 x 4 = 2.20 versus 1.40 today, an upper bound only.

    Testbench

    A combinational slot classifier and a testbench that prove the worked split sums to 100 slots with IPC 1.4.

    topdown_classify.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    module topdown_classify (
      input  logic [2:0] code,
      output logic is_retire,
      output logic is_front,
      output logic is_badspec,
      output logic is_core,
      output logic is_mem
    );
      always_comb begin
        is_retire = 1'b0;
        is_front = 1'b0;
        is_badspec = 1'b0;
        is_core = 1'b0;
        is_mem = 1'b0;
        case (code)
          3'd0: is_retire = 1'b1;
          3'd1: is_front = 1'b1;
          3'd2: is_badspec = 1'b1;
          3'd3: is_core = 1'b1;
          3'd4: is_mem = 1'b1;
          default: begin end
        endcase
      end
    endmodule
    

    Related topics

    • Roofline and tuning

    Previous

    52 / 86

    Next: Freeze the Workload, One Experiment, Replay

    Up next

    Up nextFreeze the Workload, One Experiment, Replay

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • What a PMU Counts
    • CPI, IPC, MPKI and Derived Metrics