Layout Knowledge Base

glossary

LEF

LEF (Library Exchange Format) is a text file that describes the outside of a ready-made block: how large it is, where the connections sit, and how tightly a neighbor may sit.

mini

The frame is the outside of a block. The squares sit on the edges, where connections are allowed.

Place-and-route reads that outside when it places standard cells or hard blocks without opening every transistor. The file can state that a cell is 0.56 micrometers tall and 1.20 micrometers wide, where the pin shapes live, and which tracks are already occupied. The router treats those numbers as furniture dimensions. The detailed innards stay in a GDSII view that the router may never load. A library file such as stdcells.lef lists macros named INVX1 and NAND2X1. Each macro lists SIZE, PIN A, PIN Y, and the obstruction layers. A pin box on such a macro might be 0.14 by 0.14 micrometers on metal 1.

LEF is the sibling of DEF. DEF describes one design, meaning what was placed and where. Together the two files talk to digital tools. They are not a schematic, and they are not a full mask deck. LEF also carries site names, routing pitches, and antenna data. One file may contain SITE core at 0.20 by 1.80 micrometers and a line LAYER M2 PITCH 0.20. If that pitch and the PDK grid disagree, the router sprinkles off-grid vias.

Editing the GDS and leaving the LEF stale leaves the router believing a pin that no longer exists, or overlapping a blockage that has already moved. Diff the LEF whenever the library updates. A pin that moved is a silent open.

See cells and instances, LVS: layout versus schematic, and what is a layout.