Part 6 · Agents & Protocol IP · Intermediate
Arbitration Policies: Fairness, Priority, and Starvation Control
Choosing and validating sequencer arbitration modes for throughput, determinism, and starvation resistance.
Arbitration objectives
Arbitration policy influences both performance and debug repeatability. The right policy depends on workload goals: strict priority for urgent traffic, round-robin for fairness, or weighted/randomized mixes for realistic contention.
[SEQ] policy objectives
fairness:
avoid long-term starvation
latency:
reserve fast service for critical traffic
throughput:
keep driver continuously fed
reproducibility:
policy decisions should be diagnosable with logs/counters[UVM] common arbitration styles
FIFO/round-robin:
balanced fairness and simple reasoning
strict priority:
fast high-priority response, starvation risk
weighted/random:
tunable realism, requires stronger observabilityPick policy according to explicit verification objective, not default habit.
Instrument grant statistics from day one for fairness visibility.
Document starvation assumptions per policy in testplan notes.
Priority and fairness tuning
Even with built-in sequencer modes, projects often need conventions around sequence priorities, lock usage, and max consecutive grants to avoid starvation under stress.
class qos_seq extends uvm_sequence #(bus_item);
`uvm_object_utils(qos_seq)
int unsigned qos_prio = 100;
task pre_body();
set_priority(qos_prio);
endtask
task body();
bus_item req;
forever begin
req = bus_item::type_id::create("req");
start_item(req);
assert(req.randomize());
finish_item(req);
end
endtask
endclass[SEQ] starvation mitigation patterns
pattern A:
cap high-priority burst length with test-level pacing
pattern B:
periodically yield via wait cycles in dominant sequences
pattern C:
weighted random arbitration + minimum-share checks
pattern D:
separate urgent and bulk phases in scenario design[SEQ][UVM] grant telemetry to track
per-sequence counters:
req_count
grant_count
avg_wait_cycles
max_wait_cycles
global:
arbitration decisions by policy classMeasure wait-cycle distributions, not only total grants.
Combine policy tuning with scenario-level pacing strategies.
Treat starvation tolerance as a testbench contract, not an accident.
Arbitration validation walkthrough
Validate policy behavior under controlled contention tests that use fixed seeds and known traffic profiles. This isolates policy effects from random protocol noise.
[SEQ] contention validation plan
1) launch low/med/high priority sequences together
2) run fixed-duration arbitration window
3) collect per-sequence grant/wait metrics
4) compare against expected fairness/latency envelope
5) repeat with random seed sweep once deterministic baseline passestask check_arbitration_health(seq_metrics_t m[$]);
foreach (m[i]) begin
if (m[i].grant_count == 0)
`uvm_error("ARB_STARVE", $sformatf("%s got zero grants", m[i].name))
if (m[i].max_wait_cycles > 1000)
`uvm_warning("ARB_WAIT", $sformatf("%s max wait=%0d", m[i].name, m[i].max_wait_cycles))
end
endtask[SEQ][UVM][AGT] debug readout example
seqA(high): grants=500 avg_wait=2
seqB(med) : grants=220 avg_wait=14
seqC(low) : grants=120 avg_wait=41
interpretation:
priority shaping works, but seqC delay threshold should be reviewedKey takeaways
Arbitration policy is a first-class verification tuning knob.
Fairness and latency goals must be explicit and measurable.
Grant and wait metrics are essential for detecting starvation early.
Controlled contention tests provide deterministic arbitration confidence.
Common pitfalls
Relying on default arbitration without policy validation under load.
Using strict priority without any starvation mitigation strategy.
Judging fairness by eye instead of metric thresholds.
Blaming driver timing for issues caused by sequencer grant policy.