The idea: a circuit becomes a stack of masks
A schematic says which transistors there are and how they connect. A chip factory needs something else: for every layer (well, active, poly, metal …) the exact shapes to print. That set of shapes is the layout. Each layer becomes one mask, a glass plate with a dark pattern, and each mask is used in one step of the process. This page builds one CMOS inverter, the circuit from The Transistor as a Switch, all the way from masks to a checked layout.
The canvas has three parts. The cross-section (top right) is a side view of the wafer. The layout (left) is the top view on a λ grid. The DRC and LVS panels (bottom right) are the two checks every layout must pass. The layout menu swaps in a layout with a planted mistake.
Building it: one mask per step
Each step coats the wafer with a light-sensitive resist, shines light through the mask, washes away the exposed (or the hidden) resist, and then works only where the wafer is open: implant, grow, deposit or etch. The inverter needs seven masks (Demo: fabrication, one mask per step):
| Mask | What the step makes |
|---|---|
| 1 n-well | an n-type region in the p substrate where the pMOS will sit |
| 2 active | where transistors may be; thick field oxide grows everywhere else and isolates them |
| 3 poly | thin gate oxide, then the polysilicon gates |
| 4 n+ select | n+ source and drain of the nMOS, implanted next to the gate |
| 5 p+ select | p+ source and drain of the pMOS, inside the n-well |
| 6 contact | holes through the oxide down to diffusion or poly, filled with metal |
| 7 metal1 | the wires: GND, VDD, and Y joining both drains |
The poly gate comes before the implants on purpose. The gate blocks the implant, so the source and drain end exactly at the gate edges. This is called a self-aligned gate, and it is why the channel length is simply the poly width.
Stick diagram, then layout
A stick diagram fixes the topology before any size: VDD rail on top, GND at the bottom, a p diffusion and an n diffusion as horizontal lines, one vertical poly line crossing both (that crossing is the transistor), contacts as dots, and metal straps from the sources to the rails and between the drains. The layout then gives every line a width and every gap a size on the grid (Demo: stick diagram to layout).
A transistor appears wherever poly crosses active. Its W is the width of the active under the gate and its L is the width of the poly. Here the nMOS is W = 6λ, L = 2λ and the pMOS W = 12λ, L = 2λ: twice as wide, because holes move about half as fast as electrons. How wide to make them for speed is the subject of Gate Delay and Logical Effort. The whole cell is 22λ wide and 48λ tall.
λ-based design rules
A foundry cannot print any shape. Lines that are too thin break, gaps that are too small close up, a contact that slips off its metal connects nothing. Design rules state the limits as minimum widths, spacings and overlaps. λ rules write all of them as multiples of one length λ, about half the smallest gate length. Then the same layout fits any process that uses the rule set: only λ changes. With λ = 0.6 µm, for example, this cell would be 13.2 µm × 28.8 µm.
The page uses ten rules of the MOSIS SCMOS set (revision 7.2, SCMOS column):
| Rule | What it limits | Minimum |
|---|---|---|
| 2.1 | active width | 3λ |
| 2.3 | source/drain active to the n-well edge | 5λ |
| 3.1 | poly width | 2λ |
| 3.2 | poly to poly spacing | 2λ |
| 3.3 | gate extension past the active | 2λ |
| 6.1 | contact size | exactly 2λ × 2λ |
| 6.4 | active contact to the gate | 2λ |
| 7.1 | metal1 width | 3λ |
| 7.2 | metal1 spacing | 3λ |
| 7.3 | metal1 overlap of a contact | 1λ |
DRC: design rule check
DRC measures every shape against every rule and marks each place that breaks one. Three kinds of measurement cover almost all rules: the width of one shape, the spacing between two shapes that are not connected, and the enclosure of one shape by another (metal around a contact, well around active).
- The correct inverter passes all ten rules: the tightest values are 6λ of active, 5λ of well around the pMOS, 2λ of poly, 4λ of metal1 width and spacing, 1λ of metal around each contact (Demo: DRC on the correct inverter, 0 errors).
- A poly wire of another net placed 1λ from the gate breaks rule 3.2 (1λ < 2λ): 1 error (Demo: DRC catches poly 1λ apart). When etched, the two lines could merge into one.
- An output wire only 2λ wide breaks rule 7.1 once (2λ < 3λ) and rule 7.3 at both drain contacts (0λ < 1λ): 3 errors from one edit (Demo: DRC, a thin output wire, 3 errors).
In each of these the circuit is still an inverter. DRC asks "can this be built?", never "is this the right circuit?".
Extraction and LVS
Extraction reads the circuit back out of the shapes. A device is every place where poly crosses active: an nMOS outside the n-well, a pMOS inside it. A net is a set of shapes that touch on the same layer, or meet through a contact; text labels on metal1 (VDD, GND, A, Y) give the nets their names. For the inverter this gives M1 nmos W = 6λ L = 2λ, M2 pmos W = 12λ L = 2λ and four nets: A on both gates, Y on both drains, GND and VDD on the sources.
LVS (layout versus schematic) compares that netlist with the schematic: the same devices with the same sizes, and the same pins on every net. Here it reports 2 devices and 4 nets on both sides, the circuits match (Demo: extract and LVS, circuits match).
Now leave out the contact on the pMOS drain. Every shape is still legal, so DRC finds 0 errors. But the metal over the drain only lies on oxide; it is not connected. Extraction finds a fifth net n1 holding only the pMOS drain, and Y holds only the nMOS drain: 1 pin where the schematic has 2. LVS reports an open on Y (Demo: missing contact, DRC clean but LVS open). On silicon, Y could be pulled down but never up. The reverse mistake, two nets touching, is a short, and LVS finds that too.
In a real flow
Real tools do the same three jobs on millions of shapes. Magic and KLayout draw layout and run DRC with the foundry's rule deck, Magic extracts a netlist, and Netgen compares it with the schematic and prints Circuits match uniquely. The ASIC Design Flow runs them on a whole SKY130 design at signoff. Modern rule decks are written in nanometres, not λ, and hold hundreds of rules, but width, spacing and enclosure are still most of them. Cells like this inverter are placed in rows and wired together by Standard-Cell Place and Route. The circuit view of the same gates is in The Transistor as a Switch, and a latch built from such transistors is in A Latch and a Flip-Flop Built from Transistors.
See also Standard-Cell Place and Route, which places whole cells in rows that share power rails and routes metal1 and metal2 wires between them.
What the page leaves out
- Well and substrate taps. A real cell ties the n-well to VDD and the substrate to GND with contacts (rule 2.4); the page leaves them out and LVS compares only gate, source and drain.
- Most of the rule deck. Only ten SCMOS rules are checked; select, poly-contact, via and upper-metal rules, and the SUBM and DEEP columns, are not.
- Process detail. Resist, etching, LDD spacers, silicide and planarization are not drawn; the cross-section shows the inverter side by side, not a cut through the top view.
- Polygons and Manhattan geometry. Shapes are rectangles on a whole-λ grid; real DRC works on polygons with corner and density rules.
- Parasitics. Real extraction also gives the resistance and capacitance of every wire, used for timing.
On the mind map
References
MOSIS Scalable CMOS (SCMOS) design rules, revision 7.2
Weste and Harris, CMOS VLSI Design: A Circuits and Systems Perspective, 4th ed., sections 1.5 (CMOS fabrication and layout) and 3.3 (layout design rules)