Layout Knowledge Base

Learning paths

Six reading orders through 73 notes. Start anywhere; each list goes from basic to advanced.

Chip tutorial series

Build a quadrature encoder from theory through Verilog, sky130 synthesis, OpenROAD place-and-route, and a real GDS.

  1. Illustration: an optical rotary encoder, a slotted metal disc on a shaft passing two slotted optical sensors on a small circuit board. Part 1Theory
  2. Part 2Verilog
  3. Part 3 flow: RTL through Yosys to a gate-level netlist Part 3Yosys
  4. Part 4 flow: gate-level netlist through OpenROAD Tcl to DEF Part 4OpenROAD
  5. LayoutEditor view of the bottom edge of the teaching die encoder_top.gds: merged sky130_fd_sc_hd cells in placed rows (green diffusion, red poly, purple li1, blue met1 rails), the DEF met1 and met2 routing, and orange met2 pin stubs labeled count_o[7], sda_in, rst_n, scl, clk and other pins Part 5GDS and DRC

The library

Filter by topic, or open the full index.

That frame twice at once. Left of the dark blue line are the pieces as they were drawn, a dozen overlapping rectangles and a slanted bar, each still carrying its own outline. Merging polygons A merge replaces overlapping shapes on one layer with a single outline of the area they cover. Here is how that outline is computed, what the file stores, and where it goes wrong. That integer bargain drawn large: an uneven octagon whose corners you can name, beside a smoother chain that still lands every corner on a whole tick. Database units: how layout files store coordinates as integers A GDSII or OASIS file stores every coordinate as a whole number of database units. How that scale becomes microns, and what breaks when tools disagree. LayoutEditor view of two polygons on a reference circle with a radius of 20 µm: 32 stored vertices on the left, 7 on the right, with red squares at the vertices and the flats of the 7-vertex polygon cutting inside the circle How to draw a circle in a layout: vertex count, arc error, and DRC rules A layout file stores a circle as a polygon whose vertex count sets the arc error and file size; SKY130 met1 accepts only 45-degree edges, and an OASIS CIRCLE record is re-faceted by the program that reads it. Illustration: a clear microfluidic chip with blue dye in one channel network and red dye in the other, a pipette tip in an inlet well Channels, not wires A path that liquid occupies. Width is hydraulic. Dead volumes are the new parasitics. LayoutEditor window: one SKY130 signal climbing from a plum poly gate finger through a black licon, the teal li1 strap, an amber mcon, the blue met1 strap and a purple via up to the orange met2 strap Vias and contacts in IC layout: cut layers, enclosure, and via rows Vias and contacts in a chip layout: the cut layers between floors, SKY130 via size, spacing and enclosure rules, via rows, and what a DRC cannot see. LayoutEditor view of the SKY130 standard cell sky130_fd_sc_hd__xor2_1 with a legend of seven layer/datatype pairs from nwell 64/20 to met1 68/20 and the cell boundary corners labeled (0, 0) and (3220, 2720) What is a layout? IC layout explained: shapes, layers, units, and cells A layout is the file a factory builds a chip from: integer coordinates on numbered layers, grouped into cells. What GDSII stores, a complete 576-byte example built in LayoutEditor, and what to check before you send one. LayoutEditor window with 40 placements of a SKY130 via cell on a 0.5 µm pitch; one flattened copy has a smaller met1 landing and four red via.4a marker bands Hierarchy and flattening: why chips keep cells and boards go flat Flattening replaces cell references with transformed copies of their shapes: what GDSII SREF and AREF records store, how the transform is applied, what it costs in file size, and how to flatten and check a layout in LayoutEditor. LayoutEditor view: the letters A1 as a text object on a label layer, placed over a teal metal1 strap Text on a layout: labels, printed letters, and what the mask shop ignores A GDS text record is a string on a layer; convert it to polygons before a mask shop must print it. SKY130 68/5 labels stay unchecked; 68/20 outlines are measured. LayoutEditor: eight small SKY130 metal 1 test cases in two rows; in the top row a narrow strap, two close straps, a contact and a via with too little metal each carry a red DRC marker, in the bottom row the repaired versions have none Design rules and DRC: real rule values and how to read a marker Design rules are the factory's limits in numbers; DRC is the spellchecker that measures them. SKY130 width, space, and enclosure values, rule flags, how to write and test a .ledrc rule deck by hand, and why deleting a marker fixes nothing. LayoutEditor window: one gold metal polygon, 32 × 20 µm and filled, with a 20 × 8 µm rectangular window in the middle, so a 6 µm frame of metal surrounds the empty window on all four sides Holes in layout polygons: inner loops, keyholes, and boolean NOT How a layout polygon stores a window: an outer and an inner loop, a keyhole cut, or a hole made with boolean NOT, and why a merge can fill a hole you meant to keep open. Illustration: optical-microscope-style view of a wafer alignment site — a cross inside a square chrome window with horizontal and vertical vernier bar scales beside it. Alignment marks and registration Alignment marks are paired shapes on two mask levels that let an aligner, stepper, or writer place each new level on the pattern already on the wafer. Illustration: opened ceramic IC package with a silicon analog die in the cavity and gold bond wires fanning out to the package fingers. Analog layout is furniture: matching, dummies, and guard rings Identical schematic devices come out different on silicon. Pelgrom's area law, stress and well-edge effects, common centroid, dummy fingers, and guard-ring rules from an open PDK. A 1 µm² transistor gate tied to about 124 µm of folded metal1 while metal1 is being etched; the metal2 link to the driver is outlined because it does not exist yet Antenna rules: charge during etch Antenna rules limit the conductor area connected to a transistor gate during manufacturing, because plasma etching charges the wire; jumpers and antenna diodes fix violations. A 4 by 4 field of one small bit, with some stamps rotated so the bar does not point the same way in every position. Cell arrays and step-and-repeat: rows, columns, pitch, and AREF An array places one cell in rows and columns at a fixed pitch and is stored as one array reference (AREF in GDSII). How a wrong step adds up across the grid, and why one record has one rotation. Sky130_fd_sc_hd__mux2_1, a 2-input multiplexer from the open SkyWater SKY130 cell library, 4.6 µm wide. Boolean operations on layout polygons: AND, OR, NOT, XOR Boolean operations combine two sets of layout polygons with AND, OR, NOT, or XOR and return new polygons; derived layers, mask data, and revision compares rely on them. LayoutEditor view: two rows of SKY130-style standard cells, 2.72 µm tall and abutted, the upper row mirrored about the shared VDD rail, drawn only as boxes on diff, poly, licon1, li1, mcon, met1 and prBoundary Boxes are just rectangles An axis-aligned rectangle is a native four-number object. Rotate, chamfer, or boolean it and it becomes a polygon. The parent with those four stamps, and a cross of routing that belongs to the parent. Cells and instances Draw the pad once and stamp it many times. Each stamp is the same drawing in a new place, not a photocopy of the ink. Illustration: a chemical-mechanical polishing station, a wafer carrier head pressing a wafer onto a large rotating polishing pad wet with milky slurry. Density rules and fill: why empty space gets dummy shapes A density rule limits how much of each window a layer may cover. Real window sizes, why polishing cares, how fill repairs a sparse region without touching the circuit, and how to fill and check a layout in LayoutEditor. LayoutEditor view of eleven SKY130 standard cells in three rows: green diffusion, red polysilicon, dotted n-well, and generated N+ implant mask in blue grid and P+ implant mask in orange grid around the diffusion Derived layers: when a mask is a boolean Some masks are computed from drawn layers with boolean operations and sizing; the SKY130 N+ implant recipe shows the steps, and a LayoutEditor rule file reproduces and checks them. Illustration: three objects side by side on a grey table: a framed chrome-on-quartz photomask, an iridescent patterned silicon wafer, and a green printed circuit board. The drawing is not the thing you build Glass, silicon, and fiberglass are different objects that can share one geometry. Illustration: a CNC-milled aluminium lid with a pocket and four mounting holes next to a small bare silicon die, the two scales on one bench. DXF from the mechanical world Arcs, inches, and layers with names like ‘Contour’. Translation is culture as much as geometry. Puts the good case and the bad case side by side: one contact fully inside its pad, one contact hanging off a corner. Enclosure is a frame for misalignment The inner feature has to sit on an island big enough that the factory’s slop cannot knock it off. The standard for that question. Thin films lie on a thick carrier. Extruding into the third dimension Give each layer a thickness and the top view becomes a toy building. Honest only if the thicknesses are. That idea with real geometry from a layout editor: one board, six placements of one small-outline eight-pin footprint, some turned 90 or 180 degrees. Footprints are almost cells A footprint is drawn once and placed many times, so its pads, paste, courtyard, and pin 1 must be right in that one master. Where that letter arrives — a framed plate on a light table, the pattern showing as dark chrome against the lamp. From idea to something a shop can print How a napkin sketch becomes a file, a cover letter, and a glass plate a shop can print from. The pairing with the marks still on the straps. Layer and datatype: the two-number name 31/0 is not a street address. It is how GDS remembers two meanings on one film. Three records from that kind of file, drawn so a person can see them: four numbers for a rectangle, a bent centerline, and a closed outline that is not a rectangle. GDSII in plain language A 1970s suitcase that still carries almost every chip drawing on Earth. Six Gerber files of one 40 × 25 mm board read into LayoutEditor: copper tracks, pads and ground pour, solder-mask openings, component outlines, drill hits, and the board profile. What is a Gerber file? The plot format for PCB layers A Gerber file is a text file that describes one layer of a printed circuit board as a 2D vector image built from apertures, flashes, draws, and regions. LayoutEditor view of the n-channel half of the real SKY130 cell sky130_fd_sc_hd__inv_4: a green active island under a yellow n+ implant window, crossed by four red poly fingers (L 0.15 µm, W 0.65 µm) with contacts on the shared source and drain stripes labeled S D S D S, the poly bar labeled G, and the VGND metal1 rail How a MOSFET is drawn A transistor on a chip drawing is a top-view sandwich of active, poly, well, implant, and contact — not the schematic symbol. LayoutEditor window with four SKY130 standard-cell abstracts in two rows: amber and orange obstruction rectangles fill most of each cell, dark teal pin shapes and blue power rails mark where a router may connect Keepouts and blockages A keepout or blockage is a drawn region that is never manufactured; it tells a router, placer, fill generator, or board checker which objects may not be placed inside it. Six square metal1 contacts in two rows on a 10 nm display grid: in the top row the orange contact sits in a lavender metal1 pad with an even margin, with a thin margin on its left side, and with thin margins on its left and right sides, all with no markers; in the bottom row the thin margins are on the left and bottom, on three sides, and on all four sides, and each thin side carries a dark red DRC marker One of two adjacent sides: checking m1.5, li.5, and via.5a in .ledrc Some contact rules let the metal be thin on one side, or on two opposite sides, but never on two sides that meet at a corner. How to read that rule in the SKY130 table, write it by hand as one LayoutEditor check line, and prove it on a layout built to fail. LayoutEditor window showing a routed section of a SKY130 DEF: rows of gray cell outlines, blue horizontal metal 1 wires and power rails, orange vertical metal 2 wires, green metal 3 bands, and black via cuts LEF and DEF in plain language LEF describes the layers, vias, sites, and cell abstracts of a digital library; DEF describes one design built from it, with die area, rows, placed instances, pins, power grid, and wires. LayoutEditor view of the real SKY130 cells sky130_fd_sc_hd__mux2_1 and sky130_fd_sc_hd__inv_1: green diffusion, red poly gates, purple li1, blue metal1 rails and a metal1 strap, with the net labels A0, A1, S, MID, Y, VPWR and VGND LVS: layout versus schematic, and how to read the report Schematic and layout describe one circuit in two languages. How LVS extracts nets from polygons, a LayoutEditor script that checks a layout against a SPICE netlist and against a schematic, and how to read opens, shorts, and device mismatches. One hairpin turn drawn three ways in LayoutEditor. Manhattan versus all-angle Manhattan layouts use only horizontal and vertical edges; 45-degree and all-angle layouts allow slants and curves. The choice changes wire length, how gaps are measured, which corners land on the grid, which rules apply, and what the mask costs. Illustration: a laser mask writer, an optical write head over a square chrome-coated glass blank on a precision stage. Mask fracture in one sitting Your polygons become the shots a mask writer can fire. The file grows. Slivers appear. Illustration: SEM-style view of a released MEMS comb drive, its interleaved fingers suspended over an etched pit and held by folded springs. MEMS is layout plus a recipe The top view is not enough. You need the sandwich: deposit, etch, release. LayoutEditor window with metal 1 and metal 2 routing of a SKY130 encoder block and the Cell Hierarchy dock on the right, which lists via cells, encoder_top, and standard cells, each marked (*) as a top cell Naming the top cell you ship A top cell is a cell that no other cell places; a mask shop or shuttle builds from exactly one, under the name it asks for, and a GDSII file has no record that marks it. Illustration: grayscale electron-microscope style top view of thin resist lines, one isolated line on the left and a dense bundle of parallel lines on the right, with a scale bar without numbers. Nano, when a wavelength is huge At a few tens of nanometers, light is clumsy and neighbors donate dose. The drawing is not the print. LayoutEditor view of one clk net over three real SKY130 sky130_fd_sc_hd__clkbuf_1 cells: a hatched met1 pin at the left edge, teal met1 straps and landings on each cell input, a via up to a blue met2 strap, clk labels on the joined metal and VPWR and VGND on the rails Nets, pins, and labels on a layout Geometry alone is not a netlist: labels name joined metal, pins mark where a named net may enter a cell. A regular field of identical contact tiles — the geometry OASIS can store with a repetition instead of dozens of separate boxes. OASIS vs GDSII: when GDS gets huge OASIS (SEMI P39) can store a repeated shape as one record plus a repetition, so contact, via, and fill fields take less space than in GDSII; unique polygons do not get smaller. LayoutEditor window: an L-shaped line and a lone line drawn in black outline over their OPC-corrected mask shapes in amber, with ears at line ends and corners and two thin assist bars Optical proximity correction (OPC) Optical proximity correction changes the mask after layout, with serifs, hammerheads, biases, and assist bars, so that the printed pattern matches the drawn shapes. LayoutEditor window: one asymmetric cell, a blue body with an orange tag, placed eight times; top row rotated 0, 90, 180 and 270 degrees, bottom row mirrored about the x axis first, with a black origin mark on every reference point. Layout origin and quadrants: where (0,0) sits and which way Y grows The origin is the (0,0) point of a cell: how signed GDSII coordinates, the reflect-then-rotate placement rule, and the DEF lower-left-corner rule follow from it, and how to check and move an origin in LayoutEditor. A row of five standard cells, the small repeated building blocks of a chip, with a power rail running along the top and another along the bottom. Overlapping is not merging Two shapes sharing coordinates are still two objects. A merge is one outline. Factories care which you meant. LayoutEditor view: the same path drawn three times at 2.5 µm width, running right, up and right again; a red line marks the stored centerline and black squares its four points, and the ribbon ends flush on the left copy, round in the middle and half a width past the end points on the right Paths in layout: centerline, width, end caps, and bends A layout path stores centerline points, one width, and one end type; this article measures how end type, width, and bends change metal area, grid compliance, and the exported file. Illustration: close-up of a bare circuit board with no solder mask, copper traces and round copper pads on yellow-green fiberglass. PCB copper is a layer too Board copper foil is still a named layer — traces, pads, and pours on a sheet, not chip metal film. Three square arrays side by side in LayoutEditor: a small 3 by 3 teal grid, a 9 by 8 teal grid, and a 9 by 8 amber grid with wider gaps PCells: cells with knobs A parameterized cell is a layout recipe: set width, counts, or pitch, and a script builds or reuses a uniquely named cell. LayoutEditor macros, naming, and what you freeze before the fab. LayoutEditor view of four met1 polygons with a red marker on every stored vertex: a pad with a square hole and a horizontal cut line, an octagon, a comb, and an L Polygons in a layout: vertices, holes, and why a box is not enough A layout polygon is a closed list of vertices on one layer: how GDSII and OASIS store it, vertex order and area, holes as cut lines, broken polygons, vertex limits, and how to check them in LayoutEditor. The drawn pair you can see before any recipe runs: a small square inside a larger square, the cut you typed and the metal around it. Process layers versus drawing layers Some sheets become matter. Some sheets are notes to tools and humans. Do not chrome the notes. One output wire neighborhood drawn with sky130 layer numbers; every shape tagged with its number pair, layer name, and purpose Reading a layer map How to turn a factory's table of number pairs into names, purposes, and masks — so you know which shapes become metal and which are only notes. LayoutEditor view of a simulated 100 mm wafer: black wafer outline, orange usable-area circle, navy shot squares of 2 by 2 dice, complete dice filled light green and incomplete dice at the rim left white Reticle layout versus wafer layout A reticle layout is the cell the mask shop writes; a wafer layout is the stepper job that places its images on the wafer. LayoutEditor rule files check the reticle cell against the exposure field and count dice on a simulated wafer. Illustration: a small assembled green circuit board on a grey anti-static mat, with unmarked chips, tiny resistors and capacitors, traces under the green solder mask, open gold pads, and a plated mounting hole in each corner. Sending a board to a PCB fab A zip of films, drills, a stackup, and a note that says which way is up. Freezes the two landings. Orange dots mark a regular pitch. Snapping and off-grid vertices in layout: grid snap, database units, and slivers What snap does to a vertex in a layout editor, how an off-grid point is stored in database units, and how a late snap can turn a space into a sliver or a short. Illustration: a silicon wafer on a dark chuck under yellow cleanroom light, rectangular exposure fields tiling the disc and partial fields cut off at the round edge. Steppers and why size matters The machine prints a field, then steps. Your die has to fit that window, not only the wafer. LayoutEditor view of two rows of real SKY130 sky130_fd_sc_hd cells: in each row a teal 0.14 µm met1 strap runs from an inv_1 output over three cells to a second inv_1 that was moved 1 µm to the right, its old place outlined in red; in the upper row (stretch) the strap end moved along and still lands, in the lower row (move) the strap ends 0.900 µm short of the landing Select, move, stretch, copy: editing layout without breaking it How the selection in LayoutEditor decides between move and stretch, why a pad moved alone opens a joint without a DRC error, which SKY130 rules a stretch can break, and how copies differ from cell references, with tested LayoutScript and .ledrc examples. LayoutEditor view: orange display-grid dots at a 0.5 µm pitch under a teal metal1 rail and strap lined with 0.5 µm contact squares, a second teal strap, and a navy metal2 pad with a 4 x 4 contact array; every corner sits on a dot Layout grids: display grid, database unit, and manufacturing grid A corner can sit on the display grid and still miss the manufacturing grid. How the three grids differ, and why an off-grid corner is rounded by the mask writer and can fail a space check. Illustration: a silicon photonics die on a lab stage with a cleaved optical fiber aligned to its polished edge where the waveguides end Waveguide layout: bend radius, width, and paths on a photonic chip A waveguide is a path that light follows. Width sets the mode, a tight bend radiates, and the bend radius is part of the device, not a routing convenience. LayoutEditor window after a DRC run on SKY130 metal 1: a wide amber strap that the deck classified as huge metal, thin blue wires, and two red markers What a DRC rule deck is A DRC rule deck is the file that turns a rule manual into layer definitions, derived layers, checks, and named report categories that a design-rule-check tool runs on a layout. Four standard cells from the open SkyWater SKY130 library in LayoutEditor: an inverter, a two-input NAND, a two-input NOR, and an XOR, side by side in one row. What a layer is for: layer numbers, purposes, and hiding sheets A layer is every shape on one GDS layer and datatype pair. SKY130 numbers and purposes, gate layers derived with a LayoutEditor deck, and what hiding a layer does to selection and deletion. Named process layers from a kit meeting in one filled device and routing neighborhood What a PDK actually contains The factory's package of layer names, rules, cells, and models — so your drawing tools speak the process. A square quartz photomask tilted against a dark room: a dense dark chrome pattern of lines and blocks in the middle of the clear glass, with an empty glass border around it What is a photomask? The glass plate that prints a chip A photomask, also called a reticle, is a quartz plate with a chrome pattern. Light shines through it to copy one layer of a chip onto a wafer, and a chip needs a stack of them. Part of a real logic cell, a half adder from the open SkyWater SKY130 cell library, showing li1, its lowest wiring layer. When the computer moves an edge Sizing moves every edge of a shape outward or inward by the same distance. Masks, solder openings, and rule checks depend on it, and corners, narrow necks, and unmerged pieces are where it surprises you. One crop, shown four ways, from a real sky130 block named encoder_top. Who actually reads a layout? The same drawing is read by your eyes, a geometry checker, a connectivity check, a mask shop, and scripts that never see your colors. Illustration, not a photograph: a human hair drawn as a magnified cylinder marked about 80 µm across, a round zoom inset with a 1 µm scale bar, and a magnifying glass with a 1 nm scale bar noting that 1 nm is 1/1000 of 1 µm Why chip people live in microns Micrometers are the hallway unit for chip sizes; the file stores integer ticks, and a wrong unit silently resizes the chip. LayoutEditor view drawn by a LayoutScript loop: a navy strap above a teal strap, tied by ten copper vias numbered 1 to 10, each an instance of one via_cell, with a 3.000 µm pitch bar Why people write layout scripts Because a thousand polite rectangles should not be a career. Record, repeat, parameterize. LayoutEditor window: on the left two L-shaped teal metal 1 straps, 0.20 µm wide, with a wide 0.30 µm gap between their parallel runs; on the right two navy metal 2 straps with a much tighter gap, the upper one far thinner than its partner Width and space The two oldest rules: don’t be skinny, don’t cuddle. Everything else is a variation.

Open the full index

An independent knowledge base on layout — chips, MEMS, masks, and boards — written so a newcomer can follow the drawing, not only the jargon.