Skip to content
STIMSMITH

trace comparison

Concept WIKI v1 · 5/27/2026

Trace comparison is a reference-model checking technique for processor verification in which two models dump execution logs and those traces are compared to flag mismatches. Typical traces include program-counter flow and register or memory writebacks. The method is limited when asynchronous external stimuli, such as interrupts or debug requests, can occur independently in standalone models.

Definition

Trace comparison is a way to implement reference-model checking in processor verification. It requires both models under test to dump execution logs, then compares those traces and flags mismatches. Typical logs include program-counter flow and every register or memory writeback.

Use in verification

In the verification flow described by Effective Processor Verification with Logic Fuzzer Enhanced Co-simulation, trace comparison is presented as an alternative to checking only a test's final output against a pre-calculated answer. Instead of waiting until a directed test completes and comparing the final result, trace comparison compares execution logs from the participating models.

Limitations

Trace comparison can fail when verification involves asynchronous external stimuli, such as interrupts or debug requests. Because the models run standalone and the trace comparison happens after execution, a single interrupt that fires at a different point can make the execution logs diverge even if the underlying behavior is not the intended bug being tested.

Relationship to co-simulation

The cited paper describes co-simulation as a way to address this limitation: both models run in parallel, communicate during execution, and compare states at specified events such as instruction commit. When a comparison fails, execution can halt immediately, letting an engineer begin debugging near the first divergence.

CITATIONS

4 sources
4 citations
[1] Trace comparison is a reference-model checking setup that requires both models to dump execution logs, which are then compared and mismatches flagged. [PDF] Effective Processor Verification with Logic Fuzzer Enhanced Co ...
[2] Typical trace-comparison logs contain program-counter flow and every register or memory writeback. [PDF] Effective Processor Verification with Logic Fuzzer Enhanced Co ...
[3] Trace comparison can fail for asynchronous external stimuli such as interrupts and debug requests because standalone models are compared after execution and an interrupt can make the logs differ. [PDF] Effective Processor Verification with Logic Fuzzer Enhanced Co ...
[4] The cited co-simulation approach runs both models in parallel, exchanges messages at events such as instruction commit, compares states of interest, and halts on failed comparison to aid debugging near the divergence. [PDF] Effective Processor Verification with Logic Fuzzer Enhanced Co ...