The Liberty File
Section 2.2 executed logic synthesis and analyzed trade-offs. Section 2.3 examines the standard cell library files that guide those synthesis decisions.
Synthesis commands such as read_liberty, dfflibmap, and abc reference Liberty (.lib) files. The Liberty file defines electrical timing, power dissipation, and Boolean behavior for every standard cell in the PDK. Without Liberty models, synthesis engines cannot calculate path delays or select drive strengths.
Contents of a Liberty File
A Liberty file is an ASCII text format that contains characterized electrical data for standard cells under specified process, voltage, and temperature (PVT) conditions. Each cell entry defines four primary categories:
- Boolean Function: Defines the logical truth table or Boolean equation for output pins.
- Input Pin Capacitance: Quantifies the capacitive electrical load presented by input pins.
- Timing Arcs: Defines propagation delays and output transition slews across two-dimensional lookup tables indexed by input slew and output capacitive load.
- Power Characterization: Specifies static leakage current and dynamic switching power per transition.
Logic synthesis evaluates these models during technology mapping. When configuring SYNTH_STRATEGY, the optimization engine weighs gate area against lookup-table timing delays.
Analyzing a Standard Cell Entry
Consider a Liberty definition for a 2-input NAND gate (sky130_fd_sc_hd__nand2_1):
cell (sky130_fd_sc_hd__nand2_1) {
area : 3.75 ;
pin(A) {
direction : input ;
capacitance : 0.00218 ;
}
pin(B) {
direction : input ;
capacitance : 0.00206 ;
}
pin(Y) {
direction : output ;
function : "(A * B)'" ;
timing() {
related_pin : "A" ;
timing_sense : negative_unate ;
cell_rise(delay_template_7x7) {
index_1 ("0.0100, 0.0400, ..."); /* input slew */
index_2 ("0.0050, 0.0200, ..."); /* output load */
values ("0.0421, 0.0512, ...", \
"0.0509, 0.0601, ...");
}
}
}
}
Two parameters govern timing calculations:
- Pin Capacitance: The block
pin(A) { capacitance : 0.00218 ; }defines an input capacitance of 0.00218 picofarads. The driving gate must charge this capacitive load during transitions. - Timing Lookup Table: Inside
cell_rise, thevaluestable specifies propagation delay in nanoseconds from inputAto outputY. The table indexes delay against two independent variables: incoming transition time (index_1, input slew) and total output capacitive load (index_2).
Propagation delay varies with load. A gate that drives a short wire with minimal load switches faster than an identical gate that drives high fanout capacitance across a die.
The area field in a Liberty file provides a relative numerical weight for synthesis cost functions. It does not define physical dimensions or pin coordinates on silicon. Physical dimensions reside in LEF files.
Practice Exercise
Inspect the following trimmed Liberty entry for a non-inverting buffer:
cell (sky130_fd_sc_hd__buf_2) {
area : 6.25 ;
pin(A) {
direction : input ;
capacitance : 0.00394 ;
}
pin(X) {
direction : output ;
function : "A" ;
}
}
Identify the input pin capacitance and explain why a circuit uses a cell with the logical function function : "A".
Solution
The input capacitance on pin A is 0.00394 picofarads.
The Boolean function function : "A" indicates that the buffer performs no logical inversion or gating. Circuits insert buffers for electrical reasons rather than logical operations. A buffer restores signal slew rates, drives large capacitive fanouts, and isolates high-capacitance interconnect lines.
The next article examines the Library Exchange Format (LEF), which defines physical cell dimensions and routing pin boundaries.