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
    • On-Chip Networks
      • Topology Families Compared
      • NoC Latency and Bandwidth Math
      • XY Routing and Deadlock Freedom
      • Credit Flow Control and Buffers
      • Arbitration Policies and QoS
      • NoC Triage Playbook
  • Coherency and Memory Ordering9
  • Performance Analysis9
  • Accelerator Architectures6
  • SoC Architecture Tradeoffs9
  • Architecture Interview Prep14
Loading lesson

‹On-Chip Networks
  1. Topics
  2. Computer Architecture
  3. NoC and Interconnect Architecture
  4. On-Chip Networks
  5. Arbitration Policies and QoS

Computer Architecture · All levels

Arbitration Policies and QoS

Fixed priority, round robin and weighted shares, starvation bounds and watchdogs.

On this page

    Four policies and their bounds

    Every arbiter answers two questions: what share each class gets, and how long any grant can wait. Only the second question bounds starvation.

    Policy

    Share under contention

    Worst-case wait

    Starves when

    Fixed priority

    All to the top live class

    Unbounded for the rest

    A high class bursts without pause

    Round robin

    Equal per live client

    3 grant slots for 4 clients

    Never by itself; idles on empty requests

    Weighted round robin 4:2:1:1

    4/8, 2/8, 1/8, 1/8 of link

    7 flit-times for the lowest class

    Weights mismatch the SLA for too long

    Age-based (oldest first)

    To the longest waiter

    Bounded by the oldest grant age

    Timestamps skew across routers

    Shares are not deadlines

    Weights set throughput shares, not latency bounds. A hard deadline needs the worst-case grant interval derived from weights plus quantum, with admission control holding offered load inside the plan.

    Diagram
    Link 32 GB/s shared with weights 4:2:1:1 (sum 8)
    class A: 4/8 * 32 = 16 GB/s; class B: 2/8 * 32 = 8 GB/s
    class C: 1/8 * 32 = 4 GB/s;  class D: 1/8 * 32 = 4 GB/s
    worst-case wait for class D = quanta ahead of it = (4+2+1) flit-times = 7 cycles = 7 ns at 1 GHz, 1 flit per cycle
    watchdog threshold = 3 * 7 = 21 cycles

    AXI carries QoS as 4-bit ARQOS and AWQOS sidebands, where a higher value means higher priority. The numbers are a hint, not a guarantee: the NoC maps them onto classes with real bounds.

    Shaping lives at injection

    A token bucket caps a noisy source before it enters the fabric. Tokens accrue at the allowed rate and each injected byte spends tokens; debt from a burst drains at the capped rate.

    Diagram
    Bucket 4 KB, rate 10 GB/s, sudden 16 KB burst
    excess = 16 - 4 = 12 KB; drain time = 12 KB / 10 GB/s = 1.2 us
    refill 1 KB per 100 ns tick -> a 4 KB line accumulates every 400 ns

    Common pitfall

    Two different credits share one word. Buffer credits guard downstream link storage and return per drained flit; token buckets cap source injection rate and refill on a timer. Tuning one when the other binds wastes a week.

    Warning

    A watchdog detects; it does not bound. The starvation bound comes from the arbitration policy, and the watchdog only fires when a wait crosses a multiple of that bound so firmware can act.

    Testbench

    The model below races fixed priority against round robin for 8 cycles with all four clients requesting: fixed priority must grant 8-0-0-0 while round robin grants 2-2-2-2.

    fixed_prio4.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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    module fixed_prio4 (
      input  logic [3:0] req,
      output logic [3:0] grant
    );
      always_comb begin
        grant = 4'b0000;
        if (req[0]) grant = 4'b0001;
        else if (req[1]) grant = 4'b0010;
        else if (req[2]) grant = 4'b0100;
        else if (req[3]) grant = 4'b1000;
      end
    endmodule
    
    module rr_arb4 (
      input  logic clk,
      input  logic rst_n,
      input  logic [3:0] req,
      output logic [3:0] grant
    );
      logic [1:0] ptr;
      logic [3:0] hi_mask;
      logic [3:0] masked;
      logic [3:0] g_hi;
      logic [3:0] g_lo;
      always_comb begin
        case (ptr)
          2'd0: hi_mask = 4'b1111;
          2'd1: hi_mask = 4'b1110;
          2'd2: hi_mask = 4'b1100;
          default: hi_mask = 4'b1000;
        endcase
      end
      assign masked = req & hi_mask;
      always_comb begin
        g_hi = 4'b0000;
        g_lo = 4'b0000;
        if (masked[0]) g_hi = 4'b0001;
        else if (masked[1]) g_hi = 4'b0010;
        else if (masked[2]) g_hi = 4'b0100;
        else if (masked[3]) g_hi = 4'b1000;
        if (req[0]) g_lo = 4'b0001;
        else if (req[1]) g_lo = 4'b0010;
        else if (req[2]) g_lo = 4'b0100;
        else if (req[3]) g_lo = 4'b1000;
      end
      assign grant = (|masked) ? g_hi : g_lo;
      always_ff @(posedge clk or negedge rst_n) begin
        if (!rst_n) ptr <= 2'd0;
        else if (|grant) begin
          case (grant)
            4'b0001: ptr <= 2'd1;
            4'b0010: ptr <= 2'd2;
            4'b0100: ptr <= 2'd3;
            default: ptr <= 2'd0;
          endcase
        end
      end
    endmodule
    

    Interview

    Likely probes: why static priority fails in production, and what the watchdog adds.

    • Sustained high-priority bursts starve lower classes even when average load looks low.

    • Verify QoS under adversarial mixed workloads; single-class benches miss contention phase alignment.

    • Maximum wait age per class shows unfairness fast; average grants per class hide it.

    Check yourself Class D waits 7 cycles worst-case under the weights above. Why is the watchdog set to 21, not 7?

    The bound assumes the plan holds. Three times the bound tolerates normal burst jitter while still catching a stuck arbiter long before software-visible failure.

    Check yourself A DMA flood correlates with missed CPU deadlines. Source throttle or arbiter retune first, and why?

    Prove source causality first with per-class traces, then throttle at injection: the noisy-neighbor fix lives at the source, because no arbiter shares fairly when one client never pauses.

    Related topics

    • NoC triage playbook

    • Memory bandwidth and latency

    • Credit flow control

    Previous

    38 / 86

    Next: NoC Triage Playbook

    Up next

    Up nextNoC Triage Playbook

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Topology Families Compared
    • NoC Latency and Bandwidth Math
    • XY Routing and Deadlock Freedom