Definitioncore
Product machine
Also called product FSM.
The machine that runs two FSMs side by side on the same inputs and flags a mismatch of outputs; two designs are equivalent if no mismatch state is reachable.
The product machine of two finite state machines with the same inputs and outputs runs both machines in lockstep on one input stream. Its state is a pair of states, one of each machine, and its only output is 1 when the two machines give different outputs. Two designs that start in their initial states are sequentially equivalent exactly when no state with a possible output 1 is reachable in the product. So the product turns sequential equivalence checking into a reachability problem, or an invariant check, on one machine. For circuits, the product is the miter of the two circuits with both sets of latches kept.
Definition
A deterministic Mealy machine is with input alphabet , output alphabet , finite state set , initial state , next-state function and output function . For a circuit, for latches, and . Here "transition" means one step of on one input, a clock cycle.
Let and be such machines with the same and . Their product machine is
A state is bad if for some input . For Moore machines the outputs do not depend on , and a bad state is one with .
and are sequentially equivalent if, for every input sequence , the two machines started in and give the same output sequence.
Proposition (the product reduces equivalence to reachability). and are sequentially equivalent if and only if no bad state is reachable from in .
Proof. For an input sequence , let and be the states of and before step . By the definition of , is the state of the product after the prefix , so it is reachable. Every reachable state arises in this way.
(If) Suppose the outputs differ on , first at step . Then , so the reachable state is bad.
(Only if) Suppose is bad with witness and is reached by . Then on the input sequence , the machines give different outputs at the last step.
The product of circuits with and latches has latches and is built in linear size, but its state space has states, the state explosion problem in its plainest form.
Examples and non-examples
Two encodings of a parity bit. has one latch , initial value 0, next state and output . has two latches with initial value , swaps them when , keeps them when , and outputs . So is a one-hot encoding of the same bit. The product has 8 states .
| state | reachable | bad |
|---|---|---|
| yes, initial | no | |
| yes, after | no | |
| , | no | yes |
| , | no | yes |
| , | no | no |
The reachable states are and , and neither is bad, so the machines are equivalent. Four bad states exist, but none is reachable. A check of the miter of the combinational parts alone, with latch values as free inputs, would report a difference at .
A difference. Give the initial value . Then the initial state is bad, and the empty prefix with any input separates the machines.
Non-example: different input sets. If one design has an input that the other lacks, the product is not defined until the inputs are matched or the extra input is fixed. The product compares behaviour for one shared input stream.
Non-example: no initial state. The proposition uses the pair of initial states. For designs without a reset, the question is about all power-up states, and reachability from one pair does not answer it; see safe replaceability.
Related definitions
- Equivalence checking for labelled transition systems compares possibly nondeterministic systems by bisimulation, trace equivalence and other behavioural relations, with no inputs and outputs in the sense above. For deterministic machines with inputs and outputs, as here, these notions agree, and the product reduces the question to reachability.
- The product construction of finite automata is the same pairing of states, and DFA equivalence uses it with "accepting in exactly one automaton" as the bad states.
- The miter is the product with no latches; reachability is then trivial, and the question is satisfiability.
- Signal correspondence proves that no bad state is reachable by an inductive invariant of the product, and image computation computes its reachable states with BDDs.
References
- O. Coudert, C. Berthet and J. C. Madre, Verification of synchronous sequential machines based on symbolic execution, LNCS 407, Springer, 1989, the comparison of two machines by a symbolic traversal of the states of the machine that runs both
- A. Kuehlmann and C. A. J. van Eijk, Combinational and sequential equivalence checking, in S. Hassoun and T. Sasao (editors), Logic Synthesis and Verification, Kluwer, 2002, 343 to 372, the section on sequential equivalence checking, the product machine and its reachable states
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 0MGAEA Edit this page History Report an error Markdown