Definition
In the UCLID5 hardware-modeling setting, a state machine model represents a system by computing a next state from the current state and then transitioning to that next state. Hardware is expressed this way in UCLID5, while software is modeled as a sequence of operations that update parts of the system state. [C1]
State variables and update semantics
UCLID5 associates two values with each state variable in the hardware state-machine model:
- the present value, referenced by the ordinary variable name; and
- the next value, referenced by appending a single quote to the variable name. [C2]
For example, var denotes the current value of a state variable, while var' denotes its next-state value. Assignment statements define next-state values based on current state variables and, in some cases, other next-state values. Conceptually, the state machine first computes all next-state values and then synchronously updates all state variables so that their next values become their present values. [C2]
Contrast with serial execution
UCLID5 distinguishes the state-machine model from a serial execution model. For software modeling, assignment statements execute in sequence and update some portion of the system state at each step. For hardware modeling, the state-machine model instead computes a full next state and then updates state elements together. [C1]
Use in hardware verification
The state-machine model is used in the cited UCLID5 verification work to model synchronous hardware, specifically pipelined Y86-64 microprocessors and their sequential reference implementation. The verification setup uses a modeling language to describe the system and a command language to initialize state, operate the system, and check verification conditions. [C3]
In symbolic simulation, state variables can be captured as UCLID5 variables, and assertions can then be verified over those recorded values. In the cited pipeline verification, two copies of the PIPE model and one copy of the SEQ model are run in parallel to express correspondence-checking sequences. [C4]
Timing consequences
Because state updates are synchronous, changing a control signal does not immediately change its present value. The cited report notes that changing a control signal, such as one used to start flushing, takes a full cycle before the changed next state becomes the current value of that signal. For a verification requiring n flushing steps, the overall symbolic-simulation sequence requires n + 4 steps. [C5]
UCLID5 also allows an individual module at a step either to remain in its current state or to operate for one step. During symbolic simulation, the symbolic state of selected modules can be recorded, and correctness conditions can be expressed over those recorded states. [C5]
Procedures as next-state computations
The cited authors report that direct use of primed and unprimed variables can be difficult when translating hardware control logic, because some expressions need current values while others need values computed earlier in the same clock cycle. To handle this, they used a mixed strategy: the processor is described as a state machine, but next-state computation is expressed with procedures. [C6]
Under this style, UCLID5 treats assignments within procedures as assignments to next-state values, while using assignment ordering to determine whether later expressions refer to current or next values. The report gives the example:
varA = varA + varB;
varB = varA + varB;
which is equivalent to:
varA' = varA + varB;
varB' = varA' + varB;
This procedural style requires the ordering of procedure calls and assignments to respect signal flow through the circuit’s combinational logic. [C6]
Role in verification conditions
In the cited verification, correctness conditions are expressed as invariants over symbolic simulation steps. One invariant checks that PIPE operation is consistent with SEQ operation after the necessary flushing sequence. The invariant’s antecedent includes a step bound, step > nflush+3, meaning the correspondence is required only from step n + 4 onward. [C7]