DFT · Chapter 13 · DFT Debug Methodology
Debugging Pattern Mismatches
Once a good flush has verified the chain, you debug pattern mismatches, where a pattern's captured response does not equal the expected value at a cell on a cycle. The datalog tells you which pattern, cell, and cycle, and your first move is to run the real-versus-false fork rather than assume a defect. The common false causes are specific: an unmasked unknown from an uninitialized flop, a non-scan cell, or bus contention, which is the top cause; a wrong clock or capture race; a bad expected value from a modeling mismatch; or the wrong test mode at apply time. The discipline is to verify the expected value with golden simulation on the good netlist first, since if simulation also shows an unknown, the pattern or model is at fault, not silicon. A real mismatch repeats, localizes, and matches the fault, feeding diagnosis.
Advanced15 min readDFTPattern DebugX-HandlingGolden SimMiscompare
Chapter 13 · Section 13.3 · DFT Debug Methodology
Project thread — the mini-SoC's pattern miscompares triaged: verify the expected value, hunt the X, and only call the survivor a real defect (which feeds diagnosis, 13.4).
1. Why Should I Learn This?
Pattern-mismatch debug is where you separate a real defect from a false miscompare — and unmasked X makes that separation the most common trap in DFT debug.
- A mismatch = captured ≠ expected at a cell/cycle (the datalog gives pattern/cell/cycle) — re-run the fork first (13.1).
- FALSE causes: unmasked X (uninit flop / non-scan cell — the #1 cause), capture race, a bad expected value, wrong mode.
- Verify the expected value with golden sim before trusting the miscompare — if sim also shows X, the pattern/model is wrong, not silicon.
- REAL = repeats, localizes, matches the fault the pattern targeted → feeds diagnosis (13.4).
2. Real Silicon Story — the miscompare that was an uninitialized flop
A team saw a handful of patterns miscompare at a few cells and prepared to scrap the affected dies as defective. The failures were repeatable, which looked like a defect.
Golden sim saved them. Before dispositioning, a DFT engineer re-ran those exact patterns in simulation on the good netlist — and sim also produced an X at the same compare cells. That meant the 'expected' value the tester compared against was itself untrustworthy: an uninitialized non-scan flop was feeding the compare point, injecting an X that the pattern set hadn't masked. This was an unmasked X, not a defect — the #1 cause of false pattern mismatches. They masked the X source (and fixed the initialization so the flop had a known value), re-ran, and the mismatches cleared. The dies were good. Lesson: a mismatch is captured ≠ expected, and before trusting the miscompare you must trust the expected value — golden-sim the pattern; if sim also shows X/mismatch, the pattern/model is the problem, not silicon. Unmasked X is the dominant false-mismatch source — hunt it before you call a mismatch a defect.
3. Factory Perspective — pattern debug through each lens
- What the test/DFT engineer sees: the miscompare triage — golden sim the pattern, hunt the X, check the mode, and only then call it real.
- What the RTL/DV engineer sees: the X sources (uninit flops, non-scan cells, black-boxes) and model mismatches (bidir/pull/tri-state) that make expected ≠ reality — a design/model fix.
- What the STA engineer sees: the capture-timing / multi-clock false causes (a race, an unconstrained inter-clock path, 12.x) — a constraint fix.
- What management cares about: that false miscompares aren't scrapped as defects (yield) and real defects aren't dismissed (quality) — the fork, applied at pattern level.
4. Concept — the miscompare fork and the golden-sim check
What a mismatch is:
- A pattern mismatch = the captured value at a cell ≠ the ATPG-expected value for that pattern. Confirm the chain first with a flush (scan chain failure debug) — a broken chain fails every pattern.
- The datalog gives which pattern, which cell(s), which cycle — your OBSERVE.
First: re-run the fork (REAL vs FALSE):
- REAL (a defect): the pattern detected a fault — repeats deterministically, localizes, matches the fault model the pattern targeted → feeds diagnosis (13.4).
- FALSE (test-setup/pattern): the miscompare is not a defect. The specific pattern-debug FALSE causes:
- X / UNKNOWN sources — uninit flop, non-scan cell, bus contention, memory read-before-write → an X propagates to a compare point → miscompare that's not a defect. Fix = mask the X source / initialize. #1 cause — uncontrolled clocks, resets and latches catalogues where they come from, and under compression one X can fail a whole set (compression loss debug).
- Multiple-clock / capture-timing — wrong-clock capture, a race, an unconstrained inter-clock path → captured at the wrong time (12.x). Not a defect.
- Bad / mis-simulated pattern — the expected value is wrong from a modeling mismatch (bidir, pull, tri-state, black-box, timing exception). Expected ≠ reality.
- Setup/mode — wrong
test_mode/scan_enable/ clock program at apply (12.5) → DUT not in the mode the pattern assumed.
The golden-sim / expected-value discipline:
- Always verify the expected value before trusting the miscompare.
- Simulate the pattern on the good netlist. If sim also produces X/mismatch at that point → the PATTERN/MODEL is the problem, not silicon (golden sim vs tester).
X-handling is central:
- Unmasked X is the dominant false-mismatch source.
- An X at a compare point can also corrupt a MISR/compactor signature (aliasing, 7.x/9.x) → mask X at the source or bound it.
Narrow it (change one variable):
- One pattern or many? One cell or many? One mode or all? At-speed only? — each narrows real-vs-false and points at a cause.
- Change one variable per experiment (slower clock, different pattern, mask an X).
5. Mental Model — checking the answer key before failing the student
Pattern debug is like a teacher who checks the answer key before failing a student for a 'wrong' answer.
- The student's answer is the captured value; the answer key is the ATPG-expected value. A mismatch looks like the student got it wrong (a defect).
- But a wise teacher first asks: is the answer key right? Maybe the question was ambiguous (an X-source — the input wasn't even defined), or the key has a typo (a bad expected value from a model mismatch), or the student answered a different exam (the wrong mode at apply). Re-solving the problem yourself (golden sim) reveals whether the key — not the student — is at fault.
- If your own solution also comes out 'undefined' at that question (sim shows X too), the question/key is broken, not the student — fix the exam (mask the X, fix the model/mode), don't fail them (scrap the die).
- Only when the key is verified right and the student still got it wrong, repeatably, in a way that matches a known misconception (the fault model) do you mark it a real error (a defect) — and investigate which concept they missed (diagnosis).
Check the answer key (golden-sim the expected value) before failing the student (scrapping the die) — a mismatch is often a broken question (unmasked X / bad model / wrong mode), not a wrong answer (a defect).
6. Working Example — triaging a mismatch with golden sim
Trace a mismatch through the golden-sim check and the fork:
# Pattern-mismatch triage - REPRESENTATIVE, tool-neutral:
OBSERVE (datalog): pattern P57 miscompares at cell c (bit 812), cycle = capture, repeats every run
--- FORK: REAL (defect) or FALSE (test-setup/pattern)? ---
STEP 1 - VERIFY THE EXPECTED VALUE (golden sim on the GOOD netlist):
re-simulate P57 -> does sim ALSO show X or a mismatch at cell c?
YES, sim shows X at c -> the EXPECTED value is untrustworthy -> a PATTERN/MODEL problem, NOT silicon
NO, sim gives a clean 0/1 -> the expected value is trustworthy -> the miscompare is more likely REAL
STEP 2 - HUNT the FALSE causes (if sim showed X, or to be sure):
X source? trace c's cone -> an UNINIT flop / NON-SCAN cell / bus contention / mem read-before-write feeding c
-> MASK the X source or INITIALIZE it (X = #1 false cause ; also corrupts MISR/compactor, 7.x/9.x)
capture race? wrong-clock capture / unconstrained inter-clock path (12.x) -> re-run with corrected capture
bad expected? a bidir/pull/tri-state/black-box/timing-exception the ATPG model missed -> fix the model
wrong mode? test_mode/scan_enable/clock program wrong at apply (12.5) -> put the DUT in the assumed mode
STEP 3 - NARROW (change ONE variable): one pattern vs many? one cell vs many? one mode? at-speed only?
--- DISPOSITION ---
FALSE -> fix the setup/pattern/model, re-run -> mismatch clears (good die)
REAL -> repeats, localizes, matches the targeted fault -> feed DIAGNOSIS (13.4) to localize the defectAn X from an uninitialized flop propagating to a compare point is the classic false miscompare:
An uninitialized flop injects X → propagates to a compare point → false miscompare (golden sim shows X too)
8 cycles6b. Localizing a mismatch, worked
The datalog says which pattern, which chain, which unload bit. Turning that into a cell is arithmetic, and it runs from the scan-out end — the bits that emerge first are the cells nearest scan-out.
DATALOG EXTRACT
device : lot 4471, wafer 12, die (14,9)
pattern : 18432 (transition, LOC)
chain : 7 (length L = 412 cells)
unload bit : 137 (1-based, first bit out = 1)
expected : 1
observed : 0
other chains: all pass
LOCALIZE
Cell k, numbered 1..L from SCAN-IN:
k = L + 1 - u = 412 + 1 - 137 = 276
So unload bit 137 is the capture value of scan cell 276 on chain 7.
Sanity-check the direction, every time:
u = 1 -> k = 412 : first bit out is the cell nearest SCAN-OUT
u = L -> k = 1 : last bit out is the cell nearest SCAN-IN
If your formula gives the opposite, you are counting from the wrong end -
on a 412-cell chain that is a 275-cell error.
CROSS-REFERENCE
Map cell 276 in chain 7's stitched order to its instance name (see
/dft/scan-stitching-ordering), then ask the
ATPG tool which fault(s) pattern 18432 targeted at or near that cell. A
mismatch at a cell the pattern was NOT targeting is a strong hint of a FALSE
cause (an X arriving from elsewhere) rather than the intended detection.Separating shift infrastructure from capture logic
The single most useful experiment on a mismatch is the one that decides which half of the scan operation is broken, because the two lead to completely different investigations. Both experiments use the same silicon and the same tester setup, changing one variable.
EXPERIMENT A - SHIFT ONLY (chain integrity / flush)
Load a known pattern, shift it straight out, perform NO capture.
This exercises the chain and nothing else: cell -> cell connectivity,
shift clock, scan_enable held high, lock-up latches.
unload == load (delayed by L) -> SHIFT INFRASTRUCTURE IS GOOD
unload != load -> SHIFT problem: stop here.
Every pattern result is noise until
the chain is fixed (see
/dft/scan-chain-failure-debug).
EXPERIMENT B - CAPTURE ONLY (load, capture, unload)
Run the full pattern but compare ONLY the cells the pattern targets, with
everything else masked.
A passes and B fails -> the chain carries data correctly, so the fault
is in the CAPTURE path: combinational logic,
capture clocking, an X source, or a stale
expected value.
A fails and B fails -> fix A first. A broken chain fails every
pattern and tells you nothing about capture.
THE DECISION TABLE
flush patterns conclusion
------ --------- ----------------------------------------------------
FAIL FAIL shift infrastructure. Localize the break; ignore
pattern content entirely until it is fixed.
PASS FAIL(all) capture-side and systemic: mode/OCC program, a global
X source, or patterns generated against a stale netlist.
PASS FAIL(few) capture-side and local: a real defect, or an X reaching
a small set of compare points. Golden-sim first.
PASS PASS no mismatch to debug.The middle row is the one that catches teams out. All patterns failing on a chain that flushes cleanly is not a defect signature — a single die does not develop hundreds of independent faults. It points at something applied to every pattern equally: the wrong test mode, an OCC program that does not match what ATPG assumed, or expected values generated from a netlist that no longer matches the silicon.
Every pattern touching one block miscompared, and the silicon was fine
STALE-EXPECTED-VALUESA respin came back and roughly 8% of ATPG patterns failed on every die tested, across wafers and lots. The failing patterns all had compare points inside one functional block; patterns confined to other blocks passed completely.
Chain integrity passed on every chain at every shift frequency. Yield on the functional test was normal. A 100% failure rate on a subset of patterns, with clean chains and healthy functional behaviour, does not describe a manufacturing defect — a defect affects some dies, not all of them identically.
Golden simulation settled it, and this is exactly the discipline the previous section describes: verify the expected value before trusting the miscompare.
Simulate pattern 18432 on the netlist ATPG was run against (rev C):
cell 276 expected = 1 matches the pattern file
Simulate the SAME pattern on the netlist that was actually taped out (rev D):
cell 276 expected = 0 matches what silicon returnedSilicon and the current netlist agreed with each other and disagreed with the pattern file. That is the signature of stale expected values, and it inverts the usual conclusion: the device is behaving correctly and the test is wrong.
The distribution corroborated it. The failing patterns' compare points mapped onto the region touched by a late ECO — a buffer insertion plus a small logic change to fix a timing path — and no failing compare point lay outside it.
ATPG patterns were generated against netlist revision C. A timing ECO produced revision D, which was what taped out, and the patterns were not regenerated. Every pattern whose expected values depended on logic the ECO touched now carried an answer key for a chip that does not exist.
The failure mode is worth naming precisely because it inverts the normal inference. A mismatch usually means the silicon disagrees with the design; here the silicon matched the design, and the pattern disagreed with both. No amount of physical failure analysis on those dies would have found anything, because there was nothing wrong with them.
Two properties identify it before any simulation is run. It affects 100% of dies, which no defect mechanism does. And the failing compare points are spatially clustered on the netlist rather than scattered — they follow a region of logic, not a distribution of random defects.
The reason it survives is process rather than technical: pattern regeneration is a long job that sits late in the schedule, and an ECO described as "timing only, no functional change" reads as though it cannot affect expected values. It can — any change to the logic cone feeding a compare point changes what that cell captures.
Regenerate the patterns against the taped-out netlist and re-run. There is no partial fix: patterns are only meaningful against the netlist they were computed from.
The process guard is a netlist fingerprint carried in the pattern set, checked at apply time:
# At pattern generation, record what the patterns were built from.
set nl_md5 [exec md5 -q $netlist_file]
write_patterns -format stil -comment "netlist_md5=$nl_md5" -output pat_18432.stil
# At apply, refuse to run patterns whose fingerprint does not match the
# netlist that was taped out.
if {$pattern_netlist_md5 ne $taped_out_netlist_md5} {
error "PATTERN/NETLIST MISMATCH: patterns built from $pattern_netlist_md5,\
silicon is $taped_out_netlist_md5 - regenerate before applying"
}The triage rule that would have short-circuited the whole investigation, and that generalises to every ATPG debug:
- 100% of dies failing the same patterns is never a defect. Defects vary across dies; test-setup and pattern problems do not.
- Spatially clustered compare points point at a region of logic — an ECO, a black box, a model mismatch — rather than at a distribution of faults.
- Golden-sim against the current netlist before physical failure analysis. It costs a simulation and it is the only thing that distinguishes "silicon is wrong" from "the answer key is wrong".
For the shift-side half of this fork see scan chain failure debug, and for the tester-setup causes that produce a similar all-dies signature, silicon bring-up and tester debug.
7. Industry Flow — verify expected, hunt X, then diagnose the real ones
Pattern debug verifies the expected value, hunts the false causes (X first), and only sends survivors to diagnosis:
8. Debugging Session — repeatable miscompares that were unmasked X
A handful of patterns miscompare at a few cells, and because the failures are repeatable the team suspects a defect and wants to scrap the affected dies, but golden simulation of those exact patterns on the good netlist also shows an X at the same cells, revealing that an uninitialized non-scan flop feeds the compare point and injects an unmasked X -- so it is X-noise, not a defect, and the fix is to mask the X source or initialize the flop, after which the mismatches clear and the dies are good
VERIFY THE EXPECTED VALUE AND HUNT X BEFORE CALLING A MISMATCH A DEFECT — UNMASKED X IS THE #1 FALSE CAUSEA handful of patterns miscompare at a few cells, repeatably. Because it repeats, the team suspects a defect and wants to scrap the affected dies. Real defect, or not?
It is X-noise, not a defect: golden simulation of those exact patterns on the good netlist also shows an X at the same cells, revealing that an uninitialized non-scan flop feeds the compare point and injects an unmasked X. A repeatable miscompare looks like a defect, but repeatability alone doesn't make it real — an X-source produces a deterministic miscompare too (the X is there every run). The decisive test is the expected-value / golden-sim check: re-simulate the failing patterns on the good netlist and ask whether the expected value itself is trustworthy. Here, sim also produces an X at the same compare cells — which means the 'expected' value the tester compared against was never a clean 0/1; it was corrupted by an X that the pattern set failed to mask. Tracing the compare point's cone finds the culprit: an uninitialized non-scan flop (outside the scan chains, so not controlled by the shifted pattern) whose unknown value propagates to the compare point at capture. This is an unmasked X — the #1 cause of false pattern mismatches — and it is emphatically not a silicon defect: the die is fine; the test setup let an X reach a compare point. (An unmasked X is doubly dangerous because it can also corrupt a MISR/compactor signature via aliasing, 7.x/9.x, turning one X into a whole-signature miscompare.) Scrapping these dies would be yield loss on good silicon — the pattern-level version of the wafer-scrap mistake in 13.1.
Verify the expected value and hunt X before dispositioning: golden-sim the failing patterns, find the uninitialized non-scan flop feeding the compare point, mask the X source (or initialize the flop so it has a known value), then re-run — after which the mismatches clear and the dies are good. Make the golden-sim check a required step before any pattern-mismatch disposition: re-simulate the failing patterns on the good netlist; if sim shows X/mismatch at the compare point, the expected value is untrustworthy and the problem is the pattern/model, not silicon. Then hunt the X source — trace the compare point's cone to the uninitialized non-scan flop (or bus contention / memory read-before-write) — and fix it: mask the X source in the pattern set so the X can't reach the compare (and can't corrupt the compactor signature, 7.x/9.x), and/or initialize the offending flop so it holds a known value (an RTL/DV fix). Re-run: the false miscompares clear, and any remaining mismatch — one that repeats, localizes, and matches the fault the pattern targeted — is a real defect for diagnosis (13.4). The principle to lock in: a pattern mismatch is captured-not-equal-to-expected, and before trusting the miscompare you must trust the expected value — so golden-sim the pattern on the good netlist, because if simulation also produces an X or mismatch at that compare point, the pattern or model is the problem, not silicon; the dominant false cause is an unmasked X (an uninitialized flop, a non-scan cell, bus contention, a memory read-before-write) that propagates to a compare point and produces a repeatable miscompare which is not a defect (and which can also corrupt a MISR or compactor signature via aliasing), so you mask the X at its source or initialize it rather than scrapping the die; only a mismatch that repeats, localizes, and matches the targeted fault survives as a real defect for diagnosis — and repeatability alone never proves a defect, because X-noise repeats too. (The fork is 13.1; X-sources and compaction/aliasing are the coverage/compression chapters, 7.x/9.x; capture timing is 12.x; diagnosis is 13.4.)
9. Common Mistakes
- Trusting the miscompare before the expected value. Golden-sim the pattern — if sim shows X, the pattern/model is wrong, not silicon.
- Calling a repeatable miscompare a defect. X-noise repeats too — repeatability alone doesn't prove a defect.
- Not hunting X first. Unmasked X is the #1 false cause — trace the compare cone for uninit/non-scan/contention.
- Ignoring the compactor. An X at a compare point corrupts the MISR/compactor signature (aliasing, 7.x/9.x) — mask at the source.
- Changing many variables at once. Change one (slower clock, mask an X, different pattern) per experiment.
10. Industry Best Practices
- Golden-sim the failing pattern on the good netlist before dispositioning — verify the expected value.
- Hunt X first — mask the source or initialize; X is the dominant false-mismatch cause (and corrupts signatures).
- Check capture timing / mode (12.x/12.5) — a race or wrong mode at apply mimics a defect.
- Narrow with one variable per experiment — one pattern/cell/mode, at-speed vs slow.
- Only send survivors to diagnosis — mismatches that repeat, localize, and match the targeted fault are real (13.4).
11. Senior Engineer Thinking
- Beginner: "These patterns miscompare and it repeats — it's a defect, scrap the dies."
- Senior: "Repeatable doesn't mean real — X-noise repeats too. First I golden-sim the patterns: if sim also shows X at those cells, the expected value is untrustworthy — a pattern/model problem, not silicon. I hunt the X source (uninit/non-scan/contention), mask it (it also corrupts the compactor signature), and re-run. Only a mismatch that repeats, localizes, and matches the targeted fault is a real defect — that one goes to diagnosis. Verify the key before failing the student."
The senior golden-sims the expected value and hunts X before ever calling a mismatch a defect.
12. Silicon Impact
Pattern-mismatch debug is where the fork of 13.1 gets its sharpest, most error-prone test, because a miscompare is inherently ambiguous — the same observation (captured ≠ expected, repeatably) can be a real defect or a false artifact of the test itself. With the chain verified by a good flush (13.2), the failures are genuine pattern-level events, but your first move is still triage, not disposition: re-run the fork. The FALSE causes are specific and dominated by one: unmasked X. An uninitialized flop, a non-scan cell, a bus contention, or a memory read-before-write injects an X that propagates to a compare point, producing a repeatable miscompare that is not a defect — and crucially, repeatability alone never proves a defect, because X-noise repeats too. (An unmasked X is doubly costly: it can also corrupt a MISR/compactor signature via aliasing, 7.x/9.x, turning one stray X into a whole-signature failure.) The other FALSE causes — a capture race / multi-clock issue (captured at the wrong time, 12.x), a bad/mis-simulated expected value from a model mismatch (bidir, pull, tri-state, black-box, timing exception), and a wrong mode at apply (12.5) — all share the same trap: the 'expected' value is untrustworthy. That is why the decisive discipline is the golden-sim / expected-value check: simulate the failing pattern on the good netlist, and if sim also shows X/mismatch at that compare point, the PATTERN/MODEL is the problem, not silicon — you fix the setup (mask the X at its source, initialize the flop, correct the capture/mode/model) and re-run, rather than scrapping good dies (the pattern-level echo of the wafer-scrap mistake in 13.1). Only a mismatch that survives — one that repeats, localizes, and matches the fault the pattern targeted — is a REAL defect, and it feeds diagnosis (13.4) for precise localization. For the test/DFT engineer, this is the golden-sim-and-hunt-X loop; for the RTL/DV engineer, it's a call to initialize state and fix models; for the STA engineer, it's the capture-timing false causes; and for the program, it's the yield-vs-quality balance struck at the finest grain. The throughline of the chapter holds: verify the expected value before trusting the miscompare, hunt X before calling a mismatch a defect — and pass only the survivors to diagnosis.
13. Engineering Checklist
- Re-ran the fork — REAL vs FALSE — before dispositioning the mismatch (13.1).
- Golden-simmed the failing pattern on the good netlist — verified the expected value.
- Hunted X first — masked the source / initialized (and protected the compactor signature, 7.x/9.x).
- Checked capture timing / mode (12.x/12.5) and narrowed with one variable per experiment.
- Sent only survivors (repeat + localize + match the targeted fault) to diagnosis (13.4).
14. Try Yourself
- Define a pattern mismatch (captured ≠ expected) and name what the datalog gives you (pattern/cell/cycle).
- List the FALSE pattern-debug causes — and why unmasked X is the #1 one.
- Explain the golden-sim check: why verifying the expected value on the good netlist comes before trusting the miscompare.
- Show an uninit-flop X reaching a compare point → a false miscompare → and how masking/init fixes it.
- State what makes a mismatch REAL (repeats, localizes, matches the targeted fault) and where it goes next (13.4).
The triage/golden-sim reasoning is tool-neutral; patterns come from ATPG, the datalog from the ATE, golden sim from a simulator. No paid tool required to reason about pattern debug.
15. Interview Perspective
- Weak: "If a pattern fails, the chip has a defect there."
- Good: "I check whether it's a real fault or an X / bad expected value, and I mask X sources."
- Senior: "A mismatch is captured ≠ expected, and it's ambiguous — so I re-run the fork. The #1 false cause is unmasked X (an uninit flop, non-scan cell, contention) propagating to a compare point — a repeatable miscompare that's not a defect (and it can corrupt the compactor signature too, 7.x/9.x). So before trusting the miscompare I verify the expected value with golden sim on the good netlist: if sim also shows X, the pattern/model is wrong, not silicon — I mask the X source or initialize, fix any capture-race / wrong-mode issue (12.x/12.5), and re-run. Repeatability alone doesn't prove a defect — only a mismatch that repeats, localizes, and matches the targeted fault is real, and that one goes to diagnosis (13.4)."
16. Interview / Review Questions
16b. Where This Is Specified
- IEEE 1149.1-2013 — Standard for Test Access Port and Boundary-Scan Architecture. The boundary-scan register and TAP, whose unload ordering follows the same scan-out-first model used by the localization arithmetic above.
- IEEE 1500-2005. Core test wrappers and wrapper chains, localized identically.
- Standard Test Interface Language (STIL), IEEE 1450. The pattern-interchange format in which expected values and their netlist provenance are carried between ATPG and the tester.
Fault models, ATPG pattern generation, X-masking strategies, compression and MISR signature behaviour, and datalog formats are established engineering practice rather than standardised behaviour, and are documented per tool and per tester.
17. Key Takeaways
- A pattern mismatch = captured ≠ ATPG-expected at a cell/cycle (the datalog gives pattern/cell/cycle) — re-run the fork first (13.1); repeatability alone does not prove a defect.
- FALSE pattern-debug causes: unmasked X (uninit flop / non-scan cell / contention / mem read-before-write — the #1 cause), multi-clock / capture race (12.x), a bad/mis-simulated expected value (model mismatch), and the wrong mode at apply (12.5).
- Verify the expected value with golden sim on the good netlist before trusting the miscompare — if sim also shows X/mismatch, the PATTERN/MODEL is wrong, not silicon.
- X-handling is central: unmasked X is the dominant false-mismatch source and can corrupt a MISR/compactor signature (aliasing, 7.x/9.x) → mask X at the source or bound it (or initialize).
- A REAL mismatch repeats, localizes, and matches the fault the pattern targeted → it feeds diagnosis (13.4). Narrow with one variable per experiment (slower clock, mask an X, different pattern). Next: 13.4 — diagnosis & failure localisation.
18. Quick Revision
Debugging pattern mismatches. With a GOOD flush (13.2), debug PATTERN miscompares: captured ≠ ATPG-expected at a cell/cycle (datalog = pattern/cell/cycle). FORK FIRST (13.1). FALSE causes: unmasked X (uninit flop / non-scan cell / contention — the #1 cause, also corrupts MISR/compactor via aliasing 7.x/9.x), multi-clock/capture race (12.x), bad expected value (bidir/pull/tri-state/black-box model mismatch), wrong mode at apply (12.5). DISCIPLINE: verify the EXPECTED value with golden sim on the good netlist BEFORE trusting the miscompare — if sim also shows X/mismatch, the pattern/model is wrong, NOT silicon → mask X at the source / initialize / fix model/mode, re-run. Repeatable ≠ real (X-noise repeats). REAL = repeats + localizes + matches the targeted fault → diagnosis (13.4). Narrow with ONE variable per experiment. Next: 13.4 — diagnosis & localisation.