Logic Equivalence Checking & Formal Verification
Proving mathematical equivalence between Golden RTL and Synthesized Gate Netlists (as well as Pre-Layout and Post-ECO netlists) across all 2N possible input states. Using Binary Decision Diagrams (BDDs) and Boolean Satisfiability (SAT) solvers, LEC guarantees zero synthesis translation bugs or optimization corruptions without running slow multi-million-cycle testbenches.
What Happens in Logic Equivalence Checking (LEC)?
๐งฉ The Formal Verification Engineer's Job
Modern logic synthesis tools perform aggressive algebraic optimizations: constant propagation, sub-expression sharing, boundary optimization across hierarchy, state machine re-encoding, and multibit register merging. Dynamic simulation testbenches can only test a tiny fraction (less than 0.0001%) of the total state space, creating severe risks of silent synthesis bugs. Logic Equivalence Checking (LEC) solves this by using formal mathematical proofs.
The LEC engine reads both the Golden RTL (Stage 02) and the Revised Gate Netlist (Stage 03), parsing them into canonical Boolean representations such as Ordered Binary Decision Diagrams (OBDDs) and And-Inverter Graphs (AIGs). The design is partitioned into manageable combinatorial logic cones bounded by Compare Points (Key Points): Primary Inputs, Primary Outputs, D-Flip-Flop Data/Clock pins, and Blackbox boundaries (such as SRAM macros or PLLs).
Using advanced SAT (Boolean Satisfiability) solvers and formal theorem provers, the tool tests whether there exists any single binary input assignment that causes the Golden and Revised logic cones to produce differing outputs. If a non-equivalence is discovered, the tool generates an exact counter-example diagnostic trace pinpointing the failing gate and root-cause signal. When all key points evaluate as EQUIVALENT, the gate netlist is mathematically certified bug-free.
๐ What Synthesis Provides
- Golden RTL Verilog source files
- Synthesized gate-level netlist (synthesis.v)
- Standard cell simulation models (sky130.v)
- Synthesis tool setup and retiming log files
- Blackbox memory compiler macro models
- Clock gating and constant optimization guides
๐ What the Formal Specialist Produces
- Key Point Mapping Report (100% matched DFFs/Ports)
- Cone of Logic Equivalence Certificate (0 non-eqs)
- Unmapped Point Diagnostic & Resolution Report
- ECO Netlist Formal Verification Signoff
- Low-power isolation cell formal proof
- Formal signoff review package for Physical Design
Files Flow: Stage 03a Inputs & Outputs
PicoRV32 on SKY130: Yosys EQY Formal Verification
Yosys EQY Formal LEC Configuration Script (picorv32_lec.eqy)
[gold]
read_verilog -sv picorv32.v
prep -top picorv32_top
[gate]
read_verilog sky130_fd_sc_hd.v
read_verilog picorv32_synthesis.v
prep -top picorv32_top
[strategy basic]
use sat
depth 1
[collect *]
# Automatically map registers and IO ports between Golden RTL and Gate netlistExecution of Formal SAT Proof Engine
# Execute Yosys EQY Formal Equivalence Verification
eqy -f picorv32_lec.eqy
# Output:
# [eqy] Parsing golden design: picorv32.v ...
# [eqy] Parsing revised gate netlist: picorv32_synthesis.v ...
# [eqy] Matching key points: 4,120 DFFs, 128 Primary Inputs, 128 Primary Outputs
# [eqy] Partitioning into 12,450 logic cones...
# [eqy] Running SAT solver on all partitions...Formal LEC Proof Signoff Report (formal_signoff.rpt)
=== Yosys EQY Formal Equivalence Signoff: PicoRV32 ===
Golden Design : picorv32.v (RTL Source)
Revised Design : picorv32_synthesis.v (SkyWater 130nm Gate Netlist)
--- Compare Point Mapping Summary ---
Primary Inputs Matched : 128 / 128 (100.0%)
Primary Outputs Matched : 128 / 128 (100.0%)
Sequential D-Flip-Flops : 4,120 / 4,120 (100.0%)
Combinational Logic Cones : 8,074 cones
Total Key Points Evaluated : 12,450 points
--- SAT Solver Formal Equivalence Results ---
Successfully Proven EQUIV : 12,450 points (100.0%)
Proven NON-EQUIVALENT : 0 points (0.00%)
Unresolved / Timed-out Cones : 0 cones (0.00%)
Unmapped Golden/Gate Points : 0 points (0.00%)
RESULT: DESIGNS ARE MATHEMATICALLY EQUIVALENT - FORMAL SIGN OFF APPROVEDTools Used in Formal Logic Equivalence (LEC)
Formal LEC engines use advanced mathematical SAT solvers and Binary Decision Diagrams (BDDs) to prove equivalence across millions of gates in minutes.
| Task | ๐ญ Synopsys | ๐ท Cadence | ๐ง Siemens EDA | ๐ Open-Source |
|---|---|---|---|---|
| RTL vs Gate Formal Equivalence Proof | Synopsys Formality | Cadence Conformal LEC | Siemens FormalPro LEC | Yosys EQY ยท SymbiYosys |
| ECO Netlist Formal Equivalence Verification | Synopsys Formality Ultra | Cadence Conformal ECO | Siemens FormalPro ECO | Yosys (equiv_make / equiv_induct) |
| Low-Power UPF / Isolation State LEC | Synopsys Formality LP | Cadence Conformal Low Power | Siemens Questa Formal LP | SymbiYosys (UPF checks) |
| Failing Logic Cone Diagnosis & Counter-Examples | Synopsys Formality Debugger | Cadence Conformal Diagnostic | Siemens FormalPro Debugger | Yosys EQY Diagnostic Waveforms |
| Retiming & State Machine Equivalence | Synopsys Formality Retiming | Cadence Conformal Retiming | Siemens FormalPro Retiming | ABC Formal Proof Engine |