Logic Equivalence Checking (LEC) mathematically proves that two design representations compute identical Boolean functions — catching synthesis, optimization, and ECO bugs that simulation can never find. Learn how key points partition circuits, master Synopsys Formality and Cadence Conformal flows, and confidently debug non-equivalent (NE) points in production designs.
Logic Equivalence Checking is a formal method that takes two circuit representations — called the golden and the revised — and mathematically proves they implement the exact same Boolean function at every output point. It is not simulation: no test vectors are applied. Instead, the tool constructs a mathematical proof using Binary Decision Diagrams (BDDs), SAT solvers, or a combination of both.
The critical distinction: LEC verifies structural transformation correctness, not specification compliance. Given an RTL that correctly implements a FIFO, LEC can prove that the post-synthesis netlist is functionally identical to that RTL. But it cannot tell you whether the RTL's FIFO depth was the right choice — that is the domain of functional verification and formal property checking.
LEC produces one of three verdicts per output (key point):
| Verdict | Meaning | Action Required |
|---|---|---|
| VERIFIED | Golden and revised compute identical functions at this point | None — move on |
| NON-EQUIVALENT (NE) | A counterexample exists — different output for some input combination | Investigate root cause; may be true bug or mapping issue |
| UNVERIFIED | Tool timed out or encountered resource limits without finding proof or counterexample | Increase effort; add constraints; review manually |
LEC is applied at multiple stages of the ASIC flow, with different golden/revised pairs at each stage. Understanding the right pair to compare at each step is essential for building a robust sign-off flow.
| LEC Run | Golden | Revised | What It Catches |
|---|---|---|---|
| RTL-to-gate (post-synthesis) | RTL source | Post-synthesis netlist | Synthesis tool bugs, incorrect constraints, missing dont_touch attributes |
| Gate-to-gate (post-layout) | Post-synthesis netlist | Post-layout netlist | Physical optimization errors, filler cell corruption, ECO application bugs |
| Gate-to-gate (post-ECO) | Pre-ECO netlist | Post-ECO netlist | ECO correctness — verifies only intended cones changed |
| Gate-to-gate (post-DFT) | Pre-DFT netlist | Post-scan-insertion netlist | Scan mux insertion correctness, test mode vs functional mode equivalence |
The RTL-to-gate run is the most critical and runs immediately after synthesis. The gate-to-gate run after layout catches late-stage tool bugs. Both are mandatory for tapeout sign-off in any serious ASIC methodology.
LEC comes in two fundamentally different modes, each appropriate for different circuit transformations.
Combinational LEC treats every register (flip-flop and latch) as a cut-point: register outputs become pseudo primary inputs (PPIs) and register inputs become pseudo primary outputs (PPOs). The entire sequential circuit is thus decomposed into a set of purely combinational logic cones, each of which is verified independently.
This approach is extremely fast — modern BDD and SAT engines can verify millions of cones per hour. It works correctly as long as there is a one-to-one correspondence between registers in the golden and revised designs: the same register in both designs is assigned the same initial state, and the synthesis tool did not move logic across register boundaries.
Sequential LEC is required when register-to-register correspondence cannot be established — most commonly after register retiming. Retiming is a synthesis optimization that moves registers forward or backward across combinational logic to balance pipeline stages and improve timing. After retiming, a register in the revised design may correspond to no single register in the golden design; it may represent the combination of state from multiple old registers.
Sequential LEC handles this by bounded unrolling: it unrolls the circuit over K time steps and proves that for any input sequence of length K, both designs produce identical output sequences. The value of K is set high enough to cover the state-machine depth. This is exponentially more expensive than combinational LEC and is applied selectively to blocks where combinational LEC fails to establish register mapping.
| Property | Combinational LEC | Sequential LEC |
|---|---|---|
| Register handling | Cut-points (PPIs/PPOs) | Bounded unrolling over K cycles |
| Speed | Fast — millions of cones/hour | Slow — exponential in K and state depth |
| Use case | Standard synthesis, ECOs, DFT | Retiming, pipeline restructuring |
| Register mapping needed? | Yes — one-to-one | No — handles structural changes |
| Tool support | Formality, Conformal, all tools | Formality with sequential mode, Conformal UPF |
The key point is the foundational concept of LEC. A key point is any circuit node that divides the design into independent combinational cones for equivalence checking. The tool verifies one cone at a time: it proves that the function computed at the revised key point is identical to the function computed at the corresponding golden key point, given the same values at all upstream key points.
flop_A in the RTL to the wrong register in the netlist, every cone fed by that register will report NE — even if the design is functionally correct. This is why the mapping step is carefully reported and reviewed before accepting any NE result.The tool performs name-based matching first: it looks for registers with the same hierarchical name in both golden and revised. Synthesis tools may rename registers during optimization; to help the tool, designers use dont_rename or set_dont_rename constraints, or the tool uses structural/functional heuristics to match renamed points. When automatic matching fails for a register, the tool marks it UNMATCHED, which cascades into UNVERIFIED results for all cones involving that register.
Synopsys Formality is the industry-standard LEC tool at most semiconductor companies. It is invoked via Tcl scripts, typically called from a Makefile target or an automation framework after each synthesis step.
## formality_rtl2gate.tcl ## Run: fm_shell -f formality_rtl2gate.tcl | tee formality.log ## ── 1. Set up the run ────────────────────────────────────── set_svf ../synth/design.svf ; # Synopsys Verification File from DC set search_path [list ../rtl /libs/std_cell/db] ## ── 2. Read the golden (RTL) ─────────────────────────────── read_verilog -golden -sva { ../rtl/alu.sv ../rtl/ctrl.sv ../rtl/top.sv } set_top golden {r:/WORK/top} ## ── 3. Read the revised (netlist) ────────────────────────── read_verilog -revised { ../synth/output/top_netlist.v } read_db -revised /libs/std_cell/saed14.db set_top revised {i:/WORK/top} ## ── 4. Match and verify ───────────────────────────────────── match verify ## ── 5. Report ─────────────────────────────────────────────── report_passing_points > reports/passing.rpt report_failing_points > reports/failing.rpt report_aborted_points > reports/aborted.rpt if {[get_status] == "SUCCEEDED"} { puts "LEC CLEAN: All points verified" } else { puts "LEC FAILED: See failing.rpt" exit 1 }
| Command | Purpose |
|---|---|
set_svf | Load the SVF file generated by Design Compiler — contains synthesis directives that help Formality reproduce the correct mapping |
match | Perform key point matching between golden and revised; reports unmatched points |
verify | Run the formal equivalence proof on all matched key point pairs |
analyze_datapath | Apply advanced datapath analysis to reduce UNVERIFIED arithmetic cones |
set_constant | Constrain a signal to a fixed value (e.g., scan_en=0 during functional mode verification) |
set_user_match | Manually specify a golden-to-revised register mapping when automatic matching fails |
report_ne_points | List all non-equivalent points with counterexample witness vectors |
When Design Compiler synthesizes the design, it generates an SVF file that records every name change, constant folding, and structural decision the tool made. Formality reads this file via set_svf and uses it to guide key point matching. Always use the SVF — without it, Formality falls back to purely name-based matching, which frequently fails on optimized netlists and produces spurious NE results.
Cadence Conformal (also called Conformal LEC or LEC) is the primary alternative to Formality and is dominant at companies using the Cadence synthesis flow (Genus). The command language differs from Formality but the underlying concepts are identical.
## conformal_rtl2gate.do ## Run: lec -dofile conformal_rtl2gate.do -xl -nogui | tee conformal.log // ── 1. Read the golden (RTL) ──────────────────────────────── read design -golden -sv \ ../rtl/alu.sv \ ../rtl/ctrl.sv \ ../rtl/top.sv set root module top -golden // ── 2. Read the revised (netlist + libraries) ─────────────── read library -revised /libs/tsmc28/tsmc28.lib read design -revised -verilog \ ../synth/output/top_netlist.v set root module top -revised // ── 3. Set functional mode (ignore scan) ──────────────────── add pin constraints 0 scan_en -both add pin constraints 0 test_mode -both // ── 4. Flatten hierarchy for matching ─────────────────────── set flatten model -both // ── 5. Match and verify ───────────────────────────────────── map key points set system mode lec // ── 6. Compare and report ─────────────────────────────────── add compare point -all compare report compare results -summary report compare results -non_equivalent -file ne_points.rpt
| Command | Purpose |
|---|---|
map key points | Establish key point correspondence between golden and revised |
set system mode lec | Switch to LEC verification mode (as opposed to setup mode) |
add compare point -all | Add all key point pairs as comparison targets |
compare | Run the equivalence proof |
add pin constraints | Fix input pins to constant values for the comparison |
set effort level ultimate | Max compute effort for UNVERIFIED points |
add key point | Manually add a user-defined cut-point |
report unmapped points | List registers that could not be matched |
set flatten model -seq_constant -latch_off to control how sequential elements are treated during flattening. Aggressive flattening can improve matching rates for renamed registers.When Formality or Conformal reports NE points, the next step is to determine whether this is a true bug (the synthesis tool introduced a functional difference) or a false negative (a tool limitation, mapping error, or missing constraint that caused a false alarm).
Every NE point comes with a counterexample: a set of input values for which golden and revised produce different outputs. This is not a simulation waveform — it is an algebraic witness generated by the SAT solver. In Formality use report_failing_points -verbose; in Conformal use report compare data -ne.
## Formality — examine an NE point interactively start_gui ; # launch the Formality GUI ## Or from script: set ne_pts [get_failing_points] foreach pt $ne_pts { puts "NE point: $pt" report_failing_points -verbose $pt ; # shows counterexample input vector + expected/actual output }
Apply the following decision tree to each NE point:
set_constant in Formality or add pin constraints in Conformal.report_matching_points and verify that the register in the golden is matched to the logically correct register in the revised. A mis-match will cause all downstream cones to appear NE even when the design is correct. Use set_user_match (Formality) or add key point -mapping (Conformal) to correct the mapping.Any NE or UNVERIFIED point that is accepted at sign-off must have a written waiver explaining:
Experience across many ASIC projects reveals four recurring root causes of LEC failures. Understanding them helps you resolve NE points quickly and set up flows that avoid them in the first place.
RTL typically uses synchronous reset (reset applied only on the clock edge) or asynchronous reset (reset applied immediately, independent of the clock). Synthesis tools sometimes infer the wrong reset type, or the standard-cell library has flip-flops with only one type of reset that the tool maps to. If the golden RTL has always_ff @(posedge clk) if (rst) q <= 0; but the netlist uses a flip-flop with an asynchronous reset pin, Formality will see a functional difference because the reset sensitivity differs.
// RTL: synchronous reset — LEC golden always_ff @(posedge clk) begin if (rst_n == 1'b0) q <= 8'h00; else q <= d; end // Formality workaround: constrain rst_n=1 to eliminate reset path from // the functional comparison (verify only the data path) set_constant r:/WORK/top/rst_n 1
Power-aware synthesis inserts Integrated Clock Gating (ICG) cells. An ICG cell is a latch-based gate that generates a glitch-free gated clock. From the LEC tool's perspective, the ICG output is a new "clock" signal that was not present in the RTL — the registers driven by it have a different clock sensitivity in the netlist than in the RTL. Most tools have built-in ICG awareness: Formality's analyze_clocks and Conformal's set clock commands identify ICG cells and handle them correctly, but the tool must be told the ICG cell name so it can match the gating function.
DFT scan insertion replaces each regular flip-flop with a scan flip-flop that has an additional scan-in (SI) input and scan-enable (SE) input. In functional mode (SE=0), the flip-flop behaves identically to the original. LEC must be run with SE constrained to 0 to perform a functional-mode comparison. Failing to constrain SE will cause every scan flop to appear NE because the tool sees an extra input that doesn't exist in the RTL.
## Formality: constrain scan_enable=0 for functional LEC set_constant i:/WORK/top/scan_en 0 ## Conformal: same effect add pin constraints 0 scan_en -revised
When the synthesis tool applies retiming to balance pipeline stages, it physically moves flip-flops across combinational logic. The number of registers may change, register names change, and the functional behavior at any single cycle boundary changes — even though the end-to-end latency and throughput of the pipeline are preserved. Combinational LEC will report massive NE because it cannot establish register mapping. The solution is to either disable retiming for blocks that must pass combinational LEC, or run sequential LEC on those blocks. Most teams disable retiming by default and enable it selectively with set_dont_retime constraints.
| NE Cause | Detection Signal | Resolution |
|---|---|---|
| Reset type mismatch | NE on all outputs of a reset-controlled register | Constrain reset to inactive; review synthesis reset inversion settings |
| ICG cell handling | NE on registers under gated clocks | Use analyze_clocks; add ICG cell type to tool library |
| Scan insertion | Widespread NE on all scan flop outputs | Constrain scan_enable=0 before running LEC |
| Retiming | UNMATCHED registers, mass NE | Use sequential LEC or disable retiming on affected modules |
| Constant propagation | NE on logic that RTL has but netlist optimized away | Ensure SVF is current; verify synthesis constraints are correct |
| Multi-driver resolution | NE on bus signals | Review synthesis resolution rules; add explicit dont_merge |
map key points followed by compare — constrain scan_enable=0 before comparing DFT netlists.analyze_datapath -effort high command to push harder on unverified points. Conformal offers set effort level ultimate and analyze datapath. If a key point remains unverified after increased effort, engineers must manually review the RTL-to-netlist mapping and potentially add user-defined key points or exclude the path with a waiver.