Skip to content

UVM

Predictors

The component that produces the expected — the predictor: how it observes the input, models the DUT's intended input-to-output transformation, computes the expected result for the scoreboard, and why a stateful predictor must mirror the DUT's state exactly.

Scoreboards · Module 18 · Page 18.2

The Engineering Problem

The scoreboard compares the observed result against an independently computed expected (Module 18.1). But the scoreboard doesn't compute the expected — it receives it. Something has to produce the expected stream: take each input the DUT received, apply the DUT's intended function, and compute what the output should be. That something is the predictor. Building one raises real questions: where does it get its input (the stimulus? the input monitor?), what does it model (the intended input-to-output transformation), and — the hard part — what about state? A combinational DUT is a pure function (output depends only on input), and a predictor is easy. But most real DUTs are stateful — registers, memories, accumulators, pipelines — so the output depends on the input and the internal state, and the predictor must maintain the same state and update it exactly as the DUT intends. Get the state wrong and the predictor's expected is wrong — producing a flood of false mismatches that look like a DUT failure but are predictor bugs. The problem this chapter solves is producing the expected: the predictor that models the intended behavior to compute it.

A predictor is the component that computes the expected result by modeling the DUT's intended input-to-output transformation. It observes the input (subscribing to the input-side monitor, so it predicts for exactly what the DUT received), applies the model of intended behavior (a function for a combinational DUT; a state machine for a stateful one), and broadcasts the expected output transaction to the scoreboard — which compares it against the actual output (Module 18.1). It works in transactions, abstractly (TLM, Module 16) — independent of the DUT's implementation. The crucial complexity is state: a stateful predictor must maintain state that exactly mirrors the DUT's intended stateupdating on every relevant input, resetting when the DUT resets — because the expected output depends on it, and a state divergence makes all subsequent predictions wrong. The predictor is the DUT's shadow: fed the same input, it computes what the output should be, in parallel, independently. This chapter is the predictor: its role and structure, the input-to-output model, the statefulness, and the state-divergence bug.

What is a predictor — the component that observes the input and computes the expected output by modeling the DUT's intended input-to-output transformation — and why must a stateful predictor maintain state that exactly mirrors the DUT's?

Motivation — why a predictor, and why state is hard

The predictor exists to produce the expected, and its difficulty is state. The reasons:

  • The expected must be produced, transaction by transaction. The scoreboard needs an expected for each input — computed, not known. The predictor is the component that computes it, per input, automatically.
  • It must model the intended input-to-output transformation. To predict the output, the predictor must embody the DUT's intended functiongiven an input (and state), what output should result. This is the specification, in executable form.
  • It predicts from the actual observed input. The predictor predicts for exactly what the DUT received — so it observes the input (the input-side monitor), not the stimulus intent — because if the input was transformed in flight, the prediction must use the actual input.
  • State is what makes it hard. A combinational DUT is a pure function — easy. But most DUTs are stateful: the output depends on the input and the internal state. The predictor must maintain the same state and update it exactly as the DUT intendsor its predictions drift.
  • State divergence is silent and catastrophic. If the predictor's state diverges from the DUT's intended state (a missed update, an unhandled reset), every subsequent prediction is wrong — a flood of false mismatches that look like a DUT failure but are the predictor's fault.

The motivation, in one line: the scoreboard needs an expected per input, which must be computed by a predictor that models the DUT's intended input-to-output transformationeasy for a combinational DUT (a pure function) but hard for a stateful one, where the predictor must maintain state that exactly mirrors the DUT's, because a state divergence makes all later predictions wrong, a silent, catastrophic source of false mismatches.

Mental Model

Hold the predictor as the DUT's shadow — a parallel model fed the same input, computing what the output should be:

A predictor is the DUT's shadow: a parallel model that, fed the same input as the DUT, computes what the output should be — independently, in transactions, embodying the intended behavior. For a stateful DUT, the shadow must carry the same internal state and update it in lockstep, or it drifts away from what the DUT should be doing. Picture the DUT and, beside it, a shadow — a parallel model (the predictor) that receives the same inputs. As each input arrives, the shadow computes what the output should beapplying the intended function (the spec) — independently of what the real DUT actually produces. The scoreboard then compares the real DUT's output against the shadow'smatch (DUT correct) or differ (a bug). For a combinational DUT — a pure function (output depends only on the current input) — the shadow is simple: apply the function to each input. But for a stateful DUT — one with registers, memory, accumulators (output depends on the input and the history) — the shadow must carry the same internal state and update it in lockstep with the DUT's intended updates: every input that changes the DUT's state must change the shadow's state the same way, and a reset of the DUT must reset the shadow. If the shadow's state ever drifts from the DUT's intended state — it misses an update, or fails to reset — then from that point, the shadow is computing for a different state, so every prediction is wrong, and the scoreboard flags mismatch after mismatchblaming the DUT when the shadow is the one that wandered off. The shadow is only useful if it stays in lockstepsame input, same state, same updates — so its output is truly "what the DUT should produce."

So the predictor is the DUT's shadow: a parallel model, fed the same input, computing what the output should be via the intended function, independently. For a stateful DUT, the shadow must carry the same state and update it in lockstepevery state change mirrored, every reset honored — or it drifts, and all its predictions go wrong. The scoreboard compares the real DUT against the shadow; the shadow is trustworthy only while it stays in lockstep. Run the shadow on the same inputs, keep its state in lockstep, and its output is what the DUT should produce.

Visual Explanation — the predictor in the checking architecture

The defining picture is the checking architecture: the input monitor feeds the predictor, the predictor produces the expected, and the scoreboard compares it against the actual from the output monitor.

The input monitor feeds the predictor, which computes the expected for the scoreboard to compare against the actualobservedinputexpected(computed)actual (DUToutput)compare → pass / bugInput monitorwhat the DUT receivedPredictormodels intended fn → expectedScoreboardcompares expected vs actualOutput monitorwhat the DUT producedVerdictpass / bug12
Figure 1 — the predictor in the checking architecture. The input-side monitor observes what the DUT received and sends it to the predictor. The predictor models the intended input-to-output transformation and computes the expected output, which it sends to the scoreboard. The output-side monitor observes what the DUT actually produced and sends it (the actual) to the scoreboard. The scoreboard compares expected against actual. The predictor sits between the input observation and the scoreboard's expected input — it is the source of the expected stream.

The figure shows the predictor's place in the checking architecture. The input monitor observes what the DUT received and sends it to the predictor. The predictor models the intended input-to-output transformation and computes the expected output, which it sends to the scoreboard. The output monitor observes what the DUT actually produced and sends that (the actual) to the scoreboard. The scoreboard compares expected against actual → the verdict. The crucial reading is the predictor's position: it sits between the input observation and the scoreboard's expected input — it is the source of the expected stream. The brand-colored predictor is the active producer of the expected; the success-colored scoreboard is the comparator. Note the two monitors: an input-side one (feeding the predictor) and an output-side one (feeding the scoreboard's actual) — the input monitor tells the predictor what to predict from, and the output monitor tells the scoreboard what the DUT did. This is the full checking pipeline: observe the inputpredict the expected output (predictor) → observe the actual output (output monitor) → compare (scoreboard). The predictor is what makes the expected exist: without it, the scoreboard would have an actual but no expected to compare against (Module 18.1's gap). The diagram is the architecture of automated checking with the predictor in place: the predictor transforms the observed input into the expected output, feeding the expected side of the scoreboard, so the scoreboard can render the verdict — the predictor is the expected-producing engine of the checker.

RTL / Simulation Perspective — the predictor computes the expected

In code, the predictor receives input transactions (via an analysis subscriber), applies the model to compute the expected output, and broadcasts it. The code shows a stateful predictor.

a predictor: receive input, apply the model (with state), broadcast the expected output
Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
class my_predictor extends uvm_subscriber #(in_txn);   // subscribes to the INPUT monitor's stream
  `uvm_component_utils(my_predictor)
  uvm_analysis_port #(out_txn) expected_ap;            // broadcasts the EXPECTED output to the scoreboard
  logic [31:0] accum;                                   // STATE: mirrors the DUT's intended state
 
  function void build_phase(uvm_phase phase); expected_ap = new("expected_ap", this); endfunction
 
  // reset the predictor's state when the DUT resets — or its state diverges (DebugLab)
  function void reset();  accum = 0;  endfunction
 
  // for EACH input, model the intended behavior and produce the expected output
  function void write(in_txn t);                        // called per input transaction
    out_txn e = out_txn::type_id::create("e");
    accum = accum + t.data;                              // UPDATE state exactly as the DUT intends
    e.result = accum;                                    // EXPECTED output = f(input, state)
    expected_ap.write(e);                                // broadcast the expected → scoreboard
  endfunction
endclass
// the predictor is the DUT's SHADOW: same input, same state updates → expected = what the DUT SHOULD do.

The code shows a stateful predictor. It subscribes to the input monitor's stream (uvm_subscriber #(in_txn) — so its write is called for each input the DUT received) and has an analysis port (expected_ap) to broadcast the expected output to the scoreboard. It maintains state (accum) that mirrors the DUT's intended state. For each input (write(in_txn t)): it updates the state exactly as the DUT intends (accum = accum + t.data), computes the expected output as a function of the input and state (e.result = accum), and broadcasts it (expected_ap.write(e)). The reset() method resets the state when the DUT resetscrucial, because without it the state diverges (the DebugLab). The shape to carry: a predictor subscribes to the input, applies the model of intended behavior (a function of the input and state), and broadcasts the expected output — and for a stateful DUT, it maintains and updates state in lockstep with the DUT's intended state (including reset). The closing comment captures the essence: the predictor is the DUT's shadowsame input, same state updates → the expected is what the DUT should do. The combinational case is the same code without the state (e.result = f(t)no accum); the stateful case adds the state and its updates, which is where the complexity (and the bugs) live.

Verification Perspective — the predictor must mirror the DUT's state

For a stateful DUT, the predictor's correctness hinges on its state mirroring the DUT's intended state exactly. Seeing how state divergence breaks everything is seeing the core predictor challenge.

A stateful predictor's state must mirror the DUT's intended state, or every prediction divergesper inputstate matches →correct expectedstate diverges → all predictions wrongstate diverges →all predictions…Input + resetthe stimulusPredictor state (inlockstep)update per input, reset on resetCorrect expectedmeaningful comparisonState divergencemissed update / resetAll predictions wrongflood of false mismatches12
Figure 2 — a stateful predictor must mirror the DUT's intended state exactly. The predictor maintains its own copy of the state, updating it per input in lockstep with the DUT's intended updates, and resetting when the DUT resets. As long as the states match, the predictor's expected output is correct, and the scoreboard's comparison is meaningful. If the predictor's state diverges — a missed update or an unhandled reset — then from that point its expected is computed for the wrong state, so every prediction is wrong: a flood of false mismatches that blame the DUT. The predictor's state must track the DUT's intended state at every step.

The figure shows the state-mirroring requirement that defines a stateful predictor. The predictor maintains its own copy of the state, updating it per input in lockstep with the DUT's intended updates, and resetting when the DUT resets. As long as the states match (the top path), the predictor's expected output is correct, and the scoreboard's comparison is meaningful. If the predictor's state diverges (the bottom path — a missed update or an unhandled reset), then from that point its expected is computed for the wrong state, so every prediction is wrong — a flood of false mismatches that blame the DUT. The verification insight is that a stateful predictor's state is a second DUT (a model of the DUT's state machine) that must track the real DUT's intended state at every step. This is why stateful prediction is hard: it's not enough to model the input-to-output function — you must model the entire state evolution, exactly, including the subtle parts (reset behavior, ordering of updates, which inputs do and don't change state). And the failure mode is brutal: a single divergence poisons all subsequent predictions (the state is cumulative — once wrong, it stays wrong), so a tiny state-modeling error produces a massive, ongoing failure. The warning-colored divergence path leads to all predictions wrong; the brand-colored lockstep state is what must be maintained. The figure is the core challenge of predictors: the predictor's state must mirror the DUT's intended state exactly, at every step — because the expected output depends on it, and a divergence doesn't cause one wrong prediction but all subsequent ones. Model the state, not just the function — and keep it in lockstep, or everything after the divergence is a lie.

Runtime / Execution Flow — predicting per input

At run time, the predictor runs a per-input loop: receive the input, update state, compute the expected output, broadcast it. The flow shows the loop.

The predictor loop: receive input, update state, compute expected output, broadcast itreceive the same input → update state (as the DUT intends) → compute expected output = f(input, state) → broadcast expected to the scoreboardreceive the same input → update state (as the DUT intends) → compute expected output = f(input, state) → broadcast expected to the scoreboard1Receive the same inputfrom the input monitor — exactly what the DUT received, transactionby transaction.2Update state as the DUT intendsfor a stateful DUT, apply the intended state change; reset thestate on a reset event.3Compute the expected outputapply the intended function: expected = f(input, updated state).4Broadcast the expected to the scoreboardsend the expected output transaction; the scoreboard compares itagainst the actual.
Figure 3 — the predictor's per-input loop. For each input transaction the DUT receives: the predictor receives the same input (from the input monitor); it updates its internal state exactly as the DUT intends (for a stateful DUT); it computes the expected output as a function of the input and the updated state; and it broadcasts the expected output to the scoreboard. A reset event resets the predictor's state. This runs for every input, in lockstep with the DUT, producing the expected stream the scoreboard checks against.

The flow shows the predictor's per-input loop. Receive (step 1): the predictor receives the same input (from the input monitor) — exactly what the DUT received, transaction by transaction. Update state (step 2): for a stateful DUT, apply the intended state change (and reset the state on a reset event). Compute (step 3): apply the intended functionexpected = f(input, updated state). Broadcast (step 4): send the expected output transaction; the scoreboard compares it against the actual. The runtime insight is that the predictor runs in lockstep with the DUT: for every input the DUT processes, the predictor processes the same input, updating its state and producing an expected output — so the predictor's expected stream parallels the DUT's actual stream, transaction for transaction. This lockstep is what makes the prediction valid: because the predictor sees the same inputs and maintains the same state, its output is what the DUT should produce for that exact sequence of inputs and state. The order of the steps matters for stateful DUTs: the state update (step 2) and the output computation (step 3) must match the DUT's intended semantics (does the output reflect the state before or after this input's update? — the predictor must match the DUT's convention). And the reset (in step 2) is critical: a reset event must reset the predictor's state, synchronously with the DUT's reset, or the state diverges (the DebugLab). The flow is the predictor operating as the DUT's shadow: same input, same state evolution, same output computationper transaction, in lockstep — producing the expected stream that is "what the DUT should be doing," for the scoreboard to check against.

Waveform Perspective — the predictor's expected tracks the input

The predictor's operation is visible on a timeline: each input produces an expected output (accounting for state), and the scoreboard compares it against the DUT's actual. The waveform shows the predictor tracking a stateful computation.

The predictor computes the expected per input, accounting for state, for the scoreboard to compare

12 cycles
The predictor computes the expected per input, accounting for state, for the scoreboard to compareinput 05 → pred_state 05; expected=05 == dut_out 05 → matchinput 05 → pred_state …input 03 → pred_state 08 (accumulated); expected=08 == dut_out 08 → matchinput 03 → pred_state …input 02 → pred_state 0A; expected=0A == dut_out 0A → match (state-aware)input 02 → pred_state …clkin_data--05--03--02------------pred_state00050508080A0A0A0A0A0A0Adut_out--05--08--0A------------expected--05--08--0A------------sb_matcht0t1t2t3t4t5t6t7t8t9t10t11
Figure 4 — the predictor as the DUT's shadow. Each input (in_data) arrives; the predictor updates its state (pred_state, an accumulator) and computes the expected output (expected = the running accumulator). The DUT produces its actual output (dut_out). The scoreboard compares: at each output, expected equals actual (sb_match), so the DUT is correct. The expected accounts for STATE — it's the accumulated sum, not just the current input — which is why the predictor must track the DUT's state. If pred_state diverged from the DUT's, expected would be wrong and every comparison after would mismatch.

The waveform shows the predictor operating as the DUT's shadow on a stateful computation. Each input (in_data) arrives; the predictor updates its state (pred_state, an accumulator) and computes the expected output (expected = the running accumulator). The DUT produces its actual output (dut_out). The scoreboard compares: at each output, expected equals actual (sb_match pulses), so the DUT is correct. The crucial reading is that the expected accounts for state — it's the accumulated sum (05, then 08, then 0A), not just the current input — which is why the predictor must track the DUT's state. The predictor's pred_state evolves (00 → 05 → 08 → 0A) in lockstep with the DUT's intended state, so its expected is what the DUT should produce for that accumulated state. The picture to carry is the state-aware prediction: the expected is not a function of the current input alone but of the input and the accumulated state, and the predictor's pred_state mirrors the DUT's. The counterfactual (the DebugLab) is visible too: if pred_state diverged (say, the predictor missed the 03 input, staying at 05), then expected would be wrong (07 instead of 0A) and every subsequent comparison would mismatch. Reading a predictor's waveform — does the predictor's state track the DUT's? does the expected (accounting for state) match the actual? — confirms the predictor is a faithful shadow. The state evolving in lockstep, the expected matching the actual at each step is the signature of a correct stateful predictor: it carries the same state, computes the same output, transaction by transactionwhat the DUT should produce, checked against what it did.

DebugLab — the predictor whose state diverged and flooded false mismatches

A flood of mismatches from a point onward because the predictor missed a reset

Symptom

A test ran clean for a while — then, from a certain point onward, the scoreboard flooded with mismatches: every transaction after that point mismatched. The observed (DUT) outputs looked plausiblereasonable values, consistent with each other — but they all differed from the expected. It looked like the DUT had gone wrong and stayed wrong. But the DUT was fine: the predictor's internal state had diverged from the DUT's, so every prediction after the divergence was computed for the wrong state.

Root cause

The DUT was reset mid-test (a soft reset that cleared its internal state), but the predictor did not reset its state — so the predictor's state stayed at the pre-reset value while the DUT's went to zero, and every prediction afterward was off by the stale state:

why a missed reset diverges the predictor's state forever
Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
✗ predictor does NOT handle the DUT's reset → state diverges → all later predictions wrong:
  function void write(in_txn t);
    accum = accum + t.data;   // keeps accumulating...
    e.result = accum;         // ...but the DUT was RESET (accum→0) and the predictor wasn't
  endfunction                  // predictor accum stays at the pre-reset value → every expected is OFF
  // from the reset onward: expected = (stale accum) + inputs;  actual = (0) + inputs  → MISMATCH flood
 
✓ predictor resets its state in lockstep with the DUT's reset:
  function void write_reset(reset_txn r);  accum = 0;  endfunction   // observe + handle the reset
  // OR subscribe to the reset event and zero the state, so predictor state == DUT intended state
  // now after reset: predictor accum = 0, matches the DUT → predictions correct again

This is the state-divergence bug — a stateful predictor whose state drifts from the DUT's intended state, making all subsequent predictions wrong. The DUT was reset mid-test (clearing its accumulator to zero), but the predictor didn't model the reset — it kept its accum at the pre-reset value. So from the reset onward, the predictor computed expected = (stale accum) + inputs while the DUT produced actual = (0) + inputs — a constant offset — so every transaction mismatched. The tell is distinctive: a flood of mismatches starting at a point (the reset), where the observed values look plausible (the DUT is fine, producing reasonable outputs) — very different from a real DUT bug (which is usually sporadic or specific, with implausible values). The insidious part is that it blames the DUT: the scoreboard reports the DUT as wrong (mismatch after mismatch), when the predictor is the one that diverged. The fix is to make the predictor reset its state in lockstep with the DUT: observe the reset (subscribe to a reset event or a reset transaction) and zero the predictor's state, so the predictor's state always equals the DUT's intended state. Now, after the reset, the predictor's accum = 0, matching the DUT, and predictions are correct again. The general lesson, and the chapter's thesis: a stateful predictor must maintain state that exactly mirrors the DUT's intended stateupdating on every relevant input and resetting when the DUT resets — because the expected output depends on the state, and a state divergence (a missed reset, a missed update, a wrong ordering) makes all subsequent predictions wrong, a flood of false mismatches that look like a DUT failure but are a predictor bug. When mismatches flood from a point onward and the observed values look plausible, suspect the predictor's state, not the DUT. The shadow drifted; bring it back into lockstep.

Diagnosis

The tell is a flood of mismatches from a point, with plausible observed values. Diagnose state divergence:

  1. Check whether mismatches start at a point and continue. A sudden flood from a point onward, rather than sporadic mismatches, points at predictor-state divergence, not a DUT bug.
  2. Look at the observed values. If they're plausible and self-consistent, the DUT is likely fine and the predictor's state diverged.
  3. Correlate the start with a state event. A reset, a mode change, or a special transaction near the flood's start often caused the divergence.
  4. Confirm the predictor models that event. If the predictor doesn't handle the reset or state-changing event, its state drifts.
Prevention

Keep the predictor's state in lockstep with the DUT's:

  1. Model every state change. Update the predictor's state on every input that changes the DUT's intended state, with the correct ordering and semantics.
  2. Handle reset. Reset the predictor's state in lockstep with the DUT's reset, by observing the reset event.
  3. Match the DUT's state conventions. Ensure the predictor's output reflects the state before or after the update exactly as the DUT does.
  4. Test state-changing scenarios. Exercise resets, mode changes, and corner state transitions to confirm the predictor stays in lockstep.

The one-sentence lesson: a stateful predictor must maintain state that exactly mirrors the DUT's intended state — updating on every relevant input and resetting when the DUT resets — because the expected output depends on the state, and a state divergence (a missed reset or update) makes all subsequent predictions wrong, a flood of false mismatches that look like a DUT failure but are a predictor bug.

Common Mistakes

  • Not modeling the DUT's reset. A predictor that doesn't reset its state when the DUT resets diverges, flooding false mismatches from the reset onward.
  • Missing a state-changing event. Any input that changes the DUT's state must change the predictor's state; a missed update drifts the prediction.
  • Predicting from the stimulus intent, not the observed input. Predict from what the DUT actually received (the input monitor), so a modified-in-flight input is predicted correctly.
  • Mismatching the state convention. If the DUT's output reflects the state before or after the update, the predictor must match that exactly.
  • Treating a stateful DUT as combinational. A predictor without state for a stateful DUT predicts only from the current input and is wrong whenever history matters.
  • Blaming the DUT for a flood of mismatches. A flood from a point with plausible observed values is usually predictor-state divergence, not a DUT bug.

Senior Design Review Notes

Interview Insights

A predictor is the component that computes the expected result by modeling the DUT's intended input-to-output transformation. The scoreboard compares an observed result against an expected one, but it doesn't compute the expected — it receives it, and the predictor is what produces it. The predictor observes the input, subscribing to the input-side monitor so it predicts for exactly what the DUT received, applies the model of intended behavior, and broadcasts the expected output transaction to the scoreboard. The model is a function for a combinational DUT, where the output depends only on the current input, or a state machine for a stateful DUT, where the output depends on the input and the internal state. The predictor works in transactions and abstractly, independent of the DUT's implementation. So it's the active producer of the expected side of the comparison. The mental model is the DUT's shadow: a parallel model fed the same inputs as the DUT, computing what the output should be, independently of what the real DUT actually produces. For each input, the shadow applies the intended function and produces an expected output, and the scoreboard compares the real DUT's output against the shadow's. The crucial complexity is state. For a combinational DUT the shadow is simple — apply the function to each input. But most real DUTs are stateful, with registers, memory, or accumulators, so the shadow must carry the same internal state and update it in lockstep with the DUT's intended updates, including resetting when the DUT resets. If the shadow's state ever drifts from the DUT's intended state, every prediction afterward is wrong. So the predictor sits between the input observation and the scoreboard's expected input, transforming observed inputs into expected outputs, and its hard part is modeling the state correctly.

Because the expected output of a stateful DUT depends on its internal state, so to predict the output correctly the predictor must compute from the same state the DUT has, and any divergence makes all subsequent predictions wrong. A stateful DUT's output is a function of the input and the accumulated state — the history of past inputs — not just the current input. So the predictor can't just model the input-to-output function; it must model the entire state evolution. It maintains its own copy of the state, updates it on every input that changes the DUT's intended state, and resets it when the DUT resets, keeping it in lockstep. As long as the predictor's state matches the DUT's intended state, its expected output is correct and the comparison is meaningful. But the failure mode is brutal because state is cumulative. If the predictor's state diverges at some point — it misses an update, or fails to reset, or applies an update in the wrong order — then from that point its expected is computed for the wrong state, so every prediction afterward is wrong. A single state-modeling error doesn't cause one wrong prediction; it poisons all subsequent ones, producing a flood of false mismatches. And those mismatches blame the DUT, because the scoreboard reports the DUT as wrong, when really the predictor wandered off. This is why stateful prediction is the hard part of building a predictor: you're essentially building a second state machine that must track the real one exactly, including the subtle parts like reset behavior, update ordering, and which inputs do and don't change state. The predictor's state is effectively a model of the DUT's state machine, and it must stay in lockstep at every step. So mirroring the state exactly isn't optional polish — it's what makes the predictor's output actually be what the DUT should produce, rather than a drifting approximation that fails catastrophically after the first divergence.

You look at the pattern and plausibility of the mismatches. A predictor-state divergence typically shows as a flood of mismatches starting at a specific point and continuing for every transaction after, whereas a real DUT bug is usually sporadic or specific to certain transactions. The key tell is that with a state divergence, the observed DUT outputs look plausible and self-consistent — reasonable values that are consistent with each other — because the DUT is actually fine; it's the expected values that are wrong, computed for a diverged state. With a real DUT bug, the observed values are often implausible or clearly wrong for specific cases. So if mismatches suddenly start at a point and continue, and the observed values look reasonable, suspect the predictor's state, not the DUT. The next step is to correlate the start of the flood with a state event: a reset, a mode change, or a special transaction near where the mismatches begin often caused the divergence. Then check whether the predictor models that event — if the DUT was reset but the predictor didn't reset its state, that's the divergence. Another check is the nature of the offset: a state divergence often produces a consistent offset or pattern in the mismatches, because the predictor's state is off by a fixed amount, whereas a DUT bug is more arbitrary. The insidious part is that the scoreboard blames the DUT in both cases — it just reports mismatches — so you have to recognize the signature to know it's a predictor bug. The practical rule is: a flood from a point onward with plausible observed values means look at the predictor's state and what event near that point it failed to model, before you go debugging the DUT. This saves you from chasing a DUT bug that doesn't exist when the real fix is to make the predictor reset or update its state correctly.

The predictor gets its input from the input-side monitor — observing what the DUT actually received — rather than from the stimulus intent, and this matters because it must predict for exactly the input the DUT processed. There are two places you could imagine getting the input: the stimulus that was generated, what the test intended to send, or the actual input observed at the DUT's input interface by a monitor. The predictor should use the observed input. The reason is that between the stimulus being generated and the DUT receiving it, the input could be transformed, reordered, or affected by other activity, so what the DUT actually receives might differ from what the test intended. If the predictor predicts from the intended stimulus but the DUT processed something slightly different, the prediction would be for the wrong input, and the comparison would mismatch even when the DUT is correct. By observing the actual input at the DUT's interface, the predictor predicts for precisely what the DUT got, so its expected output corresponds to the real input the DUT processed. This is the same independence and ground-truth principle that applies to monitoring: you predict from what actually happened at the interface, not from intent. Architecturally, this means the predictor subscribes to the input-side monitor's analysis stream, the same way the scoreboard subscribes to the output-side monitor. So there are two monitors in the checking architecture: an input monitor that feeds the predictor what the DUT received, and an output monitor that feeds the scoreboard what the DUT produced. The predictor transforms the observed input into the expected output, and the scoreboard compares that expected against the observed output. Predicting from the observed input keeps the prediction tied to reality, so a mismatch reflects a real DUT error rather than a discrepancy between intent and what was actually delivered.

A predictor is the UVM component that produces the expected stream, while a reference model is the model of intended behavior that the predictor uses to compute it — the predictor is the architectural component, the reference model is the behavioral algorithm. In practice they're closely related and the terms are sometimes used loosely, but the useful distinction is by role. The predictor is the component in the testbench: it subscribes to the input monitor, holds any state, and broadcasts expected output transactions to the scoreboard. It's the thing wired into the checking architecture between the input observation and the scoreboard. The reference model is the embodiment of the intended behavior — the golden model, the algorithm, the spec implementation — that, given an input and state, computes what the output should be. The predictor calls or wraps the reference model to do the actual computation. So you can think of the predictor as the component that integrates a reference model into the UVM checking flow: it handles the transaction-level plumbing, the subscription to inputs, the state maintenance, and the broadcasting, and it delegates the core what-should-the-output-be computation to the reference model. For a simple DUT, the model might be a few lines inside the predictor itself, so the distinction blurs. For a complex DUT, the reference model might be a separate, substantial piece — possibly written in C or C++ and called through DPI — and the predictor is the UVM wrapper around it. The next chapter goes deeper on reference models specifically. The key point for the predictor is that it's the component producing the expected, modeling the intended input-to-output transformation, whether the model is inline or a separate reference. So the predictor is the producer of expected in the architecture, and the reference model is the source of correctness it draws on.

Exercises

  1. Place the predictor. Sketch the checking architecture and explain where the predictor sits and what feeds it.
  2. Predict with state. For an accumulator DUT, write the predictor's per-input update and output computation.
  3. Handle reset. Explain why a predictor must reset its state with the DUT, and what happens if it doesn't.
  4. Diagnose the flood. Given mismatches flooding from a point with plausible observed values, name the likely cause and the fix.

Summary

  • A predictor computes the expected result by modeling the DUT's intended input-to-output transformation: it observes the input (from the input monitor), applies the model (a function, or a state machine), and broadcasts the expected output to the scoreboard.
  • It is the active producer of the expected side of the scoreboard's comparison, working in transactions and abstractly — the DUT's shadow, fed the same input, computing what the output should be in parallel and independently.
  • It predicts from the observed input (what the DUT actually received), so a modified-in-flight input is predicted correctly — subscribing to the input-side monitor.
  • The crucial complexity is state: a stateful predictor must maintain state that exactly mirrors the DUT's intended stateupdating on every relevant input, resetting when the DUT resets — because a state divergence makes all subsequent predictions wrong (a flood of false mismatches).
  • The durable rule of thumb: build the predictor as the DUT's shadow — observe the actual input, apply the intended input-to-output model, and broadcast the expected output — and for a stateful DUT, maintain state that mirrors the DUT's exactly (update on every relevant input, reset in lockstep with the DUT); a state divergence makes all later predictions wrong, a flood of false mismatches that look like a DUT failure but are a predictor bug, so when mismatches flood from a point with plausible observed values, suspect the predictor's state.

Next — Reference Models: the model of intended behavior the predictor draws on — the reference (golden) model: how to build one that faithfully captures the spec, the abstraction-level choices, the option of writing it in C/C++ via DPI for complex DUTs, and how the reference model's fidelity determines what the scoreboard can catch.