Overview
Burch-Dill Correspondence Checking is used in the cited UCLID5 verification work to relate a pipelined microprocessor model to a sequential reference implementation. The modeled system consists of a combination of a pipelined microprocessor and the sequential reference implementation, while the UCLID5 verification script specifies how the state is initialized, how the system is operated, and which verification conditions are checked for Burch-Dill correspondence checking.
In this setting, the method is implemented over hardware-style state-machine models. UCLID5 models hardware by computing a next state from the current state and then transitioning to that next state; for the pipelined-microprocessor verification described in the evidence, only UCLID5's hardware modeling aspects were used.
Core setup
The evidence identifies two special framework extensions needed for Burch-Dill verification:
- Projection from PIPE to SEQ. The sequential reference framework must be able to load the architectural state from the pipelined implementation before running one step of SEQ's normal operation. This was implemented with an input signal named
proj_impl, which loads the program counter, register file, data memory, and status register from module inputs into the SEQ state. - Pipeline flushing. The pipelined implementation must support a flushing mechanism. Flushing stops the fetching of new instructions while allowing instructions already in the pipeline to complete. The PIPE framework was augmented with an input control signal named
force_flushfor this purpose.
Flushing behavior
Flushing is implemented by injecting a bubble into the decode stage on each cycle until the pipeline is empty. This dynamically injects nop instructions and sets the status register to SBUB, indicating a pipeline bubble. The evidence notes that bubble injection was already part of the pipeline control logic for ordinary execution cases, such as waiting for a return address to be popped from the stack during a ret instruction.
The evidence also records two subtle requirements for correct flushing:
- Flushing should not stall the fetch stage or hold the fetch-stage program counter (
predPC) fixed, because doing so would prevent aretorjXXinstruction from setting the program counter to the return or jump destination. - For variant
SW, which stalls the pipeline for one cycle to convert apopqinstruction into a two-instruction sequence, flushing must be disabled for one cycle when that conversion occurs.
Pipeline-register semantics
The pipeline-register model used in the evidence supports four possible behaviors on a step: initialization, stalling, bubble injection, or loading its input. This behavior is relevant because flushing relies on bubble injection, while ordinary pipeline operation may also require stalls or normal input loading.
Abstraction and term-level modeling
The evidence connects Burch-Dill-style term-level modeling with UCLID5's uninterpreted types and functions. Uninterpreted terms can be checked for equality, and uninterpreted functions are treated as arbitrary but consistent functions. Such functions are useful for hardware blocks whose exact functionality is not required, provided they behave consistently in both the pipeline and sequential reference models.
The verification work also explores abstraction choices for data and operations. Data can be modeled as uninterpreted values, integers, or bit vectors. Uninterpreted data types are more abstract than concrete integer or bit-vector data, and uninterpreted functions are more abstract than precise mathematical functions. Main memory can be modeled either as an array or as an uninterpreted memory state with uninterpreted read and write functions; because the pipelined implementations perform memory operations in program order, the uninterpreted memory model sufficed in the reported work.
ALU-model precision
The evidence describes a hierarchy of ALU models used with the verification, ranging from an entirely uninterpreted ALU to partially interpreted and precise versions. An uninterpreted ALU sufficed for pipeline variants STD, FULL, STALL, and LF. A model capturing x + 0 = x was required for NT and BTFNT. A model attempting to capture (x + 8) + -8 = x was required for variant SW, but the SMT solver could not make effective use of the axiom encoding this property, so verification at that abstraction level was unsuccessful. A model that fully interprets addition while leaving other operations uninterpreted sufficed for all pipeline variants. The most precise model interprets addition and subtraction, and with bit-vector data also models bitwise logical operations.
Safety and liveness caveat
The evidence warns that a safety-style correspondence check alone can be insufficient: a processor that deadlocks, or even a device that does nothing, can pass such a verification. To complete the verification, liveness must also be checked, specifically that the processor cannot enter a state where it never makes forward progress. The cited report describes an approach that builds on the safety property to show that the pipeline does not stall indefinitely.