Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
    • Equivalence Checking
      • Combinational Equivalence of RTL and Netlist
      • Key Points and Black Boxes
      • Retiming and FSM Recoding
      • Reading an Equivalence Failure
      • Constants and Brute Force
    • Incremental Compile and ECO
    • Physical-Aware Synthesis and Handoff
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

‹Equivalence Checking
  1. Topics
  2. Logic Synthesis
  3. Verification, ECO and Handoff
  4. Equivalence Checking
  5. Reading an Equivalence Failure

Part 7 · Verification, ECO and Handoff · Intermediate

Reading an Equivalence Failure

Counterexamples, localisation, and a mutated netlist proven different.

On this page

    What a failure contains

    A failure names one key point, one input vector, and the two values. That triple reproduces the divergence in simulation without further search.

    Everything else is context. The vector is the fact; the cone explains it.

    Field

    Example

    Use

    Key point

    Output y.

    Names the cone to inspect.

    Vector

    a=0, b=0, c=1.

    Replays the divergence.

    Values

    RTL 1, netlist 0.

    Shows the polarity of the bug.

    A mutated netlist

    The script below places the RTL and the mutated block side by side with full input ports. On the vector a=0, b=0, c=1 the RTL gives 1 and the mutated block gives 0, since the mutated term drops the inverter on a.

    The miter exposes the shared inputs as in_a, in_b and in_c. The solver call pins those to that vector and asks for the trigger output at 1, so it exits cleanly only when a counterexample exists there.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    read_verilog <<EOV
    module gold(input wire a, b, c, output wire y);
    assign y = (a & b) | (~a & c);
    endmodule
    module gate(input wire a, b, c, output wire y);
    assign y = (a & b) | (a & c);
    endmodule
    EOV
    proc
    opt
    miter -equiv -flatten -make_outputs gold gate m
    hierarchy -top m
    sat -set in_a 0 -set in_b 0 -set in_c 1 -set trigger 1 -verify m
    log PASS: vector a0 b0 c1 separates RTL 1 from mutated netlist 0

    Hand evaluation agrees: RTL gives (0 AND 0) OR (1 AND 1), which is 1. The mutated block gives (0 AND 0) OR (0 AND 1), which is 0.

    Localising the cone

    From the failing key point, walk backwards through its fan-in on both sides. The first gate whose inputs agree but whose outputs differ is the divergence origin.

    Here the origin is the inverter on a in the second product term. The full table splits eight vectors into five agreements and three differences.

    Diagram
    8 vectors total: 5 agree, 3 differ
    agree share = 5 / 8 = 62.5%
    differ share = 3 / 8 = 37.5%
    62.5 + 37.5 = 100

    Common mistakes

    Common pitfall

    Fixing the vector instead of the cone hides the bug. A waiver on a=0, b=0, c=1 leaves a=0, b=1, c=1 and a=1, b=0, c=1 still divergent.

    Interview

    Likely probes: reading a counterexample aloud.

    • State the key point, the vector, and both values.

    • Walk fan-in to the first gate that disagrees.

    • Check the remaining differing vectors before closing the bug.

    Check yourself The report shows RTL 1 and netlist 0 at a=0, b=0, c=1. Which term explains it?

    The second product term. RTL computes NOT-a AND c as 1; the mutated block computes a AND c as 0.

    Check yourself The fix restores the inverter and the proof passes. Why also check a=0, b=1, c=1 and a=1, b=0, c=1?

    Both differed too. The first shares the same cause at a=0 and c=1; the second diverges with opposite polarity, since at a=1 the RTL gives b=0 while the mutated block gives b OR c=1.

    Related topics

    • Combinational equivalence

    • Constants and brute force

    Previous

    102 / 139

    Next: Constants and Brute Force

    Up next

    Up nextConstants and Brute Force

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Combinational Equivalence of RTL and Netlist
    • Key Points and Black Boxes