Definitionintro
Miter
Also called miter circuit.
A circuit that feeds the same inputs to two designs and XORs matching outputs into one OR output, which can be 1 only if the designs differ.
A miter is a circuit built from two circuits and with the same inputs and the same number of outputs. It connects each input of to the matching input of , puts an XOR gate on each pair of matching outputs, and joins the XOR gates with one OR gate. Its single output is 1 on an input exactly when the two circuits give different outputs on it. So and are equivalent if and only if the miter is unsatisfiable, and any input that satisfies it is a counterexample. Brand (1993) named the construction. This page is about the construction; the problem it serves, its algorithms and its bounds are on the Boolean equivalence checking page.
Definition
Let and be Boolean circuits over the inputs , each with outputs , and let output of compute and output of compute . The outputs are matched by position or by name. The miter is the circuit that contains both circuits on the shared inputs and the extra gates
and are equivalent when for every and every .
Proposition 1 (the miter reduces equivalence to unsatisfiability). and are equivalent if and only if for every , that is, the miter is unsatisfiable. An with is an input on which the circuits differ.
Proof. For a fixed , if and only if for some , if and only if for some . So has a satisfying input exactly when some input separates the circuits, and that input separates them.
The miter has gates, counting the OR as two-input gates and each XOR as one gate, so it is built in linear time. A SAT solver gets it through the Tseitin transformation.
Proposition 2 (combinational equivalence is coNP-complete). The problem "are and equivalent?" for circuits is coNP-complete.
Proof. Membership. The complement, "the circuits differ", is in NP: by Proposition 1, an input with is a certificate, and evaluating on takes time linear in the size of the miter. Hardness. Circuit satisfiability is NP-complete, so its complement, circuit unsatisfiability, is coNP-complete. Map a circuit with one output to the pair (, the circuit with the constant 0 as output). This takes polynomial time, and is equivalent to the constant 0 exactly when is unsatisfiable.
Examples and non-examples
A half adder. has the outputs and . has and . The miter is .
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 0 |
The miter is unsatisfiable, so the circuits are equivalent.
A bug. Replace by . Then , and the input is a counterexample: the carry is 0 in and 1 in .
Non-example: wrong output matching. If is paired with and with , the miter is satisfiable although the circuits are equivalent. The miter checks equivalence under the given matching of inputs and outputs only. Finding the matching when the names do not give it is Boolean matching.
Non-example: circuits with registers. If and have latches, the XOR-OR structure on their outputs is not a miter in the sense above. With the latch outputs read as free inputs, a satisfying input can be a state that no input sequence reaches, so a satisfiable output does not show that the designs differ. The sequential form is the product machine, where the question is whether a state with output 1 is reachable. If the latches of the two designs are paired one to one, the miter of the next-state and output functions decides equivalence for that pairing; see latch mapping.
Related definitions
- Boolean equivalence checking is the decision problem. The miter turns it into the satisfiability of one circuit, which BDDs, SAT solvers, SAT sweeping and cutpoint equivalence checking then decide.
- Brand used automatic test pattern generation on the miter: the output stuck at 0 is a redundant fault exactly when no input sets the output to 1, so a proof that the fault is untestable is a proof of equivalence.
- The dual form joins XNOR gates with an AND gate. Its output is 1 everywhere exactly when the circuits are equivalent, so it turns equivalence into a tautology check.
- The product machine is the miter of two sequential circuits, with both sets of latches kept.
References
- D. Brand, Verification of large synthesized designs, ICCAD 1993, 534 to 537, the joined circuit of the two designs with an XOR on the outputs, and the use of test generation to show that its output cannot be 1
- 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 combinational equivalence checking and the miter structure
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 HDNMPN Edit this page History Report an error Markdown