Skip to content
STIMSMITH

Architectural State Comparison

Concept

A verification technique used in processor design (notably XiangShan) where the architectural states of a Design Under Test (DUT) are continuously compared against those of a reference model (REF) during co-simulation, halting execution and reporting an error when a mismatch is detected.

First seen 6/6/2026
Last seen 6/6/2026
Evidence 1 chunks
Wiki v1

WIKI

Overview

Architectural state comparison is a core verification methodology employed in the XiangShan processor development flow. It involves continuously comparing the visible architectural state (registers, program counter, memory, and other ISA-level state) of a hardware design under test (DUT) against a trusted reference model (REF) as instructions are committed and state updates occur.

When any difference is detected between the two states, the simulation halts and reports the discrepancy; otherwise, simulation continues uninterrupted. This approach enables fast, automated detection of RTL bugs in out-of-order, superscalar processor designs.

READ FULL ARTICLE →

NEIGHBORHOOD

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

1 connections
DiffTest ← implements 98% 1e
Difftest compares architectural states between DUT and REF to detect bugs.

CITATIONS

4 sources
4 citations — click to collapse
[1] NEMU provides a set of APIs to assist XiangShan in comparing and verifying the architectural states. Function Verification (ASPLOS '25 XiangShan Tutorial)
[2] Difftest is an ISA co-simulation framework that compares the architectural states between DUT and REF, stopping and reporting an error on mismatch. Function Verification (ASPLOS '25 XiangShan Tutorial)
[3] Difftest is invoked during XiangShan execution by passing `--diff $NEMU_HOME/build/riscv64-nemu-interpreter-so` to the emulator, enabling on-the-fly architectural state comparison against the NEMU reference. Function Verification (ASPLOS '25 XiangShan Tutorial)
[4] In the buggy run, Difftest detects an architectural state mismatch, allowing subsequent waveform dumping from a known cycle window around the trap. Function Verification (ASPLOS '25 XiangShan Tutorial)