Magic VLSI Layout Tool Version 7.3 *


LEF-format input and output


lef option

where option may be one of the following:
read [filename]
Read a LEF file named filename[.lef]
[filename] -import
Read a LEF file. Import standard cells from .mag files
write [cell]
Write LEF for the current or indicated cell.
Write all cells including the top-level cell. This might be appropriate if the top-level cell is a compendium of standard cells.
writeall -notop
write all subcells of the top-level cell, but not the top-level cell itself. This is appropriate for generating a LEF library from a layout, for which the layout itself would be written to a DEF file.
Print help information


The lef command writes LEF-format files, which are files containing technology information and information about the content of standard cells. It is used in conjunction with the def command to read databases of routed digital standard-cell layouts. The .lef file shares some information with the technology file in magic. At a minimum, to read .lef files from third-party sources, the technology file should have a lef section that maps magic layers to layer names that are found in the .lef and .def files. Without this information, magic will attempt to make an educated guess about the routing layers, which normally will be named in an obvious manner such as "metal1", "metal2", etc. The technology file section may be necessary to handle more complicated input such as obstruction layers. Most other aspects of a technology will be contained within the .lef file. When writing .lef files, magic will use internal layer names for the routing layers if no other information is present in the lef section of the technology file.

Because the lef format allows standard cells to be minimally defined (for purposes of protecting intellectual property), often the .lef file contains no actual layout information for the standard cells. magic provides a command option "-import". When specified, for each macro cell in the input .lef file, magic will look for a .mag file of the same name. If found, it will be loaded and used in preference to the definition in the lef file.

Magic uses the port mechanism for labels to determine what are the standard cells in a design. All cells containing port labels will be considered standard cells when writing a .lef file. Ports retain various bits of information used by the LEF/DEF definition, including the port use and direction. See the port documentation for more information.

Macro cell properties common to the LEF/DEF definition but that have no corresponding database interpretation in magic are retained using the cell property method in magic. There are specific property names associated with the LEF format. These are as follows:

Corresponds to the value of CLASS for a macro cell in the LEF format.
Corresponds to the value of SOURCE for a macro cell in the LEF format.
Corresponds to the vlaue of SYMMETRY for a macro cell in the LEF format.
Normally, when importing a LEF/DEF layout into magic, one will first execute a lef read command followed by a def read command. Likewise, when writing a layout, one will first execute a lef writeall -notop command followed by a def write command.

Implementation Notes:

lef is implemented as a built-in command in magic. Only the critical portion of the LEF syntax has been implemented. In particular, simulation-specific properties of the technology and of macro cells are not implemented.

See Also:


Return to command index

Last updated: October 7, 2004 at 1:43am