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.
| Version | Cells | Cell types | Area from the library |
|---|---|---|---|
| A | 8 | edfxtp_1 (a flop with an enable), 30.0288 µm² each | 240.2304 µm² |
| B | 16 | dfxtp_1 20.0192 µm² + mux2_1 11.2608 µm², eight of each | 250.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.
- Tap cells
- Logic
- Flip-flops
- Power stripes
- I/O pins
- Stage
- Floorplan
- Cell area
- 267.8 µm²
- Utilization
- 23.5 %
- Worst max slack
- 1.3497 ns
- Total negative max slack
- 0.0000 ns
- Worst min slack
- 0.4104 ns
- Stage
- Global placement
- Cell area
- 267.8 µm²
- Utilization
- 23.5 %
- Wirelength (HPWL)
- 317 µm
- Worst max slack
- 1.3282 ns
- Total negative max slack
- 0.0000 ns
- Worst min slack
- 0.4303 ns
- Overflow
- 0.0352
- 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
- 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.
- 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.
| Stage | Cell area | Utilization | Wirelength (HPWL) | Worst max slack | Total negative max slack | Worst min slack | Overflow | Cells placed |
|---|---|---|---|---|---|---|---|---|
| Floorplan | 267.8 µm² | 23.5 % | — | 1.3497 ns | 0.0000 ns | 0.4104 ns | — | 14 tap cells; I/O pins not placed yet |
| Global placement | 267.8 µm² | 23.5 % | 317 µm | 1.3282 ns | 0.0000 ns | 0.4303 ns | 0.0352 | 14 tap cells, 8 flip-flops, 8 logic |
| Detailed placement | 267.8 µm² | 23.5 % | 414 µm | 1.3112 ns | 0.0000 ns | 0.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.
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:
| Cell | Width | Area | Input capacitance | Output max_capacitance |
|---|---|---|---|---|
inv_1 | 3 sites | 3.7536 µm² | A: 2.302 fF | 0.1813 pF |
inv_2 | 3 sites | 3.7536 µm² | A: 4.459 fF | 0.3314 pF |
inv_4 | 5 sites | 6.2560 µm² | A: 9.004 fF | 0.5631 pF |
nand2_1 | 3 sites | 3.7536 µm² | A: 2.315 fF | 0.1666 pF |
xor2_1 | 7 sites | 8.7584 µm² | A: 4.377 fF | 0.0769 pF |
mux2_1 | 9 sites | 11.2608 µm² | A0: 1.558 fF | 0.1730 pF |
dfxtp_1 | 16 sites | 20.0192 µm² | D: 1.678 fF | 0.1621 pF |
edfxtp_1 | 24 sites | 30.0288 µm² | D: 1.804 fF | 0.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:
Tap cells
tapvpwrvgnd_1, one site wide, connects the n-well to VPWR and the p-well to VGND: its LEF puts VPWR onmet1andnwell, VGND onmet1andpwell. Logic cells only bring their wells out as VPB and VNB, so the flow drops taps along every row. This placement has 14.Fill cells
fill_1,fill_2,fill_4andfill_8close the gaps between cells, so the rails and wells run without a break.The rest
Taps of other kinds,
tap_1,tap_2,tapvgnd2_1,tapvgnd_1, and from the companionsky130_ef_sc_hdsetdecap_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
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.
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.
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.
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.
Run to draw the timing paths here.
Run the flow to see each stage of the layout here.
floorplan cell area 267.7568 µm² floorplan instances 30Check yourself
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.