BeginnerQuestion 5 of 61Source PDF page undefined

What is the difference between LEF and DEF?

From PDVerse PnR Interview Handbook ยท pdVerse Mentor Guide

Short Answer

LEF describes reusable technology and cell physical abstractions; DEF describes the physical state of a particular design. One defines the building blocks and rules, while the other records how instances are arranged in a design.

Technical Explanation

Technology LEF can describe layers, vias, and placement sites. Cell LEF typically describes a cell or macro boundary, its pin geometry, and routing obstructions. A cell's LEF does not list every placement of that cell in your chip. DEF can include the die area, rows, tracks, instance locations and orientations, ports, blockages, and routing-related information. Its exact contents depend on the stage and export settings. An initial floorplan DEF can therefore be useful without containing detailed signal routes. Conversely, a routed DEF can contain much more information than is needed for a floorplan handoff. Although DEF can carry netlist-related data, the ICC2 flow in the supplied guide imports the structural Verilog and then annotates floorplan data. Do not assume reading a DEF automatically reconstructs every required logical connection. In ICC2, implementation commonly consumes prepared NDM reference libraries. Library preparation can read LEF in the library manager; ICC2 also supports a configured flow that invokes the library manager automatically to assemble cell libraries from source data. Thus, LEF remains a common source of physical abstractions, but it should not be confused with the assembled implementation database.

Common Mistake

Reversing the two formats, or assuming a cell abstract contains a complete transistor-level layout.

Follow-up Question & Model Response

Why must names and units agree between them? Otherwise placements, pins, sites, or layers may not map to the intended objects.

Practical Example

A memory abstract says the macro is 100 by 200 micrometers and exposes pins along one edge. The design's DEF says that instance u_sram is placed at a particular coordinate and orientation. These statements answer different questions.

Original guide diagramWhat is the difference between LEF and DEF?
What is the difference between LEF and DEF?, illustrating the physical design concept.