How it is built
Architecture overview
A semiconductor fab turns a silicon wafer into hundreds of identical dice through hundreds of process steps. A particle, a scratch or a pattern error at any step can kill a die, and the cost of finding out late is large: a wafer travels through the line for weeks. The wafer inspection and yield system finds defects early, measures critical dimensions, and ties the findings to the yield that comes out of final electrical test, so engineers know which tool, which step and which lot is losing money.
It works at three scales. At the tool, optical or electron-beam inspection and metrology tools scan each wafer and detect defects by comparing each die to a reference (another die, or a rendering of the design). At the wafer, defect positions and test failures form a map whose shape is diagnostic: a ring points to a spin or etch step, a scratch to a handling tool, a cluster to a particle source. At the fab, inline measurements flow as time series into statistical process control (SPC), and yield models and machine-learning models connect process and tool data with final yield. The result is a loop: detect, classify, trace to a cause, fix the tool, check that the signature disappears.
Parts:
- Equipment interface — collects data and events from process and inspection tools — secs-gem-equipment-protocol (no page yet)
- Defect detection — finds defects in tool images by die-to-die or die-to-database comparison — image-alignment-registration (no page yet), image-denoising (no page yet), geometric-pattern-matching (no page yet), Fast Fourier transform, subpixel-edge-measurement (no page yet)
- Review and classification — decides what each defect is — image-segmentation (no page yet), Convolutional networks, active-learning (no page yet), Weight quantization
- Wafer-map signatures — groups defects and test failures by spatial pattern — Density-based clustering (DBSCAN), k-means clustering, k-d tree
- Inline monitoring — watches measurements over time and raises excursions — Control charts (Shewhart, CUSUM, EWMA), change-point-detection (no page yet), Time-series anomaly detection, Isolation forest, Robust statistics, Time-series chunk storage
- Yield model and analytics — predicts and explains yield loss — negative-binomial-yield-model (no page yet), Gradient-boosted decision trees (GBDT)
- Data integration — joins lots, wafers, dice, tools and recipes across systems and keeps the history — Entity resolution, data-lineage-tracking (no page yet), columnar-file-format (no page yet)
process tools ─┐ events, sensor traces (SECS/GEM) ┌──► SPC / excursion alerts ──► hold lot, fix tool
inspection ────┼─► collection ─► time-series store ─► SPC, change-point, anomaly
metrology ────┘ │
▼
wafer images ─► align ─► denoise ─► die-to-die diff ─► candidate defects ─► review images ─► classifier
│ │
▼ ▼
defect map (x, y, class) ──► clustering ──► signature
│
final test (die pass/fail) ─► wafer map ─────────────────────────────────────────────────────┤
▼
lot genealogy, recipes, tools (joined by entity resolution) ───────────► yield model (negative binomial, trees)
Two data rates meet here: images at the tool (large, bursty, processed on the tool or next to it) and numbers everywhere else (small, continuous, kept for years). The architecture keeps them apart and joins them on wafer, die and step identifiers.
How the parts fit together
Equipment interface
Tools talk to the factory host through SEMI standards. secs-gem-equipment-protocol (no page yet) covers the message layer (SECS-II, SEMI E5), the equipment behaviour model (GEM, SEMI E30) and the TCP/IP transport (HSMS, SEMI E37). The host subscribes to events (lot started, step done, alarm), requests status variables and reports, and sends remote commands such as hold or start. Defect results are usually not sent over SECS/GEM: the tool writes result files (inspection lots, defect lists, review images) that the system picks up, while SECS/GEM carries the control and state side so the system knows which wafer was on which chamber at what time.
The contract to the rest of the system is a timestamped stream of events keyed by tool, chamber, lot, wafer and recipe. Clock skew between tools breaks genealogy, so all of them are synchronised and the receive time is stored beside the event time.
Defect detection
A scan produces a stream of image patches. Die-to-die detection compares each patch to the same position on a neighbouring die; the design repeats, so the difference should be zero except for defects and noise. Die-to-database compares against a rendering of the intended layout, needed when there is no neighbour (a single die in the field) or when a systematic error is identical on neighbouring dice.
The comparison only works if the images are aligned to a fraction of a pixel. image-alignment-registration (no page yet) finds the shift (and small rotation or scale) between test and reference: pyramid matching for the coarse estimate, then phase correlation or feature matching for sub-pixel refinement. The shift can be found with the Fast Fourier transform: the normalised cross-power spectrum of two shifted images is a pure phase ramp, whose inverse transform is a sharp peak at the shift. The same transform removes repeating patterns: memory arrays are periodic, their spectrum is a few strong peaks, and notching those peaks suppresses the array so defects stand out.
After alignment, image-denoising (no page yet) lowers the noise in the difference image. Sensor noise, line-edge roughness and grain create false differences; averaging several reference dice into one golden reference lowers the reference's noise, and filtering the difference (a bilateral or non-local-means filter) keeps edges and kills speckle. A per-pixel threshold based on the local noise estimate, and not a global threshold, decides what is a candidate defect; the threshold is the sensitivity knob, and the sensitivity versus nuisance-rate trade-off is the central tuning problem.
geometric-pattern-matching (no page yet) serves alignment of the wafer itself and of each care area: it finds a known contour (an alignment mark, a die corner) under rotation and small scale change using gradient-direction matching, so the tool knows where each die is. subpixel-edge-measurement (no page yet) supports metrology: the edge of a line in an electron-beam image is located to a small fraction of a pixel by fitting the gradient profile across it, and the distance between two edges is the critical dimension. A drifting critical dimension is often the first sign that a process is leaving its window.
Review and classification
Detection finds thousands of candidates per wafer; many are nuisance (noise, harmless variation). A review step re-images the sites at higher magnification, and a classifier labels each: particle, scratch, residue, pattern bridge, missing pattern, nuisance. image-segmentation (no page yet) outlines the defect region so size, shape and position relative to the design features (on a line, between lines, over a via) are measurable; Convolutional networks do both the segmentation and the classification. A classifier is only as good as its labels, and labels are expensive because they need an engineer's judgement.
active-learning (no page yet) spends that effort well: the model picks the images it is least sure of or that are unlike anything labelled, the engineer labels those, and the model retrains. Uncertainty must be Calibration-checked, or the pick list is dominated by overconfident mistakes. New defect types appear whenever the process changes, and a classifier that cannot say "unknown" will fit a new type into the nearest old class; an explicit unknown class sent to a human is the safer default.
Inference runs next to the tool, often on an embedded GPU or a shared server. Weight quantization keeps the network small and fast (8-bit weights, per-group scales), which matters because the review budget is seconds per wafer, not per defect.
Wafer-map signatures
Each defect and each failing die has coordinates on the wafer. Their pattern tells the cause. The system groups points with Density-based clustering (DBSCAN): points packed densely form clusters, isolated points are labelled noise, and the number of clusters need not be known in advance. This fits scratches (long thin clusters) and particle clouds. A k-d tree makes the neighbour queries behind it fast: DBSCAN asks "which points lie within ε of this one" for every point, which a k-dimensional tree answers in logarithmic time. k-means clustering fits compact shapes: it separates a centre-concentrated failure from an edge ring when the number of groups is chosen from the data, and it is a quick way to group wafers by their binned failure map before labelling.
Labelled signature classes are public for research: the WM-811K data set of wafer maps with failure-pattern labels (Wu, Jang and Chen 2015) uses classes such as centre, donut, edge-ring, edge-local, local, random and scratch. In production the same ideas are applied to the maps of the fab's own products, and the signature names map to process areas.
Inline monitoring
Metrology and inspection produce thousands of numbers per lot: critical dimensions, film thickness, defect counts. They are stored as Time-series chunk storage: immutable compressed chunks per series, with timestamps delta-of-delta coded and values XOR-coded, so years of history are cheap and a range read touches only the chunks it needs.
Control charts (Shewhart, CUSUM, EWMA) estimates the normal behaviour from healthy data and flags points beyond control limits (for instance three standard deviations) or non-random runs. Fab data are not clean: tool maintenance, recipe changes and mixed products create steps. Robust statistics gives limits that survive outliers, using the median and the median absolute deviation instead of mean and standard deviation. change-point-detection (no page yet) (CUSUM, PELT and relatives) finds the moment a mean shifts, which separates a slow drift from a step and gives the time to look for causes in the maintenance log. Time-series anomaly detection predicts the expected value from a seasonal or trend model and flags large residuals, for series with daily cycles from fab temperature or load. When many correlated parameters matter together, Isolation forest scores a lot as an anomaly by how few random splits isolate it, with no assumption of a distribution; it catches combinations that no single control chart shows.
An alert must say which tool, chamber and lots are affected and what to do (hold, re-measure, send for review). Alert fatigue is the failure to design against: each chart has an owner and a documented action.
Yield model and analytics
The baseline model of random-defect yield is the Poisson model, Y = exp(−A · D₀), for die area A and defect density D₀. Real defects cluster, which means that the dice lost to one defect cluster are fewer than Poisson predicts, and observed yield is higher. The negative-binomial-yield-model (no page yet) Y = (1 + A · D₀ / α)^(−α) adds a clustering parameter α (Poisson is the limit as α grows large) and is the standard working model. Fitting α and D₀ from inspected defect counts and measured yield per layer turns the inspection data into a forecast of how much yield each layer costs, and which layer to fix first.
For causes that are not random particles (systematic loss from tool, chamber, recipe or lot), the system uses Gradient-boosted decision trees (GBDT) to predict die or wafer yield from process, metrology and tool-history features, and ranks features by importance to point to the tool or step where yield separates. Since fab data are observational, a ranking is a lead, not proof: a suspect chamber is confirmed by comparing wafers that were processed in parallel on the other chambers.
Data integration
A wafer carries different identifiers in different systems: lot and slot in the MES, a scribe ID read by the tool, a tool-local wafer index, and a file name. Dice are named by grid coordinates that differ in origin and orientation between inspection, test and design. Entity resolution links these: block on lot and slot, then match scribe IDs and timestamps, and union the equivalences into one canonical wafer and die key. Wrongly merged wafers poison the yield analysis, so the match rules are conservative and ambiguous cases wait for review.
data-lineage-tracking (no page yet) records which inputs and transforms produced each number: which scan, recipe version, model version and threshold gave this defect count. When a classifier or threshold changes, lineage tells which stored results are stale and need a rerun. Analytic tables are stored in a columnar-file-format (no page yet): one column per attribute, compressed with dictionary and run-length coding, so a scan over "defect class by layer by month" reads only those columns. Apache Parquet is the common open example.
Data and control flow
One inspected wafer:
- The MES releases the lot; SECS/GEM events say the wafer entered the inspection tool with a given recipe.
- The tool scans, aligns patches, subtracts the reference, applies thresholds and writes a defect list and patches.
- A sample of defects goes to review; the classifier labels them; low-confidence ones go to an engineer.
- The defect map is joined to wafer and die keys; clustering finds signatures.
- Counts per class and layer are appended to the time-series store; SPC rules run on arrival.
- If a rule fires, an alert goes to the area owner with lots and tools; a hold may be placed through the host.
Closing the loop: final electrical test produces a die pass/fail map weeks later. It is joined to the defect maps; the yield model compares predicted and actual loss per layer, and the sampling plan is adjusted (more inspection where loss was missed).
Scaling
- Image volume bites first: order of gigabytes of images per wafer scan. Levers: process on or beside the tool, store only defect patches, reduce at the source.
- Sensitivity vs. nuisance: more sensitivity means more candidates to review. Levers: better classifiers to discard nuisance early, local noise models, care areas that skip uncritical regions.
- Label effort scales with product mix. Levers: active learning, reuse of embeddings across products, an explicit unknown class.
- Time-series volume: many parameters times many wafers. Levers: chunked compressed storage, downsampled rollups for dashboards, raw data kept in cold storage.
- Join cost across systems: identifiers differ. Lever: resolve once, store canonical keys, and make joins on keys only.
Failure modes
| Failure | Symptom | Cause | Fix |
|---|---|---|---|
| Misalignment | rows of false defects along edges | registration error above a pixel fraction | sub-pixel registration, re-align per patch |
| Nuisance flood | review queue overflows | threshold too low or noise model wrong | per-pixel noise threshold, classifier-based nuisance filter |
| Missed defects | yield loss without a flagged cause | sensitivity too low, care area misses the region | adjust sensitivity, add care areas, compare with test failures |
| Classifier forced fit | new defect type labelled as an old one | no unknown class, labels stale | unknown class, active-learning refresh after process changes |
| Mean-based SPC limits | limits move with outliers, alarms are missed | non-robust estimates | median and MAD based limits |
| Step mistaken for noise | slow alarms after maintenance | no change-point detection | detect shifts, tie to maintenance events |
| Wafer mix-up | yield tied to the wrong tool | identifiers merged incorrectly | conservative entity resolution, review ambiguous matches |
| Coordinate mismatch | defect maps do not match test maps | different die origin and orientation | one canonical die coordinate system with documented transforms |
| Stale results | numbers differ after a model update | results not versioned | lineage with model and recipe versions, rerun affected data |
| Spurious causation | a tool is blamed for a loss that follows the product | observational correlation | compare parallel chambers, hold out lots |
Real implementations
| name | what it is | repo | licence | notes |
|---|---|---|---|---|
| KLA inspection and metrology systems | commercial optical and e-beam inspection with defect classification | proprietary | proprietary | tool vendor |
| Applied Materials SEMVision | commercial e-beam defect review | proprietary | proprietary | review and classification |
| PDF Solutions Exensio | commercial yield and manufacturing analytics | proprietary | proprietary | analytics platform |
| secsgem | Python SECS/GEM implementation | bparzella/secsgem | LGPL-2.1 | equipment and host sides |
| OpenCV | image processing, template matching, optical flow | opencv/opencv | Apache-2.0 | alignment and matching |
| scikit-learn | DBSCAN, k-means, isolation forest and more | scikit-learn/scikit-learn | BSD-3-Clause | signatures and anomaly detection |
| Apache Parquet | columnar file format specification | apache/parquet-format | see repo | analytic tables |
| WM-811K | public wafer-map data set with labelled patterns | Kaggle | CC0 (as shown on the data set page) | research and baselines |
Sources
- M.-J. Wu, J.-S. R. Jang, J.-L. Chen, Wafer Map Failure Pattern Recognition and Similarity Ranking for Large-Scale Data Sets, IEEE Transactions on Semiconductor Manufacturing 28(1), 2015; data set: WM-811K
- SEMI E5 (SECS-II), E30 (GEM), E37 (HSMS), summarised at SECS/GEM
- Background on wafer-level testing and maps: Wafer testing
- Background on the process flow: Semiconductor device fabrication