Work it through
A request arrives just before a periodic poll
A checker that only compares two completion snapshots may blame a request that has existed for one cycle.
An armed consecutive-cycle counter gives the newly pending work its full bound.
Your next page is on its way.
Progress and liveness
Distinguish a quiet but healthy design from a circular wait by tracking accepted work, completions, activity, blocked IDs, and flow-control credits.

A worked mechanism
A long idle interval must not spend the timeout budget of a newly accepted request.
pending=0; age=0
No completion is expected, so the progress window is disarmed.
pending=1; age=0
Arm the window at this sampled boundary.
age=N → progress alarm
A completion resets this aggregate window; per-request age remains a separate check.
Work it through
A checker that only compares two completion snapshots may blame a request that has existed for one cycle.
An armed consecutive-cycle counter gives the newly pending work its full bound.
A timeout is evidence of missing bounded progress, not proof of a circular wait. Legal latency assumptions must be stated.
Test arrival after long idle, completion at the boundary, reset while pending and ongoing internal activity with no external completion.
Inspect the watchdog boundary, then use dependencies and credits to distinguish circular wait from motion without completion.
Check outstanding work + completion delta + elapsed window together.
| Signal / state | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| ELAPSED | 0 | 4999 | 5000 | 5000 |
| OUTSTANDING | 37 | 37 | 37 | 37 |
| COMPLETED | 91 | 91 | 91 | 91 |
| EVIDENCE | snapshot | waiting | timeout | A ↔ B |
Record accepted work, completed work, and the outstanding set before starting the observation window.
Preserve transaction IDs and dependency state.
start_completions = completed;
window_start = cycle;Example contract. The example observes a 5,000-cycle window with 128 accepted and 91 completed transactions (91 accepted in the idle scenario). Monitoring is enabled after initialization. A progress timeout is a trigger for diagnosis, not automatically proof of deadlock. Checkpoints show selected state changes, not equally spaced simulation cycles.
task run_phase(uvm_phase phase);
longint unsigned last_completed = 0;
int unsigned stalled_cycles = 0;
bit was_pending = 0;
forever begin
@(posedge vif.clk);
// Counters are stable sampled monitor state at this clock edge.
if (!vif.rst_n || in_flight_count == 0 || !was_pending ||
trans_completed_count != last_completed)
stalled_cycles = 0;
else
stalled_cycles++;
if (stalled_cycles == 5000) begin
`uvm_error("PROGRESS_TIMEOUT", "Outstanding work made no progress for 5000 cycles")
dump_debug_info();
end
last_completed = trans_completed_count;
was_pending = vif.rst_n && in_flight_count > 0;
end
endtask
function void dump_debug_info();
foreach (pending_ids[id]) begin
`uvm_info(
"DEADLOCK_DEBUG",
$sformatf("ID %0d is still waiting for response", id),
UVM_LOW
)
end
endfunctionThe window begins when pending work is first observed and restarts after a completion. A request arriving at the end of a long idle interval therefore receives its full window. Reset and empty state clear the age. This is a no-progress alarm; the pending-ID dump and dependency graph establish its cause.
The watchdog compares accepted work, completed work, dependency progress, and transaction age so livelock is not mistaken for useful motion.
in_flight > 0 ∧ completions unchanged ∧ dependency has no progress → dump pending IDs and credits
Progress is judged from accepted work, completed work, and outstanding ownership rather than elapsed simulation time alone.
Observe component activity, such as monitor write() calls, within a configured heartbeat window.
Track the delta between accepted requests and completed responses together with a no-progress timer.
| Component | Responsibility | Required change |
|---|---|---|
| Scoreboard | Progress tracking | Maintain a counter of items_in_flight and the pending-ID set. |
| Environment | Timeout watchdog | Run a timer that resets only when a transaction completes. |
| Monitor | Activity heartbeat | Trigger an event every time a valid pin-level handshake is observed. |
task run_phase(uvm_phase phase);
longint unsigned last_completed = 0;
int unsigned stalled_cycles = 0;
bit was_pending = 0;
forever begin
@(posedge vif.clk);
// Counters are stable sampled monitor state at this clock edge.
if (!vif.rst_n || in_flight_count == 0 || !was_pending ||
trans_completed_count != last_completed)
stalled_cycles = 0;
else
stalled_cycles++;
if (stalled_cycles == 5000) begin
`uvm_error("PROGRESS_TIMEOUT", "Outstanding work made no progress for 5000 cycles")
dump_debug_info();
end
last_completed = trans_completed_count;
was_pending = vif.rst_n && in_flight_count > 0;
end
endtask
function void dump_debug_info();
foreach (pending_ids[id]) begin
`uvm_info(
"DEADLOCK_DEBUG",
$sformatf("ID %0d is still waiting for response", id),
UVM_LOW
)
end
endfunctionThe window begins when pending work is first observed and restarts after a completion. A request arriving at the end of a long idle interval therefore receives its full window. Reset and empty state clear the age. This is a no-progress alarm; the pending-ID dump and dependency graph establish its cause.
Deadlock is a total stall. Livelock is a busy state with no forward progress. Compare internal state-machine toggles with externally visible data completions.
Use negative stimulus in the driver and force READY low forever during an active burst. Require the watchdog to fire at the exact predicted cycle.
A credit leak occurs when the DUT does not return a credit. Run a long soak test and watch whether the maximum sustainable bus bandwidth slowly drops.