Standard cells: the library's building blocks

Read a standard cell's two views, its outline in the LEF and its timing in the Liberty, decode its name, and measure a design in area instead of cells.

Lesson
L1.2
Time
25 min
Runs on
OpenROAD
Check
6 questions

An engineer compared two versions of an 8-bit register with a load enable by their cell count, as the RTL track's Gates tab shows it. Version A had half the cells of version B, so it looked half the size. By area it was only 4.0 % smaller, because one of its cells is almost as big as two of B's.

VersionCellsCell typesArea from the library
A8edfxtp_1 (a flop with an enable), 30.0288 µm² each240.2304 µm²
B16dfxtp_1 20.0192 µm² + mux2_1 11.2608 µm², eight of each250.2400 µm²

Areas are the area attribute of each cell in the pinned sky130_fd_sc_hd tt Liberty.

In a real library a design's area is the sum of its cells' areas, which the cell count hides.

Fixed height, width in sites

A standard cell is a small circuit designed once by the library vendor: an inverter, a NAND gate, a flip-flop. In sky130_fd_sc_hd every cell is 2.72 µm tall. Its width is a whole number of sites, slots 0.46 µm wide: inv_1 is 3 sites, dfxtp_1 16 and edfxtp_1 24.

Fixed height lets cells stand side by side in rows, like books on a shelf. The supply rail runs along the top edge of every cell and the ground rail along the bottom, so neighbours share them by touching. Every other row is flipped upside down, so two rows that touch share one rail. In the layout below, rows 1 and 2 meet at a supply rail, rows 2 and 3 at a ground rail.

LayoutVersion B of the register, placed by OpenROAD30 cells in 12 rows: 8 flops, 8 multiplexers and 14 tap cells.
  • Tap cells
  • Logic
  • Flip-flops
  • Power stripes
  • I/O pins
Stage
Detailed placement
Cell area
267.8 µm²
Utilization
23.5 %
Wirelength (HPWL)
414 µm
Worst max slack
1.3112 ns
Total negative max slack
0.0000 ns
Worst min slack
0.4372 ns
Version B of the register, placed by OpenROADDrawing the layout…
  1. Rows and taps

    The floorplan cuts the core into 12 rows of sites. Tap cells go in a checkerboard, 13.80 µm apart and alternating from row to row. The met1 rails run along the row edges.

  2. Cells in their rows

    After placement every cell sits on the sites of one row. The flops are the wide cells, 16 sites each; the multiplexers are 9.

Read the layout as text

reg8: die 45.37 × 45.37 µm, core 34.96 × 32.64 µm, 12 rows of 2.72 µm, 18 signal pins.

StageCell areaUtilizationWirelength (HPWL)Worst max slackTotal negative max slackWorst min slackOverflowCells placed
Floorplan267.8 µm²23.5 %—1.3497 ns0.0000 ns0.4104 ns—14 tap cells; I/O pins not placed yet
Global placement267.8 µm²23.5 %317 µm1.3282 ns0.0000 ns0.4303 ns0.035214 tap cells, 8 flip-flops, 8 logic
Detailed placement267.8 µm²23.5 %414 µm1.3112 ns0.0000 ns0.4372 ns—14 tap cells, 8 flip-flops, 8 logic

Measured with OpenROAD 26Q2 on sky130hd at 20 % utilization; zoom in to see the cells share the rails.

The flow reports the design's cell area as the sum of every instance's width times height. For this placement that is 267.7568 µm²: the 250.2400 µm² of the logic plus 14 tap cells of 1.2512 µm² each.

Two views of one cell

The tools never see a cell's transistors. They read two summaries of it, written by the vendor for different jobs.

What sky130_fd_sc_hd__inv_1 containsA PMOS pulls Y up to VPWR when A is low; an NMOS pulls it down to VGND when A is high.
What sky130_fd_sc_hd__inv_1 containsVPWRPMOSNMOSAY
Read the circuit as text
  • PMOS PMOS transistor: gate → n1, source → VPWR, drain → n2
  • NMOS NMOS transistor: gate → n1, drain → n2, source → 0
  • A port: terminal → n1
  • Y port: terminal → n2

Each transistor's body is tied to its source here; in the cell, the wells reach the rails through tap cells.

The LEF view is physical. It gives the outline, SIZE 1.38 BY 2.72 for inv_1, the site it sits on, and every pin as a shape on a layer. The signal pins A and Y are on li1, the local interconnect just above the transistors. VPWR and VGND are on met1. VPB and VNB are the n-well and p-well. The placer and the router read this view.

The Liberty view is electrical. It gives the function, Y = !A, the area, each pin's capacitance (2.302 fF on A), the most capacitance the output may drive (0.1813 pF), and the delay tables of L2.2. The timer reads this view. The full drawing, every polygon of every layer, is in the GDS file; the flow merges it in only at the very end.

Names and drive strength

sky130_fd_sc_hd__nand2_1 reads in parts: SkyWater 130 nm, foundry-provided (fd), standard cell (sc), high density (hd), then the cell, a two-input NAND, and its drive strength, 1.

A higher drive strength means wider transistors. The cell can push more current into a bigger load, and its input becomes a bigger load for whatever drives it. Compare the inverters:

CellWidthAreaInput capacitanceOutput max_capacitance
inv_13 sites3.7536 µm²A: 2.302 fF0.1813 pF
inv_23 sites3.7536 µm²A: 4.459 fF0.3314 pF
inv_45 sites6.2560 µm²A: 9.004 fF0.5631 pF
nand2_13 sites3.7536 µm²A: 2.315 fF0.1666 pF
xor2_17 sites8.7584 µm²A: 4.377 fF0.0769 pF
mux2_19 sites11.2608 µm²A0: 1.558 fF0.1730 pF
dfxtp_116 sites20.0192 µm²D: 1.678 fF0.1621 pF
edfxtp_124 sites30.0288 µm²D: 1.804 fF0.1712 pF

From the pinned cell LEF (width) and tt Liberty (the rest). One input pin is shown per cell.

inv_2 drives 1.83 times the load of inv_1 in exactly the same 3 sites. The stronger inverter costs input capacitance, 4.459 fF against 2.302 fF, and no area. inv_4 needs 5 sites. Not every number exists: there is no inv_3.

Cells with no logic

The cell LEF lists 441 macros and the Liberty 428 cells. The 13 missing from the Liberty have no logic to time:

  1. Tap cells

    tapvpwrvgnd_1, one site wide, connects the n-well to VPWR and the p-well to VGND: its LEF puts VPWR on met1 and nwell, VGND on met1 and pwell. Logic cells only bring their wells out as VPB and VNB, so the flow drops taps along every row. This placement has 14.

  2. Fill cells

    fill_1, fill_2, fill_4 and fill_8 close the gaps between cells, so the rails and wells run without a break.

  3. The rest

    Taps of other kinds, tap_1, tap_2, tapvgnd2_1, tapvgnd_1, and from the companion sky130_ef_sc_hd set decap_12, fakediode_2, fill_8, fill_12.

Two more kinds are in the Liberty, because they have a timing or power view. Decap cells (decap_3 to decap_12) add capacitance between the rails to steady the supply. The antenna diode diode_2 protects transistor gates during manufacturing (L6). And conb_1 is a real logic cell with outputs HI and LO: it ties an input to a constant.

Asked in interviews
  1. What is a standard cell?

    A pre-designed, pre-characterized circuit, such as an inverter or a flop. It has a fixed height and a width in whole sites, so a placer can line cells up in rows that share power rails.

  2. What does drive strength trade?

    A higher drive strength has wider transistors: it drives a larger load faster, but its input capacitance is larger and its area usually is too. Upsizing a cell loads the cell before it.

  3. Which file does each tool read?

    The placer and router read the LEF: outlines, sites and pin shapes. The timer reads the Liberty: function, capacitances and delay tables. The full layout is in the GDS, merged at the end.

  4. What are tap and fill cells for?

    Tap cells tie the n-well to the supply and the substrate to ground at regular intervals, which prevents latch-up. Fill cells close gaps in rows so the rails and wells stay continuous.

Try it

Run version B of the register through the flow: floorplan, placement, clock tree and global routing. Output lists the cell area and utilization after each stage; Layout steps through the stages. Count the tap cells the floorplan added.

Now open the netlist tab and turn it into version A: delete the multiplexers and the m wires, and make each flop an edfxtp_1 with .DE(en) and .D(d[i]). Run again and compare the area. Then change the utilization and watch the die and the number of taps change.

FLOWOpenROAD 26Q2 · sky130hd · simulator service
Edit the constraints or the netlist, then run

          
Expected: floorplan cell area 267.7568 µm² floorplan instances 30

Check yourself

Predict the outputVersion B's floorplan reports a cell area of 267.7568 µm²: 250.2400 µm² of logic and 14 tap cells. Version A at the same utilization gets the same 14 taps. What cell area does A's floorplan report, in µm²?
create_clock -name clk -period 2.0 [get_ports clk]
Read the netlist: design.v
module reg8 (clk, en, d, q);
  input clk;
  input en;
  input [7:0] d;
  output [7:0] q;
  sky130_fd_sc_hd__edfxtp_1 r0 (.CLK(clk), .DE(en), .D(d[0]), .Q(q[0]));
  sky130_fd_sc_hd__edfxtp_1 r1 (.CLK(clk), .DE(en), .D(d[1]), .Q(q[1]));
  sky130_fd_sc_hd__edfxtp_1 r2 (.CLK(clk), .DE(en), .D(d[2]), .Q(q[2]));
  sky130_fd_sc_hd__edfxtp_1 r3 (.CLK(clk), .DE(en), .D(d[3]), .Q(q[3]));
  sky130_fd_sc_hd__edfxtp_1 r4 (.CLK(clk), .DE(en), .D(d[4]), .Q(q[4]));
  sky130_fd_sc_hd__edfxtp_1 r5 (.CLK(clk), .DE(en), .D(d[5]), .Q(q[5]));
  sky130_fd_sc_hd__edfxtp_1 r6 (.CLK(clk), .DE(en), .D(d[6]), .Q(q[6]));
  sky130_fd_sc_hd__edfxtp_1 r7 (.CLK(clk), .DE(en), .D(d[7]), .Q(q[7]));
endmodule
ConceptWhy do all cells of sky130_fd_sc_hd have the same height?
Conceptinv_4 replaces inv_1. What does the design pay?
ConceptThe placer needs to know where a cell's pins are. Which file does it read?
ConceptWhy does the flow place tapvpwrvgnd_1 cells along every row of this library?
ConceptWhich of these is not a cell of sky130_fd_sc_hd?

Remember

  • A standard cell has a fixed height (2.72 µm here) and a width in whole sites, so cells abut in rows and share the power rails.
  • The LEF is the physical view (outline, site, pin shapes) for the placer and router; the Liberty is the electrical view (function, capacitance, delay) for the timer.
  • Drive strength trades input capacitance, and usually area, for the load a cell can drive.
  • Area is the sum of cell areas, and the flow adds physical-only cells such as taps, which have a LEF view and no Liberty entry.