The equivalence check fails between the RTL and the handed-off netlist. Simulation passed, so the divergence hides where the tests never looked.
The failing cone is small: a 3-input function of a, b, and c. The program below exhausts all 8 input patterns against the golden function.
Pattern group | Golden y | Netlist y | Agrees |
|---|---|---|---|
a and b both 1 (2 patterns) | 1 | 1 | Yes |
Otherwise, c is 1 (3 patterns) | 1 | 0 | No |
Otherwise, c is 0 (3 patterns) | 0 | 1 | No |
Confirm the two sides come from the same revision first. Most failures are version skew, not real logic bugs.
Then localize with the counterexample: one failing pattern names the cone, and the cone names the gate. Rank the causes before editing.
Rank | Likely cause | How to confirm |
|---|---|---|
1 | RTL and netlist from different revisions | Compare version tags on both sides. |
2 | A hand edit applied to one side only | Diff the cone against the last passing pair. |
3 | A mismatched parameter or constant | Check parameter bindings in the cone. |
4 | An unmapped black box in the path | List black boxes in the failing cone. |
Golden is (a and b) or c. The netlist built (a and b) or (not c), a single inversion. Six of eight patterns disagree, which is 75 percent.
The program below counts the disagreements for the buggy and the fixed netlist. Zero disagreements is the bar for handoff.
golden y = (a and b) or c; buggy y = (a and b) or (not c)
when a and b are both 1, both give 1: 2 of 8 patterns agree
otherwise c and not c always differ: 6 of 8 patterns disagree
disagreement = 6 / 8 = 0.75 = 75%
fixed y = (a and b) or c: 0 of 8 patterns disagreeimport sys
def golden(a, b, c):
return (a and b) or c
def buggy(a, b, c):
return (a and b) or (not c)
def fixed(a, b, c):
return (a and b) or c
miss_buggy = 0
miss_fixed = 0
total = 0
for n in range(8):
a = (n >> 2) & 1
b = (n >> 1) & 1
c = n & 1
total = total + 1
if buggy(a, b, c) != golden(a, b, c):
miss_buggy = miss_buggy + 1
if fixed(a, b, c) != golden(a, b, c):
miss_fixed = miss_fixed + 1
bad = 0
if total != 8:
bad = bad + 1
if miss_buggy != 6:
bad = bad + 1
if miss_fixed != 0:
bad = bad + 1
if bad != 0:
print("FAIL: agreement count broke on " + str(bad) + " checks")
sys.exit(1)
print("PASS: buggy netlist differs on 6 of 8 patterns, fixed on 0")Fix the source side and re-run the full check, not just the failing cone. A local fix can move the divergence elsewhere.
Full re-verification costs machine time on every fix. Incremental checks on the cone guide the debug, and the full run closes it.
Six of eight. They agree only when a and b are both 1, which is 2 patterns.
No. Re-run the full check, since a local fix can move the divergence to another cone.