4.2.9VLSI Design

Layout vs schematic (LVS)

2,409 words11 min readdifficulty · medium1 backlinks

WHY does LVS exist?

The three sign-off checks in physical verification:

  • DRC (Design Rule Check): Is the layout manufacturable? (spacing/width rules)
  • LVS (Layout vs Schematic): Does the layout match the intended circuit?
  • ERC (Electrical Rule Check): Are there electrical bugs? (floating gates, etc.)

LVS answers the functional-equivalence question, not the manufacturability one.


WHAT is LVS, precisely?

Two netlists are equivalent when they are the same labeled graph:

  • Nodes = electrical nets (wires)
  • Edges/vertices = devices (transistors, R, C) with their terminals and parameters

HOW does LVS work? (derivation from first principles)

Think of the LVS engine as building and comparing two graphs. We derive each stage.

Stage 1 — Layout extraction (build the layout graph)

Net formation (union-find on polygons). Start with every polygon as its own net. Merge nets when:

  • two shapes on the same layer overlap/abut, or
  • shapes on two layers are joined by a contact/via where those layers are allowed to connect.

This is exactly a union-find (disjoint-set) problem. If there are NN polygons and EE overlap/via relations, labeling all nets costs

Tconnectivity=O((N+E)α(N))T_{\text{connectivity}} = O\big((N+E)\,\alpha(N)\big)

Why this formula? Union-find with path compression + union by rank does each of the EE merges and NN finds in near-constant amortized time α(N)\alpha(N) (inverse Ackermann ≈ 4 for any real chip). So it's essentially linear in geometry.

Device recognition. A device is a pattern of overlapping layers. An MOS transistor = poly crossing diffusion:

  • the poly-over-diffusion overlap region is the gate/channel,
  • the diffusion on each side = source and drain,
  • the underlying well ⇒ NMOS vs PMOS.

The gate width WW = length of the poly–diffusion crossing edge; the length LL = the poly dimension along current flow. So parameters come straight from geometry:

W=(edge length of channel),L=(poly width across channel).W = \text{(edge length of channel)}, \qquad L = \text{(poly width across channel)}.

The output of Stage 1 is the layout netlist: devices + extracted nets + W/LW/L.

Stage 2 — Reference netlist

The schematic is compiled (or a SPICE netlist is given) into the same graph form. No extraction needed — connectivity is already named.

Stage 3 — Graph matching (the comparison)

The trick: coloring / partition refinement (Weisfeiler–Leman idea).

  1. Give every node an initial color from local invariants it cannot fake: for a net, e.g. (#transistor gates on it, #sources, #drains, #passives). For a device, its type and parameters.
  2. Refine: recolor each node using the multiset of neighbor colors. Repeat.
  3. After refinement, colors partition nodes into classes. Match classes across the two graphs.
  4. If both graphs converge to identical color histograms and each class has a unique pairing ⇒ LVS clean. Any leftover ambiguity/mismatch ⇒ report a discrepancy.

Refinement runs a small number of rounds kk (until stable), each round O(V+E)O(V+E), so practically

TmatchO(k(V+E)),T_{\text{match}} \approx O\big(k\,(V+E)\big),

near-linear on well-structured chips (hierarchy helps hugely — you match a cell once and reuse it).

Figure — Layout vs schematic (LVS)

Typical LVS error classes (and how they show up)

Error Physical cause Graph symptom
Short two nets touch that shouldn't two schematic nets map to one layout net
Open wire broken / via missing one schematic net splits into two layout nets
Missing device forgot to place a transistor device count mismatch
Parameter mismatch wrong W/LW/L isomorphic graph but W/LW/L differ
Property/label error wrong port/pin label matching fails at boundary

Worked examples


Common mistakes (steel-manned)


80/20 — the 20% that gives 80%

  1. LVS = extract-layout-netlist → graph-compare with schematic.
  2. It checks devices + connectivity + parameters, by isomorphism, not by name.
  3. Main errors: short, open, missing/extra device, param mismatch.
  4. DRC≠LVS≠ERC; LVS clean ≠ correct schematic.

Recall Feynman: explain to a 12-year-old

Imagine you have LEGO instructions (the schematic) and the model your friend actually built (the layout). LVS is a robot that looks at the built model, figures out which bricks connect to which, and checks it exactly matches the instructions. If your friend accidentally stuck two towers together (a short) or forgot to click two bricks (an open), the robot shouts which piece is wrong — before you glue everything and can't undo it.

What does LVS verify?
That the extracted layout netlist is graph-isomorphic to the schematic netlist — same devices, connectivity, and parameters.
What are the two main stages of LVS?
(1) Layout extraction → layout netlist, (2) graph comparison/matching against the schematic netlist.
Why can't LVS match nets by name?
Layout nets are auto-generated (e.g. N$27); matching must be by graph structure (connectivity + device fingerprints), not names.
Algorithm used to build layout connectivity from polygons?
Union-find (disjoint-set) merging overlapping/abutting shapes and via-connected layers, ~O((N+E)·α(N)).
How is a MOS transistor recognized in extraction?
By poly crossing diffusion — the overlap is the gate/channel; diffusion on each side = source/drain; well type gives NMOS/PMOS.
How are W and L obtained in extraction?
W = length of the poly–diffusion crossing edge; L = poly dimension along current flow.
Difference between DRC and LVS?
DRC checks manufacturability (spacing/width); LVS checks the layout implements the intended circuit.
A short shows up in LVS as...?
Two schematic nets mapping to one layout net.
An open shows up in LVS as...?
One schematic net splitting into two layout nets.
Can LVS be clean but the topology still 'pass' with wrong sizes?
Yes — parameter mismatch (e.g. wrong W/L) is a separate LVS discrepancy even when connectivity matches.
Does LVS clean guarantee correct chip function?
No — it only proves layout equals the given schematic; a buggy schematic still passes.
What technique underlies graph matching in LVS?
Iterative coloring / partition refinement (Weisfeiler–Leman style) using local device/net invariants.

Connections

  • Design Rule Check (DRC) — sibling physical-verification check (manufacturability).
  • Electrical Rule Check (ERC) — floating gates, over-driven nets.
  • Parasitic Extraction (PEX) — extends extraction to R/C for timing.
  • Netlist and SPICE — the reference-netlist format.
  • CMOS Inverter Layout — the canonical LVS example.
  • Union-Find (Disjoint Set) — the connectivity engine.
  • Graph Isomorphism — the theoretical core of matching.
  • Physical Design Flow / Tape-out — where LVS sits in sign-off.

Concept Map

intended circuit

extraction

input graph

reference graph

tests

match nodes

match devices

connectivity by geometry

forms

part of

manufacturability

electrical bugs

prevents costly

Schematic netlist

LVS check

Layout polygons

Extracted netlist

Graph isomorphism

Nets = wires

Devices + W/L params

Union-find on polygons

Physical sign-off

DRC

ERC

Tape-out errors

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, LVS ka matlab simple hai: aapne chip ka layout banaya (metal, poly, diffusion ke rectangles) aur aapke paas ek schematic hai jo batata hai circuit kaisa hona chahiye. LVS ek tool hai jo layout se ek netlist extract karta hai — yani geometry dekh ke figure out karta hai ki kaun se shapes ek transistor banate hain aur kaun se wires electrically ek hi net hain. Phir wo is layout netlist ko schematic netlist ke saath compare karta hai. Agar dono graph bilkul same (isomorphic) hain — same devices, same connections, same W/L — to "LVS clean". Warna error.

Yeh important kyun hai? Kyunki fabrication bahut mehenga hai aur ek baar mask ban gaya to undo nahi hota. Agar galti se do wire touch ho gaye (SHORT) ya ek via miss ho gaya (OPEN), to chip dead. LVS yeh sab tape-out se pehle pakad leta hai. Ek key baat: LVS naam se match nahi karta, kyunki layout ke net naam auto-generated (jaise N$27) hote hain — wo structure (connectivity + device fingerprint) se match karta hai, coloring/refinement algorithm use karke.

Do cheezein yaad rakho jo students confuse karte hain. Pehla: DRC aur LVS alag hain — DRC bolta hai "yeh banaya ja sakta hai kya?" (spacing rules), LVS bolta hai "sahi circuit banaya kya?". Dono chahiye. Doosra: LVS clean ka matlab chip sahi kaam karega, aisa nahi — LVS sirf yeh prove karta hai ki layout aapke diye schematic ke barabar hai; agar schematic khud galat hai to LVS phir bhi pass ho jayega. Isliye functional simulation bhi zaroori hai.

Mnemonic ek dum simple: "Extract, then Match — watch SOMP" (Short, Open, Missing, Parameter). Bas itna yaad rahe to LVS ka core clear hai.

Test yourself — VLSI Design

Connections