Definition
End-of-simulation comparison is a reference-model comparison technique used in processor verification. It runs the same code on both a reference, or golden, processor model and the RTL implementation, then compares their architectural state only after the simulation finishes.[1]
How it works
In the setup described in Effective Processor Verification with Logic Fuzzer Enhanced Co-simulation, the final register-file state and memory contents from both the reference model and the RTL implementation are dumped at the end of the simulation and compared. If any values differ, the mismatch is treated as a failure requiring investigation.[1]
Role in reference-model comparison
Reference-model comparison is based on the expectation that, when the same code is executed on a design under test and a golden model, their architectural states should match. End-of-simulation comparison is one implementation of that idea, distinguished by performing the comparison only once the test completes rather than during execution.[1]
Advantages
The cited paper characterizes end-of-simulation comparison as a "cheap and simplistic setup," because it requires only final-state collection and comparison rather than cycle-by-cycle or commit-by-commit interaction between the RTL and the reference model.[1]
Limitations
End-of-simulation comparison has two main drawbacks identified in the cited source:
- A bug that temporarily affects architectural state may be overwritten by later correct execution, hiding the bug from the final comparison.[1]
- When a mismatch is detected, debugging can be difficult because the final-state failure may be far from the original point where the RTL and reference model diverged.[1]
Contrast with other approaches
The same paper contrasts end-of-simulation comparison with trace comparison and co-simulation. Trace comparison compares execution logs containing information such as program-counter flow and register or memory writebacks, while co-simulation runs the RTL and reference model in parallel and can halt at a failed state comparison near the point of divergence.[2]