The idea: a chip is a chain of files

An ASIC (application-specific integrated circuit) starts as a text spec and ends as a GDSII file: polygons on numbered layers that a foundry turns into masks. Between the two sit about a dozen steps. Each step is a program that reads the files the steps before it wrote and writes one new file. The page runs all of them on one tiny design, a 4-bit counter, so every file is small enough to read on the canvas.

Twelve steps top to bottom in two groups. Front end: spec writes counter4.sdc, RTL writes counter4.v, simulation writes a log, synthesis with Yosys writes a gate netlist, scan insertion writes a scan netlist. Back end, all in OpenROAD except the last three: floorplan, placement, clock tree and routing each write a DEF file, STA with OpenSTA writes SPEF and a timing report, DRC and LVS with Magic, KLayout and Netgen write reports, and GDSII comes last. On the right the PDK feeds the Liberty file into synthesis and STA, and the LEF files into the physical steps
Every step turns one file into the next; the PDK's Liberty file feeds the logic steps and its LEF files feed the physical ones.

The chain looks like a software compiler (see Compiler Pipeline), and it walks down the same levels as Abstraction Layers, from behaviour to gates to transistors and metal. What is new here is the back half: the output is a physical object, so the tools must place things, wire them and check the geometry, and timing is only known once the wires exist.

The open tools below are the ones the OpenLane flow runs, in this order, from one script. Commercial tools do the same steps under other names.

StepOpen toolWrites
RTL lint, simulationVerilator, Icarus Veriloglog, waveforms (VCD)
SynthesisYosys, with ABC for the mappinggate-level netlist (Verilog)
Scan insertion, floorplan, placement, clock tree, routingOpenROAD (its DFT module, RePlAce, TritonCTS, FastRoute, TritonRoute)netlist, DEF
Parasitics, signoff timingOpenRCX, OpenSTASPEF, timing report
DRC, LVSMagic and KLayout, Netgenreports
Stream outMagic, KLayoutGDSII

The front end: from a spec to a netlist

The spec says what the counter does: on each rising edge, rst clears it, otherwise en adds one, otherwise it holds. The clock goes into an SDC file (create_clock -period 10.0), which every later tool reads. The RTL (register-transfer level) says the same thing in Verilog: one always @(posedge clk) block. Verilog to Hardware shows how such code turns into gates and flip-flops, and Verilog FSM Coding covers larger state machines.

Simulation runs the RTL against a testbench: 20 cycles of reset, counting, holding and wrapping, each checked against the expected value. With the enable bug (the else branch lost its if (en)), the counter goes on counting when it should hold, and 16 of the 20 checks fail, the first at cycle 4. Lint passed, because the code is legal Verilog; only simulation knows what it should do. (Demo: simulation catches a missing enable.)

Synthesis (Yosys) turns the RTL into a gate-level netlist: still Verilog, but now only instances of library cells. It reads the cells from the Liberty file (.lib) of the SKY130 library sky130_fd_sc_hd, which gives each cell's logic function, delay and area. The counter becomes 16 cells, 162.66 µm²: three AND2 for the carry chain, four XOR2 for the sum bits, four AND2 and an inverter for the reset, and four D flip-flops. Choosing which library cells implement the logic is technology mapping. (Demo: front end.)

Scan insertion swaps each flip-flop for a scan flip-flop (one with a 2:1 mux on D) and links them into a chain from scan_in to scan_out. After manufacturing, a tester shifts a pattern in, runs one clock, and shifts the result out, which finds faults such as a stuck-at fault. Here it costs 25.02 µm² (+15.4 %) and three pins. Scan Chains shows the shifting. (Demo: scan insertion.)

The back end: from a netlist to a layout

From here on the tools need each cell's physical outline and pin shapes. They come from the LEF files: the technology LEF (metal layers, the placement site unithd, 0.46 × 2.72 µm) and the cell LEF. Each physical step writes a DEF file, a text description of the die with everything placed so far.

  • Floorplan: the die (47.84 × 21.76 µm), the core inside it with 4 rows of 80 sites, and the 10 pins on the edge. The cells fill 150 of the 320 sites: 46.9 % utilization, which leaves room for buffers, resizing and wires.
  • Placement: global placement spreads the cells so that connected ones sit close; detailed placement snaps each onto a row and a site with no overlap.
  • Clock tree: buffers so the clock edge reaches all flip-flops at nearly the same time. One clkbuf_4 here; the edge reaches the flip-flops 175 to 185 ps after the clock pin, a 10 ps skew.
  • Routing: global routing picks a path for each of the 22 nets; detailed routing draws the exact metal shapes. Its first pass leaves 3 design-rule violations (two met1 shapes too close, one via with too little metal around it); it rips up and re-routes near them until none are left. (Demo: floorplan → routing.)

How a placer and a router work is the subject of Standard-Cell Place and Route.

Signoff: STA, DRC, LVS and GDSII

Signoff means the last checks before the design leaves. OpenRCX extracts every wire's resistance and capacitance into a SPEF file, and OpenSTA reports the worst setup slack (WNS, worst negative slack) over every path. Static Timing Analysis shows how it finds that path. At 10 ns the worst path arrives at 1295 ps, slack +8770 ps. (Demo: the whole flow.)

DRC (design rule check) runs the foundry's full rule deck on every shape. LVS (layout versus schematic) extracts a circuit from the layout and compares it with the netlist: here 17 cells and 22 nets on both sides, Circuits match uniquely. CMOS Layout, DRC and LVS shows both on a single gate. Then the GDSII file goes to the foundry: the tapeout. In OpenLane, Magic writes the GDSII just before DRC and LVS, and the checks run on it; the page puts GDSII last because that is when the file leaves.

The file formats

FormatWhat it holdsWritten byRead by
Verilog RTLbehaviour per clock edgethe designersimulator, synthesis
SDCclocks, input and output delays (Tcl)the designersynthesis, OpenROAD, STA
Liberty .libeach cell's function, delay tables, areathe PDKsynthesis, STA
Gate-level netlistcell instances and the nets between themsynthesisOpenROAD, STA, LVS
LEFlayers and sites; cell outlines and pinsthe PDKfloorplan, place, route
DEFdie, rows, pins, placed cells, wiresOpenROADthe next OpenROAD step, Magic
SPEFR and C of every wireOpenRCXSTA
GDSIIpolygons on numbered layersMagic, KLayoutthe foundry

Timing gets worse as the flow learns more

At each point the timing number uses only what is known so far. After synthesis there are no wires. After placement the wires can be estimated from the distances (25 ps per net here). After the clock tree, the real clock arrival at each flip-flop is known: the worst path starts at a flip-flop whose clock comes at 185 ps and ends at one whose clock comes at 175 ps, so it loses 10 ps. After routing, the extracted wires cost 30 ps per net.

Bars of worst setup slack at the 1.2 ns clock: after synthesis +160 ps, after placement +10, after the clock tree 0, after routing −30 (violated), after repair_timing +30 (met)
The same path loses slack at every step; only the number after routing is the real one.

With a 1.2 ns clock that turns a comfortable +160 ps into −30 ps at signoff. (Demo: 1.2 ns clock.) The fix is repair_timing: it upsizes the three carry-chain AND2 cells to and2_2 (20 ps faster each, one site wider), and placement and routing are patched around them. The path gets 60 ps faster, slack +30 ps, for 3.75 µm² more area. (Demo: repair_timing.) Why a bigger gate is faster, and by how much, is logical effort.

The flow loops back

A failed check sends the design back to an earlier step: a simulation failure to the RTL, a timing failure to repair (or, if it is far off, to the RTL or the clock), a DRC error to the router. The later a bug is found, the more steps run again. Found in simulation, the enable bug costs one word. Found after tapeout, it costs a new mask set and months. That is why the front end spends so much time on simulation, and why the back end checks timing, rules and connectivity before the file leaves.

See also Scan Chains and Design for Test, which clocks a chain of sdfxtp_1 scan flip-flops through shift, capture and shift and shows a stuck-at fault caught at scan_out.

See also Stuck-at Faults and Test Generation for how test vectors for the finished netlist are found and graded by fault coverage.

See also Algebraic Factoring, the technology-independent logic optimization that runs before technology mapping.

What the page leaves out

  • Real flows add tap cells, decap and fill cells, a power grid (PDN), antenna checks and diode insertion, and IR-drop and electromigration checks.
  • The page uses one delay per cell; real timing uses Liberty tables indexed by input slew and output load, several corners (slow, typical, fast) and hold checks too.
  • Cell areas follow the sky130_fd_sc_hd site counts; the delays, clock latencies and wire delays are rounded teaching numbers, and the DEF and tool output lines are shortened.
  • Formal equivalence checking (netlist versus RTL), ATPG pattern generation, and gate-level simulation with timing are not shown.

On the mind map

Open the Computer Architecture mind mapComputerArchitectureAbstraction and numbers: layers and bit patternsAbstraction and numbersCombinational logic: output depends only on inputsCombinational logicSequential logic: state held by a clockSequential logicMIPS software: how C becomes machine wordsMIPS softwareThe processor: datapath plus controlThe processorPipelines and parallelism: more instructions at oncePipelines and parallelismMemory and I/O: small fast near, big slow farMemory and I/OLogic gatesLogic gatestruth table row picks the outputAdders, muxes, ALUAdders, muxes, ALUcritical path sets the delayMux, decoder, encoderMux, decoder, encoderSelect bits pick one input; decoder one lineBubble pushingBubble pushingDe Morgan: AND-OR becomes NAND-NANDAlgebraic factoringAlgebraic factoringShare kernels: 17 → 9 literalsTechnology mappingTechnology mappingCheapest pattern per node, reused upwardFast arithmeticFast arithmeticlookahead carry beats ripple carryBCD and Gray CodesBCD and Gray CodesBCD adder: sum > 9 or carry → add 6Multiply/divide hardwareMultiply/divide hardwareadd or subtract, then shift, once per bitVerilog to hardwareVerilog to hardwareassign gives gates, always_ff gives flopsVerilog testbenchVerilog testbenchGolden model + check task say PASS/FAILASIC design flowRTL→netlist→DEF→GDSII; slack shrinksPlace and RoutePlace and RouteAnneal by HPWL, then Lee wave routesOpen the Computer Architecture mind mapComputer Architectureoutput depends only on inputsCombinational logicLogic gatesLogic gatestruth table row picks the outputAdders, muxes, ALUAdders, muxes, ALUcritical path sets the delayMux, decoder, encoderMux, decoder, encoderSelect bits pick one input; decoder one lineBubble pushingBubble pushingDe Morgan: AND-OR becomes NAND-NANDAlgebraic factoringAlgebraic factoringShare kernels: 17 → 9 literalsTechnology mappingTechnology mappingCheapest pattern per node, reused upwardFast arithmeticFast arithmeticlookahead carry beats ripple carryBCD and Gray CodesBCD and Gray CodesBCD adder: sum > 9 or carry → add 6Multiply/divide hardwareMultiply/divide hardwareadd or subtract, then shift, once per bitVerilog to hardwareVerilog to hardwareassign gives gates, always_ff gives flopsVerilog testbenchVerilog testbenchGolden model + check task say PASS/FAILASIC design flowRTL→netlist→DEF→GDSII; slack shrinksPlace and RoutePlace and RouteAnneal by HPWL, then Lee wave routes
This page on the Computer Architecture mind map · 76 pages in 7 branches · open it to see the whole map and test yourself in recall mode.