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
  • Accelerator Architectures6
  • SoC Architecture Tradeoffs9
  • Architecture Interview Prep14
    • Interview Method and Worked Scenarios
      • Architecture Whiteboard Framework
      • Scenario: Cache MPKI Storm
      • Scenario: NoC Deadlock Under Load
      • Scenario: Accelerator Starvation
      • Scenario: Coherency Traffic Storm
      • Validation, PPA and the Close
    • Architecture Interview Q&A Bank
Loading lesson

‹Interview Method and Worked Scenarios
  1. Topics
  2. Computer Architecture
  3. Architecture Interview Prep
  4. Interview Method and Worked Scenarios
  5. Scenario: NoC Deadlock Under Load

Computer Architecture · All levels

Scenario: NoC Deadlock Under Load

Overlapping DMA and coherent traffic deadlock, fixed with classes and QoS.

On this page

    Reproduce the exact overlap

    Simulation deadlocks only when GPU DMA bursts overlap CPU coherent traffic. Either stream alone drains, so the bug lives in their interaction.

    The offered load tells the story. Assume one 32 GB/s link, 20 GB/s of coherent traffic and 25 GB/s of DMA bursts: 45 GB/s offered against 32 GB/s of capacity.

    Traffic class (storm)

    Share of flits

    Coherent data

    44%

    DMA bulk

    38%

    Responses

    12%

    Control

    6%

    1. 0-5 min: capture the traffic mix and the deadlock signature.

    2. 5-15 min: list topology, routing rule, buffer classes and credit loops.

    3. 15-25 min: draw the wait cycle or the starvation pattern.

    4. 25-35 min: propose class separation plus QoS or routing fixes.

    5. 35-45 min: prove the fix with a deadlock check and a regression run.

    Classes prevent protocol deadlock

    A request that cannot sink blocks its buffer. If a response needs that same buffer to complete the request, the pair waits forever.

    Virtual channels break routing deadlock only. Protocol deadlock needs separate buffer classes for requests and responses, so responses always drain.

    Wait cycle through one shared buffer fed by two queues.
    One shared buffer lets requests and responses block each other, which is the cycle to break.

    Size buffers with Little's law

    Each 64-byte line travels as four 16-byte flits. Buffers must cover the credit round trip at the injection rate.

    Little's law gives outstanding flits as rate times latency: 0.25 x 20 = 5 flits, so provision 8 buffers. The credit model below enforces the same rule.

    credit_mgr.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    module credit_mgr (
      input  logic       send,
      input  logic       giveback,
      input  logic [7:0] count_in,
      output logic [7:0] count_out,
      output logic       denied
    );
      parameter int MAXC = 8;
      always_comb begin
        denied = send && !giveback && (count_in == 8'd0);
        count_out = count_in;
        if (send && !giveback) begin
          if (count_in != 8'd0) count_out = count_in - 8'd1;
        end else if (giveback && !send) begin
          if (count_in < MAXC) count_out = count_in + 8'd1;
        end
      end
    endmodule
    

    The testbench proves credit discipline. Five sends move 8 to 3, two returns move 3 to 5, five sends drain to 0, one more send is refused, and three returns restore 3.

    Fix with classes plus QoS

    Split request and response buffers first, then cap the bully. Capping DMA at 10 GB/s leaves 20 + 10 = 30 GB/s against 32 GB/s of capacity.

    Diagram
    Offered: 20 + 25 = 45 GB/s against a 32 GB/s link, backlog grows
    Capped:  20 + 10 = 30 GB/s against a 32 GB/s link, backlog drains
    Buffers: 0.25 flits per cycle x 20 cycles = 5 flits, provision 8

    Common pitfall

    Adding links or channels without a class split preserves the cycle. More bandwidth moves the same deadlock to a higher load.

    Interview

    Likely traps and the calm replies.

    • Trap: more virtual channels fix it. Reply: channels break routing cycles, classes break request-response cycles.

    • Trap: ignore writebacks. Reply: coherent writebacks are responses that must drain.

    • Trap: skip the formal check. Reply: a deadlock freedom proof ships with the fix.

    Check yourself Responses have their own class and buffers, yet the system still hangs under overlap. What next?

    Suspect QoS starvation: bulk DMA crowds latency-critical responses within the class. Check per-class occupancy and add a rate cap.

    Check yourself Why does capping DMA at 10 GB/s beat adding 13 GB/s of link capacity?

    The cap removes the overload at its source with no area change. The link upgrade keeps the shared-buffer cycle intact.

    Related topics

    • On-chip networks

    • Performance method

    Previous

    75 / 86

    Next: Scenario: Accelerator Starvation

    Up next

    Up nextScenario: Accelerator Starvation

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Architecture Whiteboard Framework
    • Scenario: Coherency Traffic Storm
    • Validation, PPA and the Close