You can use the Cadence® Library Exchange Format (LEF) writer routines to create a program that outputs a LEF file. The LEF writer routines correspond to the sections in the LEF file. This chapter describes the routines listed below that you need to write a particular LEF section.
BUSBITCHARS statement |
|
CLEARANCEMEASURE statement |
|
DIVIDERCHAR statement |
|
LAYER sections about cut, masterslice, overlap, and implant layers |
|
LAYER section about routing layers |
|
MACRO section |
|
Macro Obstruction |
OBS section within a MACRO section |
Macro Pin |
PIN section within a MACRO section |
Macro Pin Port |
PORT section within a PIN section |
MANUFACTURINGGRID statement |
|
MAXVIASTACK statement |
|
NONDEFAULTRULE section |
|
PROPERTY statement in a VIA, VIARULE, LAYER, MACRO or NONDEFAULTRULE section |
|
PROPERTYDEFINTIONS statement |
|
SPACING statement |
|
SITE statement |
|
UNITS statement |
|
USEMINSPACING statement |
|
VERSION statement |
|
VIA section |
|
VIARULE statement |
|
VIARULEGENERATE statement |
The LEF writer setup and control routines initialize the reader and set global variables that are used by the reader. You must begin and end a LEF file with the lefwInit and lefwEnd routines. All other routines must be used between these two routines. The remaining routines described in this section are provided as utilities. For examples of the routines described, see "Setup Examples".
All routines return 0 if successful.
Initializes the LEF writer. This routine must be used first.
Specifies the name of the LEF file to create.
Ends the LEF file. This routine must be used last. This routine does not require any arguments.
Writes a blank line. This routine does not require any arguments.
Prints the return status of the lefw* routines.
Specifies the non-zero integer returned by the LEF writer routines.
The following examples show how to set up the writer. There are two ways to use the LEF writer:
|
You write callback routines for each section, and the writer calls your callback routines in the sequence based on the LEF/DEF Language Reference. If a section is required, but you do not provide a callback routine, the writer issues a warning. If there is a default routine, the writer invokes the default routine with a message attached. |
This manual includes examples with and without callback routines.
The following example uses the writer without callbacks.
The following example uses the writer with callbacks.
The following example shows how to use the callback routine to mark the end of the LEF file. The type is lefwEndLibCbkType.
The Bus Bit Characters routine writes a LEF BUSBITCHARS statement. The BUSBITCHARS statement is optional and can be used only once in a LEF file. For syntax information about the LEF BUSBITCHARS statement, see "Bus Bit Characters" in the LEF/DEF Language Reference.
The BUSBITCHARS statement is part of the LEF file header (which also includes the VERSION, and DIVIDERCHAR statements). If the statements in the header section are not defined, many applications assume default values for them. However, the default values are not formally part of the language definition; therefore you cannot be sure that the same assumptions are used in all applications. You should always explicitly define these values.
This routine returns 0 if successful.
Writes a BUSBITCHARS statement.
Specifies the pair of characters used to specify bus bits when LEF names are mapped to or from other databases. The characters must be enclosed in double quotation marks.
The following example shows a callback routine with the type lefwBusBitCharsCbkType.
The Clearance Measure routine writes a LEF CLEARANCEMEASURE statement. The CLEARANCEMEASURE statement is optional and can be used only once in a LEF file. For syntax information about the LEF CLEARANCEMEASURE section, see "Clearance Measure" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a CLEARANCEMEASURE statement.
Specifies the type of clearance spacing that will be applied to obstructions (blockages) and pins in cells.
Value: Specify one of the following:
Uses the larger x and y distances for spacing between objects. |
||
The Divider Character routine writes a LEF DIVIDERCHAR statement. The DIVIDERCHAR statement is optional and can be used only once in a LEF file. For syntax information about the LEF DIVIDERCHAR statement, see "Divider Character" in the LEF/DEF Language Reference.
The DIVIDERCHAR statement is part of the LEF file header (which also includes the VERSION, and BUSBITCHARS statements). If the statements in the header section are not defined, many applications assume default values for them. However, the default values are not formally part of the language definition; therefore you cannot be sure that the same assumptions are used in all applications. You should always explicitly define these values.
This routine returns 0 if successful.
Writes a DIVIDERCHAR statement.
Specifies the character used to express hierarchy when LEF names are mapped to or from other databases. The character must be enclosed in double quotation marks.
Note: If the divider character appears in a LEF name as a regular character, you must use a backslash (\) before the character to prevent the LEF reader from interpreting the character as a hierarchy delimiter.
The following example shows a callback routine with the type lefwDividerCharCbkTyp.
Extensions routines write a LEF BEGINEXT statement. The BEGINEXT statement is optional and can be used more than once in a LEF file.
Extensions routines let you add customized syntax to the LEF file that can be ignored by tools that do not use that syntax. You can also use extensions to add new syntax not yet supported by your version of LEF, if you are using version 5.1 or later. For syntax information about the LEF EXTENSIONS section, see "Extensions" in the LEF/DEF Language Reference.
You must begin and end a LEF BEGINEXT statement with the lefwStartBeginext and lefwEndBeginext routines. All LEF writer routines that define EXTENSIONS routines must be included between these routines.
For examples of the routines described here, see "Extensions Examples".
All routines return 0 if successful.
Starts the EXTENSIONS statement using the specified tag.
Identifies the extension block. The tag must be enclosed in double quotation marks.
Writes the ENDEXT statement.
Writes a CREATOR statement. The CREATOR statement is optional and can be used only once in an EXTENSIONS statement.
Specifies a string value that defines the creator value.
Writes a DATE statement that specifies the current system time and date. The DATE statement is optional and can be used only once in an EXTENSIONS statement.
Writes a REVISION statement. The REVISION statement is optional and can be used only once in an EXTENSIONS statement.
vers1, vers2
Specify the values used for the revision number string.
Adds customized syntax to the LEF file. This routine is optional and can be used more than once in an EXTENSIONS statement.
title, string
Specify any values you need.
The following example shows a callback routine with the type lefwExtCbkType. This example only shows the usage of some functions related to array.
The following layer routines write LAYER sections about cut, masterslice, overlap, and implant layers. At least one LAYER section is required in a LEF file, and more than one LAYER section is generally required to describe a layout. For syntax information about the LAYER sections for cut, masterslice, overlap, and implant layers, see "Layer (Cut)", "Layer (Masterslice or Overlap)", and "Layer (Implant)" in the LEF/DEF Language Reference.
You must begin and end a LEF LAYER section with the lefwStartLayer and lefwEndLayer routines. You create one LAYER section for each layer you need to define.
For examples of the routines described here, see "Layer Examples".
In addition to the routines described in this section, you can include a PROPERTY statement in a LAYER section. For more information about these routines, see "Property".
All routines return 0 if successful.
To define a masterslice or overlap layer, you only need to use the lefwStartLayer and lefwEndLayer routines. No additional routines are required to define these layers.
To define a cut layer, you must use the lefwLayerCutSpacing routine to start the spacing and the lefwLayerCutSpacingEnd routine to end the spacing. These must be used between the lefwStartLayer and lefwEndLayer routines. Any other routines are optional and must be included after the lefwLayerCutSpacing routine.
To define an implant layer, you must specify the lefwLayerWidth routine between the lefwStartLayer and lefwEndLayer routines.
Starts the LAYER section. Each cut, masterslice, overlap, and implant layer must be defined by a separate lefwStartLayer, lefwEndLayer routine pair.
Specifies the name of the layer being defined.
Specifies the type of layer being defined.
Value: CUT, MASTERSLICE, OVERLAP, or IMPLANT
Ends the LAYER section for the specified layer.
Writes an ACCURRENTDENSITY statement for a cut layer. The ACCURENTDENSITY statement is optional, and can be used only once in a LAYER section.
Specifies one of the AC current limits, PEAK, AVERAGE, or RMS.
Specifies a maximum current limit for the layer in milliamps per square micron. If you specify 0, you must call the lefwLayerACFrequency and lefwLayerACTableEntries routines.
Writes a CUTAREA statement for a cut layer. The CUTAREA statement is optional if you specify a FREQUENCY statement, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of cut area values.
Specifies the cut area values, in square microns. If you specify only one cut area value, there is no cut area dependency, and the table entries are assumed to apply to all cut areas.
Writes a FREQUENCY statement for a cut layer. The FREQUENCY statement is required if you specify a value of 0 in the lefwLayerACCurrentDensity routine, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of frequency values.
Specifies the frequency values, in megahertz. If you specify only one frequency value, there is no frequency dependency, and the table entries are assumed to apply to all frequencies.
Writes a TABLEENTRIES statement for a cut layer. The TABLENTRIES statement is required if you specify a FREQUENCY statement, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of table entry values.
Specifies the maximum cut area for each frequency and cut area pair specified in the FREQUENCY and CUTAREA statements, in milliamps per square micron.
Writes an ANTENNAAREAFACTOR statement for a cut layer. The ANTENNAAREAFACTOR statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the adjust or multiply factor for the antenna metal calculation.
Optional argument that specifies the current antenna factor should be used only when the corresponding layer is connected to the diffusion. Specify NULL to ignore this argument.
Writes an ANTENNAAREARATIO statement for a cut layer. The ANTENNAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the antenna ratio, using the bottom area of the metal wire that is not connected to the diffusion diode.
Writes an ANTENNACUMAREARATIO statement for a cut layer. The ANTENNACUMAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the cumulative antenna ratio, using the bottom area of the metal wire that is not connected to the diffusion diode.
Writes an ANTENNACUMDIFFAREARATIO statement for a cut layer. The ANTENNACUMDIFFAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffAreaRatioPWL in the same LAYER section.
Specifies the cumulative antenna ratio, using the bottom area of the metal wire that is connected to the diffusion diode.
Writes an ANTENNACUMDIFFAREARATIOPWL statement for a cut layer. The ANTENNACUMDIFFAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNADIFFAREARATIO statement for a cut layer. The ANTENNADIFFAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffAreaRatioPWL in the same LAYER section.
Specifies the antenna ratio, using the bottom area of the wire that is connected to the diffusion diode.
Writes an ANTENNADIFFAREARATIOPWL statement for a cut layer. The ANTENNADIFFAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNAMODEL statement for a cut layer. The ANTENNAMODEL statement is optional and can be used more than once in a LAYER section.
Specifies the oxide model for the layer. Each model can be specified once per layer. If you specify an ANTENNAMODEL statement, that value affects all ANTENNA* statements for the layer that follow it until you specify another ANTENNAMODEL statement.
Value: OXIDE1, OXIDE2, OXIDE3, or OXIDE4
Note: OXIDE1 and OXIDE2 are currently supported. If you specify OXIDE3 or OXIDE4, current tools parse and ignore them.
Writes an ARRAYSPACING statement for a cut layer. The ARRAYSPACING statement is optional and can be used only once in a LAYER section.
Optional argument that indicates that the via can use N x M cut arrays, where N = arrayCuts and M can be any value, including one that is larger than N. Specify 0 to ignore this argument.
Optional argument that specifies the via width. The array spacing rules only apply when the via metal width is greater than or equal to viaWidth. Specify 0 to ignore this argument.
Specifies the edge-of-cut to edge-of-cut spacing inside one cut array.
Specifies the number of arrayCuts and arraySpacings pairs provided.
Specifies the size of the cut arrays.
A large via array with a size greater than or equal to arrayCuts x arrayCuts in both dimensions must use N x N cut arrays (where N = arrayCuts) separated from other cut arrays by a distance greater than or equal to arraySpacing.
If you specify multiple arrayCuts and arraySpacings, the arrayCuts values must be specified in increasing order.
Specifies the spacing between the cut arrays.
Starts a SPACING statement for a cut layer. Call lefwLayerCutSpacingEnd to end each spacing.
The SPACING statement is optional and can be used more than once in a LAYER section.
Specifies the minimum spacing allowed between via cuts, in microns.
Writes an ADJACENTCUTS statement for a SPACING statement for a cut layer. The ADJACENTCUTS statement is optional. You can specify only one of the following statements per spacing: LAYER, ADJACENTCUTS, AREA, or PARALLELOVERLAP.
Optional argument that specifies the number of via cuts--either 2, 3, or 4.
Specifies the distance between via cuts, in microns.
Optional argument that sets the EXCEPTSAMEPGNET keword for the spacing. If this keyword is set, the ADJACENTCUTS rule does not apply between cuts if they are on the same net, and are on a power and ground net.
Writes an AREA statement for a SPACING statement for a cut layer. The AREA statement is optional. You can specify only one of the following statements per spacing: LAYER, ADJACENTCUTS, AREA, or PARALLELOVERLAP.
Specifies the cut area. Any cut with an area equal to or greater than this number requires additional spacing.
Writes a CENTERTOCENTER statement for a SPACING statement for a cut layer. The CENTERTOCENTER statement is optional.
Ends a SPACING statement for a cut layer.
Writes a LAYER statement for a SPACING statement for a cut layer. The LAYER statement is optional. You can specify only one of the following statements per spacing: LAYER, ADJACENTCUTS, AREA, or PARALLELOVERLAP.
Specifies the second layer name.
Optional argument indicating that same-net cuts on two different layers can be stacked if they are exactly aligned; otherwise, the cuts must have cutSpacing between them. Specify 0 to ignore this argument.
Writes a PARALLELOVERLAP statement for a SPACING statement for a cut layer. The PARALLELOVERLAP statement is optional. You can specify only one of the following statements per spacing: LAYER, ADJACENTCUTS, AREA, or PARALLELOVERLAP.
Writes a SAMENET statement for a SPACING statement for a cut layer. The SAMENET statement is optional.
Writes a SPACINGTABLE ORTHOGONAL statement for a cut layer. The SPACINGTABLE ORTHOGONAL statement is optional and can be used only once in a LAYER section.
Specifies the number of cutWithins and orthoSpacings pairs provided.
Specifies the distance between cuts, in microns.
If two cuts have parallel overlap greater than 0 and are less than cutWithin distance from each other, then any other cuts in an orthogonal direction must be equal to or greater than orthoSpacings.
Specifies the orthogonal spacing, in microns.
Writes the DCCURRENTDENSITY statement for a cut layer. The DCCURENTDENSITY statement is optional and can be used only once in a LAYER section.
Specifies the DC current limit, AVERAGE.
Specifies a current limit for the layer in milliamps per square microns. If you specify 0, you must call the lefwLayerDCCutarea and lefwLayerDCTableEntries routines.
Writes a CUTAREA statement for a cut layer. The CUTAREA statement is required if you specify a value of 0 in the lefwLayerDCCurrentDensity routine, and can be used only once in a DCCURENTDENSITY statement.
Specifies the number of cut area values.
Specifies the cut area values, in square microns.
Writes a TABLEENTRIES statement for a cut layer. The TABLENTRIES statement is required if you specify a CUTAREA statement, and can be used only once in a DCCURENTDENSITY statement.
Specifies the number of table entry values.
Specifies the maximum current density for each specified cut area, in milliamps per square micron.
Writes an ENCLOSURE statement for a cut layer. The ENCLOSURE statement is optional and can be used more than once in a LAYER section.
Optional argument that specifies whether the overhang is required on the routing layers above or below the cut layer. Specify "" to ignore this argument.
Value: ABOVE or BELOW
overhang1 overhang2
Specifies that any rectangle from this cut layer requires the routing layers to overhang by overhang1 on two opposite sides, and by overhang2 on the other two opposite sides.
Optional argument that specifies that the enclosure rule only applies when the width of the routing layer is greater than or equal to width. Specify 0 to ignore this argument.
Writes an ENCLOSURE statement with a LENGTH keyword for a cut layer. This routine lets you specify a minimum length instead of the width. The ENCLOSURE statement is optional and can be used more than once in a LAYER section.
Optional argument that specifies whether the overhang is required on the routing layers above or below the cut layer. If you don't specify this argument, the rule applies to both adjacent routing layers; specify "" to ignore this argument.
Value: ABOVE or BELOW
overhang1 overhang2
Overhange values. Any rectangle from this cut layer requires the routing layers to overhang by overhang1 on two opposite sides, and by overhang2 on the other two opposite sides.
Optional argument that specifies that the total length of the longest opposite-side overhangs must be greater than or equal to minLength to make this enclosure valid. The minLength is measured at the center of the cut. Specify 0 to ignore this argument.
Writes an ENCLOSURE statement with an EXCEPTEXTRACUT keyword for a cut layer. This routine is similar to lefwLayerEnclosure except that it lets you specify EXCEPTEXTRACUT. The ENCLOSURE statement is optional and can be used more than once in a LAYER section.
Optional argument that specifies whether the overhang is required on the routing layers above or below the cut layer. If you don't specify this argument, the rule applies to both adjacent routing layers; specify "" to ignore this argument.
Value: ABOVE or BELOW
overhang1 overhang2
Overhange values. Any rectangle from this cut layer requires the routing layers to overhang by overhang1 on two opposite sides, and by overhang2 on the other two opposite sides.
Optional argument that specifies that the enclosure rule only applies when the width of the routing layer is greater than or equal to width. Specify 0 to ignore this argument. If you do not specify this argument, the enclosure rule applies to all widths (as if width was 0).
Optional argument that sets the EXCEPTEXTRACUT cutWithin keyword. Specifies that if there is another via cut less than or equal to cutWithin, then this ENCLOSURE with WIDTH rule is ignored and the ENCLOSURE rules for minimum width wires are applied to the via cuts instead. Specify 0 to ignore this argument.
Writes a PREFERENCLOSURE statement for a cut layer. The PREFERENCLOSURE statement is optional and can be used more than once in a LAYER section.
Note: The PREFERENCLOSURE statement specifies preferred enclosure rules that can improve manufacturing yield, instead of enclosure rules that absolutely must be met (ENCLOSURE statement).
Optional argument that specifies whether the overhang is required on the routing layers above or below the cut layer. Specify "" to ignore this argument.
Value: ABOVE or BELOW
overhang1 overhang2
Specifies that any rectangle from this cut layer requires the routing layers to overhang by overhang1 on two opposite sides, and by overhang2 on the other two opposite sides. The overhang values must be equal to or larger than the overhang values in the ENCLOSURE rule.
Optional argument that specifies that the enclosure rule only applies when the width of the routing layer is greater than or equal to width. Specify 0 to ignore this argument.
Writes a RESISTANCE statement for the cut layer. The RESISTANCE statement is optional and can be used only once in a LAYER section.
Specifies the resistance per cut on this layer. LEF vias without their own specific resistance value, or DEF vias from a via rule without a resistance per cut value, can use this resistance value.
Writes a WIDTH statement for an implant or a cut layer. The WIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum width for the layer.
The following example shows a callback routine with the type lefwLayerCbkType. This example shows how to create a cut, masterslice, or overlap layer. For an example of a routing layer, see the Layer (Routing) section.
Routing layer routines write LAYER sections about routing layers. At least one LAYER section is required in a LEF file, and more than one LAYER section is generally required to describe a layout. For syntax information about the LAYER section for routing layers, see "Layer (Routing)" in the LEF/DEF Language Reference.
You must begin and end a LEF LAYER section with the lefwStartLayerRouting and lefwEndLayerRouting routines. The remaining routing layer routines defined in this section must be included between these routines. You create one LAYER section for each routing layer you need to define.
For examples of the routines described here, see "Routing Layer Examples"
In addition to the routines described in this section, you can include a PROPERTY statement within a LAYER section. For more information about these routines, see "Property".
All routines return 0 if successful.
Starts the LAYER section. The LEF writer automatically writes the TYPE ROUTING statement. This routine is required to define a routing layer and can be used more than once. Each routing layer must be defined by a separate lefwStartLayerRouting, lefwEndLayerRouting routine pair.
Specifies the name of the routing layer being defined.
Ends the LAYER section for the specified routing layer.
Writes a DENSITYCHECKSTEP statement. The DENSITYCHECKSTEP statement is optional and can be used only once in a LAYER section.
Specifies the stepping distance for metal density checks, in distance units.
Writes a DENSITYCHECKWINDOW statement. The DENSITYCHECKWINDOW statement is optional and can be used only once in a LAYER section.
Specifies the length of the check window, in distance units.
Specifies the width of the check window, in distance units.
Writes a FILLACTIVESPACING statement. The FILLACTIVESPACING statement is optional and can be used only once in a LAYER section.
Specifies the spacing between metal fills and active geometries.
Writes an ACCURRENTDENSITY statement. The ACCURENTDENSITY statement is optional and can be used only once in a LAYER section.
Specifies the type of AC current limit.
Value: PEAK, AVERAGE, or RMS
Specifies a maximum current for the layer, in milliamps per micron. If you specify 0, you must specify the lefwLayerACFrequency and lefwLayerACTableEntries routines.
Writes a FREQUENCY statement. The FREQUENCY statement is required if you specify a value of 0 in the lefwLayerACCurrentDensity routine, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of frequency values.
Specifies the frequency values, in megahertz.
Writes a TABLEENTRIES statement. The TABLENTRIES statement is required if you specify a FREQUENCY statement, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of table entry values.
Specifies the maximum current for each of the frequency and width pairs specified in the FREQUENCY and WIDTH statements, in milliamps per micron.
Writes a WIDTH statement. The WIDTH statement is optional if you specify a FREQUENCY statement, and can be used only once in an ACCURENTDENSITY statement.
Specifies the number of width values.
Specifies the wire width values, in microns.
Writes an ANTENNAAREADIFFREDUCEPWL statement for a routing or cut layer. The ANTENNAAREADIFFREDUCEPWL statement is optional and can be used once after each lefwLayerAntennaModel routine in a LAYER section.
Specifies the number of diffusion area and metalDiffFactor pairs.
Specifies the diffArea values. The values are floating points, specified in microns squared. They should start with 0 and monotonically increase in value to the maximum size diffArea expected.
Specifies the metalDiffFactor values. The values are floating points with no units and are normally between 0.0 and 1.0.
Writes an ANTENNAAREAFACTOR statement. The ANTENNAAREAFACTOR statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the adjust or multiply factor for the antenna metal calculation.
Optional argument that specifies the current antenna factor should be used only when the corresponding layer is connected to the diffusion. Specify NULL to ignore this argument.
Writes an ANTENNAAREAMINUSDIFF statement for a routing or cut layer. The ANTENNAAREAMINUSDIFF statement is optional and can be used once after each lefwLayerAntennaModel routine in a LAYER section.
Specifies the diffusion area. The antenna ratio metal area will subtract the diffusion area connected to it. minusDiffFactor is a floating point value and defaults to 0.0.
Writes the ANTENNAAREARATIO statement. The ANTENNAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the antenna ratio, using the bottom area of the metal wire that is not connected to the diffusion diode.
Writes an ANTENNACUMAREARATIO statement. The ANTENNACUMAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the cumulative antenna ratio, using the bottom area of the metal wire that is not connected to the diffusion diode.
Writes an ANTENNACUMDIFFAREARATIO statement. The ANTENNACUMDIFFAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffAreaRatioPWL in the same LAYER section.
Specifies the cumulative antenna ratio, using the bottom area of the metal wire that is connected to the diffusion diode.
Writes an ANTENNACUMDIFFAREARATIOPWL statement. The ANTENNACUMDIFFAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNACUMDIFFSIDEAREARATIO statement. The ANTENNACUMDIFFSIDEAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffSideAreaRatioPWL in the same LAYER section.
Specifies the cumulative antenna ratio, using the side wall area of the metal wire that is connected to the diffusion diode.
Writes an ANTENNACUMDIFFSIDEAREARATIOPWL statement. The ANTENNACUMDIFFSIDEAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaCumDiffSideAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNACUMSIDEAREARATIO statement. The ANTENNACUMSIDEAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the cumulative antenna ratio, using the side wall area of the metal wire that is not connected to the diffusion diode.
Writes an ANTENNACUMROUTINGPLUSCUT statement for a routing or cut layer. The ANTENNACUMROUTINGPLUSCUT statement is optional and can be used once after each lefwLayerAntennaModel routine in a LAYER section.
Writes an ANTENNADIFFAREARATIO statement. The ANTENNADIFFAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffAreaRatioPWL in the same LAYER section.
Specifies the antenna ratio, using the bottom area of the wire that is connected to the diffusion diode.
Writes an ANTENNADIFFAREARATIOPWL statement. The ANTENNADIFFAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNADIFFSIDEAREARATIO statement. The ANTENNADIFFSIDEAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffSideAreaRatioPwl in the same LAYER section.
Specifies the antenna ratio, using the side wall area of the wire that is connected to the diffusion diode.
Writes an ANTENNADIFFSIDEAREARATIOPWL statement. The ANTENNADIFFSIDEAREARATIOPWL statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section. If you specify this routine, you cannot specify lefwLayerAntennaDiffSideAreaRatio in the same LAYER section.
Specifies the number of diffusion-ratio pairs.
Specifies the diffusion values.
Specifies the ratio values.
Writes an ANTENNAGATEPLUSDIFF statement for a routing or cut layer. The ANTENNAGATEPLUSDIFF statement is optional and can be used once after each lefwLayerAntennaModel routine in a LAYER section.
Specifies that the antenna ratio gate area should include the diffusion area multiplied by plusDiffFactor. minusDiffFactor is a floating point value.
Writes an ANTENNAMODEL statement. The ANTENNAMODEL statement is optional and can be used more than once in a LAYER section.
Specifies the oxide model for the layer. Each model can be specified once per layer. If you specify an ANTENNAMODEL statement, that value affects all ANTENNA* statements for the layer that follow it until you specify another ANTENNAMODEL statement.
Value: OXIDE1, OXIDE2, OXIDE3, or OXIDE4
Note: OXIDE1 and OXIDE2 are currently supported. If you specify OXIDE3 or OXIDE4, current tools parse and ignore them.
Writes an ANTENNASIDEAREAFACTOR statement. The ANTENNASIDEAREAFACTOR statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the adjust or multiply factor for the antenna metal calculation.
Optional argument that specifies that the current antenna factor should only be used when the corresponding layer is connected to the diffusion. Specify NULL to ignore this argument.
Writes an ANTENNASIDEAREARATIO statement. The ANTENNASIDEAREARATIO statement is optional and can be used once after each lefwAntennaModel routine in a LAYER section.
Specifies the antenna ratio, using the side wall area of the wire that is not connected to the diffusion diode.
Writes the DCCURRENTDENSITY statement. The DCCURENTDENSITY statement is optional and can be used only once in a LAYER section.
Specifies the DC current limit, AVERAGE.
Specifies the current limit for the layer, in milliamps per micron. If you specify 0, you must specify the lefwLayerDCWidth and lefwLayerDCTableEntries routines.
Writes a TABLEENTRIES statement. The TABLENTRIES statement is required if you specify a WIDTH statement, and can be used only once in a DCCURENTDENSITY statement.
Specifies the number of table entry values.
Specifies the value of current density for each specified width, in milliamps per micron.
Writes a WIDTH statement. The WIDTH statement is required if you specify a value of 0 in the lefwLayerDCCurrentDensity routine, and can be used only once in a DCCURENTDENSITY statement.
Specifies the number of width values.
Specifies the wire width values, in microns.
Writes the DIRECTION and WIDTH statements for a LAYER section. The DIRECTION and WIDTH statements are required and can be used only once in a LAYER section.
Specifies the preferred routing direction.
Value: Specify one of the following:
Specifies the default routing width to use for all regular wiring on the layer.
Writes an AREA statement. The AREA statement is optional and can be used only once in a LAYER section.
Specifies the minimum metal area required for polygons on the layer, in distance units squared. All polygons must have an area that is greater than or equal to area, if no MINSIZE rule (lefwLayerRoutingMinsize) is specified. If a MINSIZE rule exists, all polygons must meet either the MINSIZE or the AREA rule.
Writes a CAPACITANCE CPERSQDIST statement. The CAPACITANCE CPERSQDIST statement is optional and can be used only once in a LAYER section.
Specifies the capacitance for each square unit, in picofarads per square micron.
Writes the CAPMULTIPLIER statement. The CAPMULTIPLIER statement is optional and can be used only once in a LAYER section.
Specifies the multiplier for interconnect capacitance to account for increases in capacitance caused by nearby wires.
Writes a DIAGMINEDGELENGTH statement. The DIAGMINEDGELENGTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum length for a diagonal edge. Any 45-degree diagonal edge must have a length that is greater than or equal to diagLength.
Writes a DIAGPITCH statement that contains one pitch value that is used for both the 45-degree angle and 135-degree angle directions. The DIAGPITCH statement is optional and can only be used once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingDiagPitchXYDistance routine.
Specifies the 45-degree routing pitch for the layer.
Writes a DIAGPITCH statement that contains separate values for the 45-degree angle and 135-degree angle directions. The DIAGPITCH statement is optional and can only be used once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingDiagPitch routine.
Specifies the 45-degree angle pitch (the center-to-center space between 45-degree angle routes).
Specifies the 135-degree angle pitch.
Writes a DIAGSPACING statement. The DIAGSPACING statement is optional and can be used only once in a LAYER section.
Specifies the minimum spacing allowed for a 45-degree angle shape.
Writes a DIAGWIDTH statement. The DIAGWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum width allowed for a 45-degree angle shape.
Writes an EDGECAPACITANCE statement. The EDGECAPACITANCE statement is optional and can be used only once in a LAYER section.
Specifies a floating-point value of peripheral capacitance, in picoFarads per micron.
Writes a HEIGHT statement. The HEIGHT statement is optional and can be used only once in a LAYER section.
Specifies the distance from the top of the ground plane to the bottom of the interconnect.
Writes a MAXIMUMWIDTH statement. The MAXIMUMWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the maximum width a wire on the layer can have.
Writes a MINENCLOSEDAREA statement. The MINENCLOSEDAREA statement is optional and can be used more than once in a LAYER section.
Specifies the number of values defined in the routine.
Specifies the minimum area size of a hole enclosed by metal. You can specify one or more values.
Optional argument that applies the minimum area size limit only when the hole is created from a wire that has a width that is less than or equal to width. You can specify one or more values.
Writes a MINIMUMCUT statement. The MINIMUMCUT statement is optional and can be used more than once in a LAYER section.
Specifies the number of cuts a via must have when it is on a wide wire or pin whose width is greater than minWidth.
Specifies the minimum width of the wire or pin.
Writes a FROMABOVE or FROMBELOW statement. This statement is optional and can be used only once after each lefwLayerRoutingMinimumcut routine.
Specifies the MINIMUMCUT statement applies only to connections from above the layer or from below the layer.
Value: FROMABOVE or FROMBELOW
Writes a LENGTH statement. This statement is optional and can be used only once after each lefwLayerRoutingMinimumcut routine.
Applies the minimum cut rule to thin wires directly connected to wide wires, if the vias on the thin wires are less than distance from the wide wire, and the wide wire has a length that is greater than length.
Specifies the minimum length of the wide wire.
Writes a MINIMUMCUT statement with a WITHIN keyword. This routine is similar to the lefwLayerRoutingMinimumcut routine, except that it lets you specify a WITHIN value. The MINIMUMCUT statement is optional and can be used only once in a LAYER section.
Specifies the number of cuts a via must have when it is on a wide wire or pin whose width is greater than minWidth.
Specifies the minimum width of the wire or pin.
Specifies that numCuts via cuts must be less than cutDistance from each other to be counted together to meet the minimum cut rule.
Writes a MINSIZE statement. The MINSIZE statement is optional and can be used only once in a LAYER section.
Specifies the number of rectangles defined.
minWidth minLength
Specifies the minimum width and length values for a rectangle that must be able to fit somewhere within each polygon on this layer. All polygons must meet this MINSIZE rule, if no AREA rule is specified (lefwLayerRoutingArea). If an AREA rule is specified, all polygons must meet either the MINSIZE or the AREA rule.
Writes a MINSTEP statement. The MINSTEP statement is optional and can be used more than once in a LAYER section.
Specifies the minimum step size, or shortest edge length, for a shape.
Writes a MINSTEP statement. This routine is similar to lefwLayerRoutingMinstep, except that it lets you specify the MAXEDGES option. The MINSTEP statement is optional and can be called only once after lefwStartLayerRouting.
Specifies the minimum step size, or shortest edge length, for a shape.
Specifies the maximum consecutive edges.
Writes a MINSTEP statement that contains rule type and total edge length values. The MINSTEP statement is optional and can be more than once in a LAYER section.
Specifies the minimum step size, or shortest edge length, for a shape.
Indicates to which consecutive edges the MINSTEP rule applies. A DRC violation occurs if one or more consecutive edges of the specified type are less than distance. There can only be one rule of each type per layer.
Value: Specify one of the following:
Specifies the maximum total edge length allowed that OPC can correct without causing new DRC violations. A violation only occurs if the total length of consecutive edges that are less than distance is greater than maxLength.
Writes a MINWIDTH statement. The MINWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum legal object width on the routing layer, in microns.
Writes an OFFSET statement that contains one value for both the x and y offsets. The OFFSET statement is optional and can be used only once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingOffsetXYDistance routine.
Specifies the offset, from the origin (0,0) for the routing grid for the layer.
Writes an OFFSET statement that contains separate values for the x and y offsets. The OFFSET statement is optional and can be used only once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingOffset routine.
Specifies the x offset for vertical routing tracks.
Specifies the y offset for horizontal routing tracks.
Writes a PITCH statement that contains one pitch value that is used for both the x and y pitch. The PITCH statement is required and can be used only once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingPitchXYDistance routine.
Specifies the routing pitch for the layer.
Writes a PITCH statement that contains separate values for the x and y pitch. The PITCH statement is required and can be used only once in a LAYER section. If you specify this routine, you cannot specify the lefwLayerRoutingPitch routine.
Specifies the x pitch (that is , the space between each vertical routing track).
Specifies the y pitch (that is, the space between each horizontal routing track).
Writes a PROTRUSION statement. The PROTRUSION statement is optional and can be used only once in a LAYER section.
Specifies the maximum length of a protrusion.
Specifies the minimum width of a protrusion.
Specifies the minimum width of the wire to which the protrusion is connected.
Writes a RESISTANCE RPERSQ statement. The RESISTANCE RPERSQ statement is optional and can be used only once in a LAYER section.
Specifies the resistance for a square of wire, in ohms per square micron.
Writes a SHRINKAGE statement. The SHRINKAGE statement is optional and can be used only once in a LAYER section.
Specifies the value to account for shrinkage of interconnect wiring because of the etching process. Actual wire widths are determined by subtracting this constant value.
Writes a SPACING statement. The SPACING statement is optional and can be used more than once in a LAYER section.
Note: You must use either this routine or the lefwLayerRoutingStartSpacingtableParallel routine for all LAYER sections.
Specifies the minimum spacing allowed between two regular geometries on different nets, also known as the different-net spacing rule.
Writes an ENDOFLINE statement. The ENDOFLINE statement is optional and can be used only once after a SPACING statement.
Specifies the end-of-line width. An end-of-line with a width less than eolWidth requires spacing greater than or equal to eolSpace beyond the end of the line anywhere within eolWIthin distance.
The eolWithin distance. This value must be smaller than the minimum allowed spacing.
Writes a PARALLELEDGE statement. The PARALLELEDGE statement is optional and can be used only once after a SPACING statement.
Specifies the parSpace value. The end-of-line rule applies only if there is a parallel edge less than parSpace away that is also less than parWithin from the end.
Specifies the parWithin value.
Optional argument that writes the TWOEDGES keyword, which specifies that the end-of-line rule applies only if there are two parallel edges that meet the PARALLELEDGE parSpace and parWithin parameters. Specify 0 to ignore this argument.
Writes an ENDOFNOTCHWIDTH statement. The ENDOFNOTCHWIDTH statement is optional and can be used only once after a SPACING statement.
Specifies the end-of-notch width.
Specifies the minimum notch spacing.
Specifies the minimum notch length.
Writes a LENGTHTHRESHOLD statement. The LENGTHTHRESHOLD statement is optional and can be used only once after a lefwLayerRoutingSpacing routine. If you specify this routine, you cannot specify the lefwLayerRoutingSpacingRange or lefwLayerRoutingSamenet routines.
Specifies the maximum parallel run length or projected length with an adjacent metal object.
minWidth, maxWidth
Optional arguments that specify a width range. If you specify a range, the threshold spacing rule applies to all objects with widths that are greater than or equal to minWidth and less than or equal to maxWidth.
Writes a NOTCHLENGTH statement. The NOTCHLENGTH statement is optional and can be used only once after lefwStartLayerRouting.
Specifies the minimum notch length. Any notch with notch length less than minNLength must have a notch spacing greater than or equal to the minimum spacing. The value you specify must be only slightly larger than the normal minimum spacing (for example, between 1x or 2x minimum spacing).
Writes a RANGE statement. The RANGE statement is optional and can be used only once after a lefwLayerRoutingSpacing routine. If you specify this routine, you cannot specify the lefwLayerRoutingSpacingLengthThreshold or lefwLayerRoutingSameNet routines.
minWidth, maxWidth
Specifies a width range. If you specify a range, the minimum spacing rule applies to all wires on the layer with widths that are greater than or equal to minWidth and less than or equal to maxWidth.
Writes an INFLUENCE statement. The INFLUENCE statement is optional and can be used only once after a lefwLayerRoutingSpacingRange routine. If you specify this routine, you cannot specify the lefwLayerRoutingSpacingRangeUseLengthThreshold or lefwLayerRoutingSpacingRangeRange routines in the same LAYER section.
Specifies the area of the stub wire which inherits the spacing from a wide wire.
Optional arguments that specify a wire width range. If you specify a range, the influence spacing rule applies to all stub wires on the layer with widths that are greater than or equal to stubMinWidth and less than or equal to stubMaxWidth.
Writes a second RANGE statement. The second RANGE statement is optional and can be used only once after a lefwLayerRoutingSpacingRange routine. If you specify this routine, you cannot specify the lefwLayerRoutingSpacingRangeInfluence or lefwLayerRoutingSpacingRangeUseLengthThreshold routines in the same LAYER section.
minWidth, maxWidth
Specify a second width range. If you specify a second range, the minimum spacing rule applies if the widths of both objects are greater than or equal to minWidth and less than or equal to maxWidth (each object in a different range).
Writes a USELENGTHTHRESHOLD statement. The USELENGTHTHRESHOLD statement is optional and can be used only once after a lefwLayerRoutingSpacingRange routine. If you specify this routine, you cannot specify the lefwLayerRoutingSpacingRangeRange or lefwLayerRoutingSpacingRangeInfluence routines in the same LAYER section.
This routine is only valid if one or both of the range values in the lefwLayerRoutingSpacingRange routine are not zero.
Writes a SAMENET keyword for a SPACING statement. Only one of lefwLayerRoutingSpacingSameNet, lefwLayerRoutingSpacingRange, or lefwLayerRoutingSpacingLengthThreshold can be called once after lefwLayerRoutingSpacing.
Optional argument that specifies the PGONLY keyword. If this keyword is specified, the minSpacing value only applies to same-net metal that is a power or ground net.
Writes a SPACINGTABLE INFLUENCE statement. The SPACINGTABLE INFLUENCE statement is optional and can be used only once after a lefwLayerRoutingStartSpacingtableParallel routine.
Writes a SPACINGTABLE INFLUENCE WIDTH statement. The SPACINGTABLE INFLUENCE WIDTH statement is required if you specify the lefwLayerRoutingStartSpacingtableInfluence routine, and can be used only once in a LAYER section.
Specifies an array of values that represent the distance between a wide wire and two perpendicular wires.
Specifies an array of values that represent the spacing between the two perpendicular wires.
Specifies an array of values that represent the width of the wide wire.
Writes a SPACINGTABLE PARALLELRUNLENGTH statement. The SPACINGTABLE PARALLELRUNLENGTH statement is optional and can be used only once in a LAYER section.
Note: You must use either this routine or the lefwLayerRoutingSpacing routine for all LAYER sections.
Specifies an array of values that represent the maximum parallel run length between two wires.
Specifies the number of length values specified.
Writes a SPACINGTABLE PARALLELRUNLENGTH WIDTH statement. The SPACINGTABLE PARALLELRUNLENGTH WIDTH statement is required if you specify the lefwLayerRoutingStartSpacingtableParallel routine, and can be used only once in a LAYER section.
Specifies the number of spacing values specified.
Specifies an array of values that represent the spacing between the two wires.
Specifies and array of values that represent the maximum width of the two wires.
Writes a SPACINGTABLE TWOWIDTHS statement. The SPACINGTABLE TWOWIDTHS statement is optional and can be used multiple times in a LAYER section after the lefwLayerRouting routine.
Writes a SPACINGTABLE TWOWIDTHS WIDTH statement. This routine is required after a lefwLayerRoutingStartSpacingtableTwoWidths routine.
The widths of the two objects.
Optional argument that specifies the parallel run length between the two objects. Specify 0 to ignore this argument.
Specifies the number of spacing values provided.
The spacing values that represent the spacing between two objects.
Ends a SPACINGTABLE statement. This routine is required if you specify lefwLayerRoutingStartSpacingtableParallel.
Writes a THICKNESS statement. The THICKNESS statement is optional and can be used only once in a LAYER section.
Specifies the thickness of the interconnect.
Writes a WIREEXTENSION statement. The WIREEXTENSION statement is optional and can be used only once in a LAYER section.
Specifies the distance by which wires are extended at vias. Enter 0 to specify no wire extension. Values other than 0 must be more than half of the default routing width for the layer.
Writes a MAXADJACENTSLOTSPACING statement. The MAXADJACENTSLOTSPACING statement is optional and can be used only once in a LAYER section.
Specifies the maximum spacing, in distance units, allowed between two adjacent slot sections.
Writes a MAXCOAXIALSLOTSPACING statement. The MAXCOAXIALSLOTSPACING statement is optional and can be used only once in a LAYER section.
Specifies the maximum spacing, in distance units, allowed between two slots in the same slot section.
Writes a MAXEDGESLOTSPACING statement. The MAXEDGESLOTSPACING statement is optional and can be used only once in a LAYER section.
Specifies the maximum spacing, in distance units, allowed between slot edges.
Writes a MAXIMUMDENSITY statement. The MAXIMUMDENSITY statement is optional and can be used only once in a LAYER section.
Specifies the maximum metal density allowed for the layer, as a percentage of its area.
Writes a MINIMUMDENSITY statement. The MINIMUMDENSITY statement is optional and can be used only once in a LAYER section.
Specifies the minimum metal density allowed for the layer, as a percentage of its area.
Writes a SLOTLENGTH statement. The SLOTLENGTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum slot length, in distance units, allowed in the design.
Wries a SLOTWIDTH statement. The SLOTWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum slot width, in distance units, allowed in the design.
Writes a SLOTWIRELENGTH statement. The SLOTWIRELENGTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum wire length, in distance units, allowed for wires that need to be slotted.
Writes a SLOTWIREWIDTH statement. The SLOTWIREWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum wire width, in distance units, allowed for wires that need to be slotted.
Writes a SPLITWIREWIDTH statement. The SPLITWIREWIDTH statement is optional and can be used only once in a LAYER section.
Specifies the minimum wire width, in distance units, allowed for wires that need to be split.
Macro routines write a LEF MACRO section. A MACRO section is optional and can be used more than once in a LEF file. For syntax information about the LEF MACRO section, see "Macro" in the LEF/DEF Language Reference.
You must begin and end a LEF MACRO section with the lefwStartMacro and lefwEndMacro routines. The macroName value in the start and end routines identifies the macro being defined. All LEF writer routines that define this macro must be included between the lefwStartMacro and lefwEndMacro routines specifying that macro name.
For examples of the routines described here, see "Macro Examples".
In addition to the routines described in this section, you can include an OBS, or PIN statement within a MACRO section. For more information about these routines, see "Macro Obstruction" , or "Macro Pin".
You can also include a PROPERTY statement within a MACRO section. For more information about these routines, see "Property".
All routines return 0 if successful.
Starts the MACRO section. This routine is required to begin each MACRO section.
Specifies the name of the macro being defined.
Ends the MACRO section for the specified macroName.
Writes a CLASS statement. The CLASS statement is optional and can be used only once in a MACRO section.
Specifies the macro type.
Value: COVER, RING, BLOCK, PAD, CORE, or ENDCAP
Specifies a subtype for a macro type. If value1 is ENDCAP, you must specify this argument. Otherwise, specify NULL to ignore this argument.
If Value1 equals: |
Then Value2 is: |
Optional and can be BUMP. |
|
Optional and can be BLACKBOX or SOFT. |
|
Optional and can be INPUT, OUTPUT, INOUT, POWER, SPACER, or AREAIO. |
|
Optional and can be FEEDTHRU, TIEHIGH, TIELOW, SPACER, ANTENNACELL, or WELLTAP. |
|
Required and can be PRE, POST, TOPLEFT, TOPRIGHT, BOTTOMLEFT, or BOTTOMRIGHT. |
Writes an EEQ statement. The EEQ statement is optional and can be used only once in a MACRO section.
Specifies that the macro being defined should be electrically equivalent to the previously defined macroName.
Writes a FOREIGN statement. The FOREIGN statement is optional and can be used more than once in a MACRO section.
Specifies which foreign (GDSII) system name to use when placing an instance of this macro.
xl yl
Optional arguments that specify the macro origin (lower left corner when the macro is in north orientation) offset from the foreign origin. Specify 0 to ignore these arguments.
Optional argument that specifies the orientation of the foreign cell when the macro is in north orientation. Specify -1 to ignore this argument.
Value: 0 to 7. For more information, see "Orientation Codes".
Also writes a FOREIGN statement. This routine is the same as the lefwMacroForeign routine with the exception of the orient argument, which takes a string instead of an integer. The FOREIGN statement is optional and can be used more than once in a MACRO section.
Specifies which foreign (GDSII) system name to use when placing an instance of this macro.
xl yl
Optional arguments that specify the macro origin (lower left corner when the macro is in north orientation) offset from the foreign origin. Specify 0 to ignore these arguments.
Optional argument that specifies the orientation of the foreign cell when the macro is in north orientation. Specify "" to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
Writes an ORIGIN statement. The ORIGIN statement is optional and can be used only once in a MACRO section.
xl, yl
Specifies the origin of the macro. xl, yl is the lower left corner point of the macro. The coordinates for macro sites, ports, and obstructions are specified with respect to the macro origin. The origin itself is specified with respect to the lower left corner of the bounding box of the sites of the macro.
Writes a SITE statement. The SITE statement is optional and can be used more than once in a MACRO section.
Specifies the site associated with the macro.
Writes a SITE statement that includes a site pattern. The site pattern indicates that the cell is a gate-array cell rather that a row-based standard cell. The SITE statement is optional and can be used more than once in a MACRO section.
Specifies the site associated with the macor.
origX origY
Optional arguments that specify the origin of the site inside the macro. Specify 0 to ignore these arguments.
Optional argument that specifies the orientation of the site at that location. Specify -1 to ignore this argument.
Value: 0 to 7. For more information, see "Orientation Codes".
numX numY
Optional arguments that specify the number of sites to add in the x and y directions. Specify 0 to ignore these arguments.
spaceX spaceY
Optional arguments that specify the spacing between sites in the x and y directions. Specify 0 to ignore these arguments.
Also writes a SITE statement that includes a site pattern. This routine is the same as the lefwMacroSitePattern routine with the exception of the orient argument, which takes a string instead of an integer. The SITE statement is optional and can be used more than once in a MACRO section.
Specifies the site associated with the macor.
origX origY
Optional arguments that specify the origin of the site inside the macro. Specify 0 to ignore these arguments.
Optional argument that specifies the orientation of the site at that location. Specify "" to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
numX numY
Optional arguments that specify the number of sites to add in the x and y directions. Specify 0 to ignore these arguments.
spaceX spaceY
Optional arguments that specify the spacing between sites in the x and y directions. Specify 0 to ignore these arguments.
Writes a SIZE statement. The SIZE statement is required and can be used only once in a MACRO section.
width, height
Specify the minimum bounding rectangle, in microns, for the macro. The bounding rectangle should be a multiple of the placement grid.
Writes a SYMMETRY statement. The SYMMETRY statement is optional and can be used only once in a MACRO section.
Specifies the allowable orientations for the macro.
Value: X, Y, or R90
Starts a DENSITY statement in the MACRO statement.The DENSITY statement is optional and can be used only once in a MACRO statement.
Each DENSITY statement must start with this routine and end with the lefwEndMacroDensity routine. Each DENSITY statement also must include at least one lefwMacroDensityLayerRect routine.
Specifies the layer on which to create the density rectangles.
Writes a RECT statement in the DENSITY statement. The RECT statement is required and can be used more than once in a DENSITY statement.
x1 y1 x2 y2
Specifies the coordinates of a rectangle.
Specifies the percentage density of the rectangle.
Value: 0 to 100
Ends the DENSITY statement.
The following example shows a callback routine with the type lefwMacroCbkType. This example shows function calls to create a macro. It does not include function calls to create a macro obstruction. For an example of how to create a macro obstruction, see the Macro Obstruction section. This example only shows the usage of some functions related to Macro.
Macro obstruction routines write an OBS (macro obstruction) section, which further defines a macro. An OBS section is optional and can be used more than once in a MACRO section. For syntax information about the LEF OBS section, see "Macro Obstruction Statement" in the
LEF/DEF Language Reference.
You must use the lefwStartMacroObs and lefwEndMacroObs routines to start and end the OBS section. The remaining macro obstruction routines described in this section must be included between these routines.
For examples of the routines described here, see "Macro Obstruction Examples".
All routines return 0 if successful.
Starts the OBS section in a MACRO section. This routine is required for each OBS section, and can be used more than once in a MACRO section.
Ends the OBS section.
Writes a DESIGNRULEWIDTH statement. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined within an OBS section and can be used more than once.
Specifies the layer on which the geometry lies.
Optional argument that specifies the effective design rule width. If specified, the obstruction is treated as a shape of this width for all spacing checks. Specify 0 to ignore this argument.
Writes a LAYER statement. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined within an OBS section and can be used more than once.
Specifies the layer on which to place the obstruction.
Optional argument that specifies the minimum spacing allowed between this obstruction and any other shape. Specify 0 to ignore this argument.
Writes a PATH statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement and can be used more than once.
Specifies the number of paths to create.
Creates a path between the specified points. The path automatically extends the length by half of the current width on both end points to form a rectangle. (A previous WIDTH statement is required.) The line between each pair of points must be parallel to the x or y axis (45-degree angles are not allowed).
numX numY spaceX spaceY
Optional arguments that specify the PATH ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a POLYGON statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement and can be used more than once.
Specifies the number of polygon sides.
x1 y1
Specifies a sequence of points to generate a polygon geometry. Every polygon edge must be parallel to the x or y axis, or at a 45-degree angle.
numX numY spaceX spaceY
Optional arguments that specify the POLYGON ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a RECT statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement and can be used more than once.
xl1 yl1 xl2 yl2
Specifies a rectangle in the current layer, where the points specified are opposite corners of the rectangle.
numX numY spaceX spaceY
Optional arguments that specify the RECT ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a WIDTH statement. The WIDTH statement is optional and can be used only once in an LAYER section.
Specifies the width that the PATH statements use.
Writes a VIA statement. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined within an OBS section and can be used more than once.
x1 y1
Specify the location to place the via.
Specifies the name of the via to place.
numX numY spaceX spaceY
Optional arguments that specify the VIA ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Macro Pin routines write a PIN section, which further defines a macro. A PIN section is optional in each MACRO section and can be defined more than once in a MACRO section. For syntax information about the LEF PIN section, see "Macro Pin Statement" in the LEF/DEF Language Reference.
You must use the lefwStartMacroPin and lefwEndMacroPin routines to start and end the PIN section. The remaining macro pin routines must be included between these routines.
For examples of the routines described here, see "Macro Pin Examples".
In addition to the routines described in this section, you can include a PORT section within a PIN section. For more information about these routines, see "Macro Pin Port".
All routines return 0 if successful.
Starts the PIN section in a MACRO section. This routine is required for each PIN section and can be used more than once in a MACRO section.
Specifies the name of the library pin.
Ends the PIN section for the specified pin.
Specifies the name of the library pin.
Writes an ANTENNADIFFAREA statement. The ANTENNADIFFAREA statement is optional and can be used more than once in a PIN section.
Specifies the diffusion area, in micron-squared units, to which the pin is connected on a layer.
Optional argument that specifies the layer. If you do not specify a layer name, value applies to all layers. Specify NULL to ignore this argument.
Writes an ANTENNAGATEAREA statement. The ANTENNAGATEAREA statement is optional and can be used once after each lefwMacroPinAntennaModel routine in a PIN section.
Specifies the gate area, in micron-squared units, to which the pin is connected on a layer.
Optional argument that specifies the layer. If you do not specify a layer name, value applies to all layers. Specify NULL to ignore this argument.
Writes an ANTENNAMAXAREACAR statement. The ANTENNAMAXAREACAR statement is optional and can be used once after each lefwMacroPinAntennaModel routine in a PIN section.
For hierarchical process antenna effect calculation, specifies the maximum cumulative antenna ratio value on the specified layerName, using the cut area below the current pin layer.
Specifies the layer.
Writes an ANTENNAMAXCUTCAR statement. The ANTENNAMAXCUTCAR statement is optional and can be used once after each lefwMacroPinAntennaModel routine in a PIN section.
For hierarchical process antenna effect calculation, specifies the maximum cumulative antenna ratio value on the specified layerName, using the cut area below the current pin layer.
Specifies the layer.
Writes an ANTENNAMAXSIDEAREACAR statement. The ANTENNAMAXSIDEAREACAR statement is optional and can be used once after each lefwMacroPinAntennaModel routine in a PIN section.
For hierarchical process antenna effect calculation, specifies the maximum cumulative antenna ratio value on the specified layerName, using the metal side wall area below the current pin layer.
Specifies the layer.
Writes an ANTENNAMODEL statement. The ANTENNAMODEL statement is optional and can be used more than once in a PIN section.
Specifies the oxide model for the pin. Each model can be specified once per layer. If you specify an ANTENNAMODEL statement, that value affects all ANTENNAGATEAREA and ANTENNA*CAR statements for the pin that follow it until you specify another ANTENNAMODEL statement.
Value: OXIDE1, OXIDE2, OXIDE3, or OXIDE4
Note: OXIDE1 and OXIDE2 are currently supported. If you specify OXIDE3 or OXIDE4, current tools parse and ignore them.
Writes an ANTENNAPARTIALCUTAREA statement. The ANTENNAPARTIALCUTAREA statement is optional and can be used more than once in a PIN section.
Specifies the partial cut area, which is above the current pin layer and inside, or outside, the macro on a layer.
Optional argument that specifies the layer. If you specify a layer name, value applies to antennas on that layer only. If you do not specify a layer name, value applies to all layers. Specify NULL to ignore this argument.
Writes an ANTENNAPARTIALMETALAREA statement. The ANTENNAPARTIALMETALAREA statement is optional and can be used more than once in a PIN section.
Specifies the partial metal area, which is connected directly to the I/O pin and the inside, or outside, of the macro on a layer.
Optional argument that specifies the layer. If you do not specify a layer name, value applies to all layers. Specify NULL to ignore this argument.
Writes an ANTENNAPARTIALMETALSIDEAREA statement. The ANTENNAPARTIALMETALSIDEAREA statement is optional and can be used more than once in a PIN section.
Specifies the partial metal side wall area, which is connected directly to the I/O pin and inside, or outside, of the macro on a layer.
Optional argument that specifies the layer. If you do not specify a layer name, value applies to all layers. Specify NULL to ignore this argument.
Writes a DIRECTION statement. The DIRECTION statement is optional and can be used only once in a PIN section.
Specifies the pin type.
Value: INPUT, OUTPUT, OUTPUT TRISTATE, INOUT, or FEEDTHRU
Writes a GROUNDSENSITIVITY statement. The GROUNDSENSITIVITY statement is optional and can be used only once in a PIN section.
Specifies that if this pin is connected to a tie-low connection (such as 1'b0 in Verilog), it should connect to the same net to which pinName is connected.
Writes a MUSTJOIN statement. The MUSTJOIN statement is optional and can be used only once in a PIN section.
Specifies the name of another pin in the cell that must be connected with the pin being defined.
Wries a NETEXPR statement in a PIN section. The NETEXPR statement is optional and can be used only once in a PIN section.
Specifies a net expression property name (such as power1 or power2). If name matches a net expression property in the netlist (such as in Verilog, VHDL, or OpenAccess), then the property is evaluated, and the software identifies a net to which to connect this pin.
Writes a SHAPE statement. The SHAPE statement is optional and can be used only once in a PIN section.
Specifies a pin with special connection requirements because of its shape.
Value: ABUTMENT, RING, or FEEDTHRU
Writes a SUPPLYSENSITIVITY statement. The SUPPLYSENSITIVITY statement is optional and can be used only once in a PIN section.
Specifies that if this pin is connected to a tie-high connection (such as 1'b1 in Verilog), it should connect to the same net to which pinName is connected.
Writes a TAPERRULE statement. The TAPERRULE statement is optional and can be used only once in a PIN section.
Specifies the nondefault rule to use when tapering wires to the pin.
Writes a USE statement. The USE statement is optional and can be used only once in a PIN section.
Specifies how the pin is used.
Value: SIGNAL, ANALOG, POWER, GROUND, or CLOCK
Macro Pin Port routines write a PORT section, which further defines a macro pin. The PORT section is required for each PIN section and can be used more than once in a PIN section. For syntax information about the LEF PIN section, see "Macro Pin Statemen"t in the LEF/DEF Language Reference.
You must use the lefwStartMacroPinPort and lefwEndMacroPinPort routines to start and end the PORT section. The lefwStartMacroPinPort routine must be called after the lefwStartMacroPin routine.The remaining port routines must be included between these routines.
For examples of the routines described here, see "Macro Pin Port Examples".
All routines return 0 if successful.
Starts the PORT section.
Optional argument that specifies whether or not the port is a core port.
Value: NONE or CORE.
Ends the PORT section.
Writes a DESIGNRULEWIDTH statement. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined in a PORT section and can be used more than once.
Specifies the layer on which to place the geometry.
Optional argument that specifies the effective design rule width. If specified, the router uses the spacing defined in the layer section that corresponds to width. Specify 0 to ignore this argument.
Writes a LAYER statement in the PORT section. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined in a PORT section and can be used more than once.
Specifies the layer on which to place the geometry.
Optional argument that specifies the minimum spacing allowed between this geometry and any other shape. Specify 0 to ignore this argument.
Writes a PATH statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement.
Specifies the number of paths to create.
Create a path between the specified points. The path automatically extends the length by half of the current width on both end points to form a rectangle. (A previous WIDTH statement is required.) The line between each pair of points must be parallel to the x or y axis (45-degree angles are not allowed).
numX numY spaceX spaceY
Optional arguments that specify the PATH ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a POLYGON statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement.
Specifies the number of polygon sides.
x1 y1
Specifies a sequence of points to generate a polygon geometry. Each polygon edge must be parallel to the x or y axis, or at a 45-degree angle.
numX numY spaceX spaceY
Optional arguments that specify the POLYGON ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a RECT statement. Either a PATH, POLYGON, or RECT statement must follow a LAYER statement.
xl1 yl1 xl2 yl2
Specifies a rectangle in the current layer, where the points specified are opposite corners of the rectangle.
numX numY spaceX spaceY
Optional arguments that specify the RECT ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
Writes a WIDTH statement. The WIDTH statement is optional and can be used only once in a PORT section.
Specifies the width that the PATH statements use.
Writes a VIA statement. Either a LAYER statement, a DESIGNRULEWIDTH statement, or a VIA statement must be defined in a PORT section and can be used more than once.
x1 y1
Specify the location to place the via.
Specifies the name of the via to place.
numX numY spaceX spaceY
Optional arguments that specify the VIA ITERATE statement. numX and numy specify the number of columns and rows of points that make up the array. spaceX and spaceY specify the spacing, in distance units, between the columns and rows. Specify 0 to ignore these arguments.
The Manufacturing Grid routine writes a LEF MANUFACTURINGGRID statement. The MANUFACTURINGGRID statement is optional and can be used only once in a LEF file. For syntax information about the MANUFACTURINGGRID statement, see "Manufacturing Grid" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a MANUFACTURINGGRID statement.
Specifies the value for the manufacturing grid. You must specify a positive number for a value.
The Maximum Stack Via routine writes a LEF MAXVIASTACK statement. The MAXVIASTACK statement is optional and can be used only once in a LEF file. For syntax information about the MAXVIASTACK statement, see "Maximum Via Stack" in the LEF/DEF Language Reference.
|
|
The lefwMaxviastack routine must be used only after all layer routines are used. |
This routine returns 0 if successful.
Writes a MAXVIASTACK statement.
Specifies the maximum allowed number of single-stacked vias.
Optional argument that specifies the bottom layer in a range of layers for which the maximum stacked via rule applies. Specify NULL to ignore this argument.
Optional argument that specifies the top layer in a range of layers for which the maximum stacked via rule applies. Specify NULL to ignore this argument.
Nondefault Rule routines write a LEF NONDEFAULTRULE statement. The NONDEFAULTRULE statement is optional and can be used only once in a LEF file. For syntax information about the LEF NONDEFAULTRULE statement, see "Nondefault Rule" in the LEF/DEF Language Reference.
You must use the lefwStartNondefaultRules and lefwEndNondefaultRules routines to start and end the NONDEFAULTRULE section. The lefwNonDefaultRuleLayer routine must be included between these routines.
For examples of the routines described here, see "Nondefault Rules Example".
In addition to the routines described in this section, you can include a PROPERTY statement and a VIA statement within a NONDEFAULTRULE section. For more information about these routines, see "Property" , or "Via".
All routines return 0 if successful.
Starts the NONDEFAULTRULE statement.
Specifies the name of the nondefault rule to define.
Ends the NONDEFAULTRULE statement for the specified ruleName.
Writes a HARDSPACING statement. The HARDSPACING statement specifies that any spacing values that exceed the LEF LAYER spacing requirements are "hard" rules instead of "soft" rules. By default, routers treat extra spacing requirements as soft rules that are high cost to violate, but not real spacing violations. The HARDSPACING statement is optional and can be used only once in a NONDEFAULTRULE statement.
Writes a LAYER statement in the NONDEFAULTRULE statement. The LAYER statement is required and can be used more than once in a NONDEFAULTRULE statement.
Specifies the layer for the various width and spacing values. This layer must be a routing layer.
Optional argument that specifies the recommended minimum spacing for layerName for routes using this NONDEFAULTRULE to other geometries.
Specifies the required minimum width for layerName.
Optional argument that specifies the distance by which wires are extended at vias.The value must be greater than or equal to half of the routing width for the layer, as defined in the nondefault rule. Specify 0 to ignore this argument.
This argument is obsolete. Specify 0 to ignore this argument.
This argument is obsolete. Specify 0 to ignore this argument.
This argument is obsolete. Specify 0 to ignore this argument.
Wries a MINCUTS statement in the NONDEFAULTRULE statement. The MINCUTS statement is optional and can be used more than once in a NONDEFAULTRULE statement.
Specifies the cut layer.
Specifies the minimum number of cuts allowed for any via using layerName.
Starts a VIA statement in the NONDEFAULTRULE statement. The VIA statement is optional and can be used more than once in a NONDEFAULTRULE statement.
Each VIA statement must start and end with the lefwNonDefaultRuleStartVia and lefwNonDefaultRuleEndVia routines. The following routines can be included within a VIA statement:
|
lefwViaViarule (and its related routines) |
Specifies the name for the via.
Identifies the via as the default via between the specified layers.
Ends the VIA statement for the specified viaName. Each VIA statement must start and end with the lefwNonDefaultRuleStartVia and lefwNonDefaultRuleEndVia routines.
Writes a USEVIA statement in a NONDEFAULTRULE statement. The USEVIA statement is optional and can be used more than once in a NONDEFAULTRULE statement.
Specifies a previously defined via from the LEF VIA statement, or a previously defined NONDEFAULTRULE via to use with this routing rule.
Wrties a USEVIARULE statement in the NONDEFAULTRULE statement. The USEVIARULE statement is optional and can be used more than once in a NONDEFAULTRULE statement.
Specifies a previously defined VIARULE GENERATE rule to use with this routing rule. You cannot specify a rule from a VIARULE without a GENERATE keyword.
The following example shows a callback routine with the type lefwNonDefaultCbkType. This example does not include information on how to create a via within the nondefault rule. For an example of how to create a via, see the Via section.
The Property routines write a LEF PROPERTY statement in a VIA, VIARULE, LAYER, MACRO, or NONDEFAULTRULE section. The PROPERTY statement is optional and can be used more than once in these sections.
For examples of the routines described here, see "Property Example".
All routines return 0 if successful.
Writes a PROPERTY statement that defines a named property with an integer value. The PROPERTY statement is optional and can be used more than once in a LEF file.
Specifies the name of the property.
Specifies an integer value.
Writes a PROPERTY statement that defines a named property with a real number value. The PROPERTY statement is optional and can be used more than once in a LEF file.
Specifies the name of the property.
Specifies a real value.
Writes a PROPERTY statement that defines a named property with a string value. The PROPERTY statement is optional and can be used more than once in a LEF file.
Specifies the name of the property.
Specifies a string value.
Property Definitions routines write a LEF PROPERTYDEFINTIONS statement. The PROPERTYDEFINTIONS statement is optional and can be used only once in a LEF file. For syntax information about the LEF PROPERTYDEFINTIONS statement, see "Property Definitions" in the LEF/DEF Language Reference.
You must use the lefwStartPropDef and lefwEndPropDef routines to start and end the PROPERTYDEFINTIONS statement. The lefwPropDef routine must be included between these routines.
For examples of the routines described here, see "Property Definitions Examples".
All routines return 0 if successful.
Starts the PROPERTYDEFINTIONS statement.
Ends the PROPERTYDEFINTIONS statement.
Writes an integer property definition in the PROPERTYDEFINITIONS statement. The lefwIntProperty routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
leftRange rightRange
Optional arguments that limit integer property values to a specified range. Specify 0 to ignore these arguments.
Specifies the object type for which you are defining properties.
Value: LIBRARY, LAYER, VIA, VIARULE, NONDEFAULTRULE, MACRO, or PIN
Specifies a unique property name for the object type.
Optional argument that specifies an integer value for an object type. Specify NULL to ignore this argument.
Writes a real property definition in the PROPERTYDEFINITIONS statement. The lefwRealPropDef routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
leftRange rightRange
Optional arguments that limit real property values to a specified range. Specify 0 to ignore these arguments.
Specifies the object type for which you are defining properties.
Value: LIBRARY, LAYER, VIA, VIARULE, NONDEFAULTRULE, MACRO, or PIN
Specifies a unique property name for the object type.
Optional argument that specifies a real value for an object type. Specify NULL to ignore this argument.
Writes a string property definition in the PROPERTYDEFINITIONS statement. The lefwStringPropDef routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
leftRange rightRange
Optional arguments that limit property values to a specified range. Specify 0 to ignore these arguments.
Specifies the object type for which you are defining properties.
Value: LIBRARY, LAYER, VIA, VIARULE, NONDEFAULTRULE, MACRO, or PIN
Specifies a unique property name for the object type.
Optional argument that specifies a string value for an object type. Specify NULL to ignore this argument.
The following example shows a callback routine with the type lefwPropDefCbkType. This example does not show all of the combinations of Property Definitions defined.
Same-Net Spacing routines write a LEF SPACING statement. The SPACING statement is optional and can be used only once in a LEF file. For syntax information about the LEF SPACING statement, see "Same-Net Spacing" in the LEF/DEF Language Reference.
You must use the lefwStartSpacing and lefwEndSpacing routines to start and end the SPACING statement. The lefwSpacing routine must be included between these routines.
For examples of the routines described here, see "Same-Net Spacing Examples".
All routines return 0 if successful.
Writes the SPACING statement.
Ends the SPACING statement.
Writes the SAMENET statement. The SAMENET statement is required and can be used more than once.
layerName1, layerName2
Specify the names of the layers for which the same-net spacing rule applies. You can specify spacing rules for routing layers and cut layers. For a routing layer, the same-net spacing rule is defined by specifying the same layer name twice.
Specifies the minimum spacing.
Optional argument that allows stacked vias at a routing layer. Specify NULL to ignore this argument.
The following example shows a callback routine with the type lefwSpacingCbkType.
The Site routines write a LEF SITE statement. The SITE statement is optional and can be used more than once in a LEF file. For syntax information about the LEF SITE statement, see "Site" in the LEF/DEF Language Reference.
Each SITE statement must be defined with a lefwSite and lefwEndSite routine.
All routines return 0 if successful.
Writes a SITE statement.
Specifies whether the site is a core site or an I/O pad site.
Value: PAD or CORE.
Specifies the name of the placement site.
Specifies how the site is symmetrical in normal orientation.
Value: Specify one of the following:
width, height
Specify the dimensions of the site in normal (or north) orientation, in microns.
Ends a SITE statement.
Specifies the name of the placement site.
Writes a ROWPATTERN statement in the SITE statement. The ROWPATTERN statement is optional and can be used more than once in a SITE statement.
Specifies the name of a previously defined site.
Specifies the orientation for the previously defined site.
Value: 0 to 7. For more information, see "Orientation Codes".
Also writes a ROWPATTERN statement. This routine is the same as the lefwSiteRowPattern routine, with the exception of the orient argument, which takes a string instead of an integer. The ROWPATTERN statement is optional and can be used more than once in a SITE statement.
Specifies the name of a previously defined site.
Specifies the orientation for the previously defined site.
Value: N, W, S, E, FN, FW, FS, or FE.
The following example shows a callback routine with the type lefwSiteCbkType.
Units routines write a LEF UNITS statement. The UNITS statement is optional and can be used only once in a LEF file. For syntax information about the LEF UNITS statement, see "Units" in the LEF/DEF Language Reference.
You must use the lefwStartUnits and lefwEndSpacing routines to start and end the UNITS statement. The lefwUnits routine must be included between these routines.
For examples of the routines described here, see "Units Examples".
All routines return 0 if successful.
Starts the UNITS statement.
Ends the UNITS statement.
Writes a UNITS statement. The UNITS statement is required whenever the lefwStartSpacing routine is specified.
Optional argument that specifies a TIME NANOSECONDS statement. This interprets one LEF time unit as one nanosecond. Specify 0 to ignore this argument.
Optional argument that specifies a CAPACITANCE PICOFARADS statement. This interprets one LEF capacitance unit as one picofarad. Specify 0 to ignore this argument.
Optional argument that specifies a RESISTANCE OHMS statement. This interprets one LEF resistance unit as one ohm. Specify 0 to ignore this argument.
Optional argument that specifies a POWER MILLIWATTS statement. This interprets one LEF power unit as one milliwatt. Specify 0 to ignore this argument.
Optional argument that specifies a CURRENT MILLIAMPS statement. This interprets one LEF current unit as one milliamp. Specify 0 to ignore this argument.
Optional argument that specifies a VOLTAGE VOLTS statement. This interprets one LEF voltage unit as one volt. Specify 0 to ignore this argument.
Optional argument that specifies a DATABASE MICRONS statement. This interprets one LEF distance unit as multiplied when converted into database units. Specify 0 to ignore this argument.
Writes a FREQUENCY statement in the UNITS statement. The FREQUENCY statement is optional and can be used only once in a UNITS statement.
Specifies a FREQUENCY MEGAHERTZ statement. This interprets one LEF frequency unit as one megahertz.
The following example shows a callback routine with the type lefwUnitsCbkType.
The Use Min Spacing routine writes a LEF USEMINSPACING statement, which defines how minimum spacing is calculated for obstruction geometries. The USEMINSPACING statement is optional and can be used more than once in a LEF file.
For syntax information about the LEF USEMINSPACING statement, see "Use Min Spacing" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a USEMINSPACING statement.
Specifies that the minimum spacing applies to obstruction geometries.
Value: OBS
Specifies how to calculate the minimum spacing.
Value: Specify one of the following:
Spacing is computed as if the MACRO OBS shapes were min-width wires. Some LEF models abstract many min-width wires as a single large OBS shape; therefore using wide wire spacing would be too conservative. |
||
Spacing is computed to MACRO OBS shapes as if they were actual routing shapes. A wide OBS shape would use wide wire spacing rules, and a thin OBS shapes would use thin wire spacing rules. |
The version routine writes a LEF VERSION statement. For syntax information about the LEF VERSION statement, see "Version" in the LEF/DEF Language Reference.
The VERSION statement is part of the LEF file header (which also includes the BUSBITCHARS, and DIVIDERCHAR statements). If the statements in the header section are not defined, many applications assume default values for them. However, the default values are not formally part of the language definition; therefore you cannot be sure that the same assumptions are used in all applications. You should always explicitly define these values.
This routine returns 0 if successful.
Writes a VERSION statement. The VERSION statement can be used only once in a LEF file.
vers1, vers2
Specify which version of the LEF syntax is being used. vers1 is the major value. vers2 is the minor value.
The following example shows a callback routine with the type lefwVersionCbkType.
Via routines write a LEF VIA section. A VIA section is optional and can be used more than once in a LEF file. For syntax information about the LEF VIA section, see "Via" in the LEF/DEF Language Reference.
Each VIA section must start and end with the lefwStartVia and lefwEndVia routines. The remaining via routines must be included between these routines.
In addition to the routines described in this section, you can include a PROPERTY statement within a VIA section. For more information about these routines, see "Property".
For examples of the routines described here, see "Via Examples".
All routines return 0 if successful.
Starts a VIA section.
Specifies the name for the via.
Optional argument that identifies the via as the default via between the specified layers.
Ends the VIA section for the specified viaName value.
Writes a LAYER statement for a via. Either a LAYER or a VIARULE statement is required in a VIA section. A LAYER statement can be used more than once for a via.
If you specify this routine, you must also specify one of the following routines:
You can also optionally specify the following routine:
Specifies the layer on which to create the rectangles that make up the via. Normal vias have exactly three layers used: a cut layer and two layers that touch the cut layer (routing or masterslice).
Writes a POLYGON statement for a via. Either a POLYGON or RECT statement is required if a LAYER statement is specified in a VIA section, and can be used more than once.
Specifies the number of polygon sides.
xl yl
Specifies a sequence of points to generate a polygon geometry. The polygon edges must be parallel to the x axis, the y axis, or at a 45-degree angle. The polygon is generated by connecting each successive point, then connecting the first and last points.
Writes a RECT statement. Either a POLYGON or RECT statement is required if a LAYER statement is specified in a VIA section, and can be used more than once.
x1l, y1l, x2l, y2l
Specify the points that make up the via.
Writes a RESISTANCE statement. The RESISTANCE statement is optional and can be used only once with a LAYER statement in a VIA section.
Specifies the total resistance of the via, in units of ohms, given as the resistance per via. Note that this is not a resistance per via-cut value; it is the total resistance of the via.
Writes a VIARULE statement for the via. Either a LAYER or a VIARULE statement is required in a VIA section. A VIARULE statement can be used only once in a VIA section.
If you specify this routine, you can optionally specify the following routines:
Specifies the name of the LEF VIARULE that produced this via. This name must refer to a previouslydefined VIARULE GENERATE rule name. This indicates that the via is the result of automatic via generation, and that the via name is only used locally inside this LEF file.
xCutSize yCutSize
Specifies the required width (xSize) and height (ySize) of the cut layer rectangles.
botMetalLayer cutLayer topMetalLayer
Specifies the required names of the bottom routing layer, cut layer, and top routing layer. These layers must be previously defined in layer definitions, and must match the layer names defined in the specified LEF viaRuleName.
xCutSpacing yCutSpacing
Specifies the required x and y spacing between cuts. The spacing is measured between one cut edge and the next cut edge.
xBotEnc yBotEnc xTopEnc yTopEnc
Specifies the required x and y enclosure values for the bottom and top metal layers. The enclosure measures the distance from the cut array edge to the metal edge that encloses the cut array.
Writes an OFFSET statement for the via. The OFFSET statement is optional with a VIARULE statement and can be used only once in a VIA section.
xBotOffset yBotOffset xTopOffset yTopOffset
Specifies the x and y offset for the bottom and top metal layers. By default, the 0,0 origin of the via is the center of the cut array and the enclosing metal rectangles. These values allow each metal layer to be offset independently.
After the non-shifted via is computed, the metal layer rectangles are offset by adding the appropriate values--the x/y BotOffset values to the metal layer below the cut layer, and the x/ y TopOffset values to the metal layer above the cut layer. These offsets are in addition to any offset caused by the ORIGIN values.
Writes an ORIGIN statement for the via. The ORIGIN statement is optional with a VIARULE statement and can be used only once in a VIA section.
xOffset yOffset
Specifies the x and y offset for all of the via shapes. By default, the 0,0 origin of the via is the center of the cut array and the enclosing metal rectangles. After the non-shifted via is computed, all cut and metal rectangles are offset by adding these values.
Writes a PATTERN statement for the via. The PATTERN statement is optional with a VIARULE statement and can be used only once in a VIA section.
Specifies the cut pattern encoded as an ASCII string. This parameter is only required when some of the cuts are missing from the array of cuts, and defaults to "all cuts are present," if not specified.
Writes a ROWCOL statement for the via. The ROWCOL statement is optional with a VIARULE statement and can be used only once in a VIA section.
numCutRows numCutCols
Specifies the number of cut rows and columns that make up the via array.
The following example shows a callback routine with the type lefwViaCbkType.
Via Rule routines write a LEF VIARULE statement. A VIARULE or a VIARULE GENERATE statement is required in a LEF file. You can create more than one VIARULE statement in a LEF file. For syntax information about the LEF VIARULE statement, see "Via Rule" in the
LEF/DEF Language Reference.
You must use the lefwStartViaRule and lefwEndViaRule routines to start and end the VIARULE statement. The lefwViaRuleLayer and lefwViaRuleVia routines must be included between these routines.
For examples of the routines described here, see "Via Rule Examples".
In addition to the routines described in this section, you can include a PROPERTY statement within a VIARULE statement. For more information about these routines, see "Property".
All routines return 0 if successful.
Starts a VIARULE statement.
Specifies the name to identify the via rule.
Ends the VIARULE statement for the specified viaRuleName value.
Writes a LAYER statement. The LAYER statement is required and must be used exactly twice in a VIARULE statement.
Specifies the top or bottom routing layer of the via.
Specifies the wire direction. If you specify a width range, the rule applies to wires of the specified direction that fall within the range. Otherwise, the rule applies to all wires on the layer of the specified direction.
Value: HORIZONTAL or VERTICAL
minWidth maxWidth
Optional arguments that specify a wire width range within which the wire must fall in order for the rule to apply. That is, the wire width must be greater than or equal to minWidth and less than or equal to maxWidth. Specify 0 to ignore these arguments.
This argument is obsolete. Specify 0 to ignore this argument.
This argument is obsolete. Specify 0 to ignore this argument.
Writes a VIA statement. The VIA statement is required and can be used more than once after both lefwViaRuleLayer routines are used.
Specifies a previously defined via to test for the current via rule. The first via in the list that can be placed at the location without design rule violations is selected. The vias must all have exactly three layers in them. The three layers must include the same routing layers as listed in the LAYER statements of the VIARULE, and a cut layer that is between the two routing layers.
The following example shows a callback routine with the type lefwViaRuleCbkType.
The Via Rule Generate routines write a LEF VIARULE GENERATE statement. A VIARULE GENERATE or a VIARULE statement is required in a LEF file. You can create more than one VIARULE GENERATE statement in a LEF file. For syntax information the LEF VIARULE GENERATE statement, see "Via Rule Generate" in the LEF/DEF Language Reference.
You must use the lefwStartViaRuleGen and lefwEndViaRuleGen routines to start and end the VIARULE GENERATE statement. All other routines must be included between these routines.
All routines return 0 if successful.
Starts a VIARULE GENERATE statement.
Specifies the name for the via rule (formula).
Ends the VIARULE GENERATE statement for the specified viaRuleName value.
Writes a DEFAULT statement for the via.The DEFAULT statement specifies that the via rule can be used to generate vias for the default routing rule, and to supplement any DEFAULT fixed vias that might be predefined in the LEF VIA statement, as the router needs them. The DEFAULT statement is optional and can be used only once for a VIARULE GENERATE statement.
Writes a routing LAYER statement. Either the routing LAYER statement or the ENCLOSURE statement is required and must be used exactly twice in a VIARULE GENERATE statement.
Specifies the routing layer for the top or bottom of the via.
Specifies the wire direction. If you specify a width range, the rule applies to wires of the specified direction that fall within the range. Otherwise, the rule applies to all wires on the layer of the specified direction.
Value: HORIZONTAL or VERTICAL
minWidth maxWidth
Optional arguments that specify a wire width range within which the wire must fall in order for the rule to apply. That is, the wire width must be greater than or equal to minWidth and less than or equal to maxWidth. Specify 0 to ignore these arguments.
This argument is obsolete. Specify 0 to ignore this argument.
This argument is obsolete. Specify 0 to ignore this argument.
Writes a cut LAYER statement. The cut LAYER statement is required and can be used only once after either both lefwViaRuleGenLayer, or both lefwViaRuleGenLayerEnclosure routines are used.
Specifies the cut layer for the generated via.
Specifies the location of the lower left contact cut rectangle.
Defines center-to-center spacing in the x and y dimensions to create an array of contact cuts.The number of cuts of an array in each direction is the most that can fit within the bounds of the intersection formed by the two special wires. Cuts are only generated where they do not violate stacked or adjacent via design rules.
Optional argument that specifies the resistance of the cut layer, given as the resistance per contact cut. Specify 0 to ignore this argument.
Writes an ENCLOSURE statement. Either the ENCLOSURE statement or the routing LAYER statement is required and must be used exactly twice in a VIARULE GENERATE statement.
Specifies the routing layer for the top or bottom of the via.
overhang1 overhang2
Specifies that the via must be covered by metal on two opposite sides by at least overhang1, and on the other two sides by at least overhang2. The via generation code then chooses the direction of overhang that best maximizes the number of cuts that can fit in the via.
minWidth maxWidth
Optional arguments that specify a wire width range within which the wire must fall in order for the rule to apply. That is, the wire width must be greater than or equal to minWidth and less than or equal to maxWidth. Specify 0 to ignore this argument.
The following example shows a callback routine with the type lefwViaRuleCbkType with Generate.