You can use the Cadence® Design Exchange Format (DEF) writer routines to create a program that outputs a DEF file. The DEF writer routines correspond to the sections of the DEF file. This chapter describes the routines listed below that you need to write a particular DEF section.
BLOCKAGES statement |
|
BUSBITCHARS statement |
|
COMPONENTS statement |
|
DESIGN statement |
|
DIEAREA statement |
|
DIVIDERCHAR statement |
|
EXTENSIONS statement |
|
FILLS statement |
|
GCELLGRID statement |
|
GROUPS statement |
|
HISTORY statement |
|
NETS statement |
|
Regular Wiring |
regularWiring statement in a NETS statement |
Subnet |
SUBNET statement in a NETS statement |
NONDEFAULTRULES statement |
|
PINS statement |
|
PINPROPERTIES statement |
|
PROPERTYDEFINITIONS statement |
|
PROPERTY statements |
|
REGIONS statement |
|
ROW statement |
|
SPECIALNETS statement |
|
Special Wiring |
specialWiring statement in a SPECIALNETS statement |
Shielded Routing |
shielded routing statement in a SPECIALNETS statement |
SCANCHAINS statement |
|
SLOTS statement |
|
STYLES statement |
|
TECHNOLOGY statement |
|
TRACKS statement |
|
UNITS statement |
|
VERSION statement |
|
VIAS statement |
The DEF writer setup and control routines initialize the reader and set global variables that are used by the DEF file. You must begin a DEF file with either the defwInit routine or the defwInitCbk routine. You must end a DEF file with the defwEnd routine. All other routines must be used between these routines. The remaining routines described in this section are provided as utilities.
For an example on how to set up the writer, see "Setup Examples".
All routines return 0 if successful.
Initializes the DEF writer. Use this routine if you do not want to use the callback mechanism.
Specifies the name of the DEF file to create.
Specifies which version of LEF/DEF is being used. vers1 specifies the major number. vers2 specifies the minor number.
Note: The NAMECASESENSITIVE statement is obsolete; therefore the writer ignores this argument.
Writes the DIVIDERCHAR statement that specifies the character used to express hierarchy when DEF names are mapped to or from other databases. The character must be enclosed in double quotation marks.
Writes the BUSBITCHARS statement that specifies the pair of characters used to specify bus bits when DEF names are mapped to or from other databases. The characters must be enclosed in double quotation marks.
Writes the DESIGN statement that specifies a name for the design.
Writes the TECHNOLOGY statement that specifies a technology name for the design.
Writes the UNITS statement that specifies how to convert DEF units.
If you do not include these routines, default values are used.
Specifies the name of the DEF file to create.
Ends the DEF file. This routine is required and must be used last.
Writes a blank line. This routine does not require any arguments.
Prints the return status of the defw* routines.
Specifies the nonzero integer returned by the DEF writer routines.
The following examples show how to set up the writer. There are two ways to use the DEF 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 will issue a warning. If there is a default routine, the writer will invoke 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 the callback routine to mark the end of the DEF design. The type is defwDesignEndCbkType.
Blockages routines write a DEF BLOCKAGES statement. The BLOCKAGES statement is optional and can be used only once in a DEF file. For syntax information about the DEF BLOCKAGES statement, see "Blockages" in the LEF/DEF Language Reference.
A BLOCKAGES statement must start and end with the defwStartBlockages and defwEndBlockages routines. All blockages must be defined between these routines.
Starts a BLOCKAGES statement.
Specifies the number of blockages defined in the BLOCKAGES statement.
Ends the BLOCKAGES statement.
Writes a DESIGNRULEWIDTH statement for the blockage. Either a SPACING or a DESIGNRULEWIDTH statement can be specified for a routing blockage. The DESIGNRULEWIDTH statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesLayerDesignRuleWidth instead.
Specifies that the blockages have a width of effectiveWidth for the purposes of spacing calculations.
Writes a DESIGNRULEWIDTH statement for the blockage. Either a SPACING or a DESIGNRULEWIDTH statement can be specified for a routing blockage. The DESIGNRULEWIDTH statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies that the blockages have a width of effectiveWidth for the purposes of spacing calculations.
Writes a LAYER statement that defines a routing blockage. When the compName argument is specified, writes a LAYER COMPONENT statement that defines a routing blockage that is associated with a component. Either a LAYER, LAYER COMPONENT, FILLS, SLOTS, or PUSHDOWN statement can be specified for each routing blockage in the BLOCKAGES statement. The LAYER and LAYER COMPONENT statements are optional and each can be used only once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesLayer and/or defwBlockagesLayerComponent instead.
Specifies the layer on which to create the routing blockage.
Optional argument that specifies a component with which to associate the blockage. Specify NULL to ignore this argument.
Writes a LAYER statement that defines a routing blockage. Any one of the LAYER, LAYER COMPONENT, FILLS, SLOTS, or PUSHDOWN statements can be specified for each routing blockage in the BLOCKAGES statement. The LAYER statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies the layer on which to create the routing blockage.
Writes a LAYER COMPONENT statement that defines a routing blockage that is associated with a component. Any one of the LAYER, LAYER COMPONENT, FILLS, SLOTS, or PUSHDOWN statements can be specified for each routing blockage in the BLOCKAGES statement. The LAYER COMPONENT statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies a component with which to associate the blockage.
Writes an EXCEPTPGNET statement for a routing blockage on the given layer, which specifies that the blockage only blocks signal net routing and does not block power or ground net routing. Either a COMPONENT, SLOTS, FILLS, PUSHDOWN, or EXCEPTPGNET statement can be specified for each routing blockage in the BLOCKAGES statement. The EXCEPTPGNET statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesLayerExceptpgnet instead.
Specifies the layer on which to create the routing blockage.
Writes an EXCEPTPGNET statement for a routing blockage on the given layer, which specifies that the blockage only blocks signal net routing and does not block power or ground net routing. Any one of the COMPONENT, SLOTS, FILLS, PUSHDOWN, or EXCEPTPGNET statements can be specified for each routing blockage in the BLOCKAGES statement. The EXCEPTPGNET statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies the layer on which to create the routing blockage.
Writes a FILLS statement, which defines a routing blockage on the specified layer where metal fills cannot be placed. Either a LAYER, LAYER COMPONENT, FILLS, SLOTS, PUSHDOWN, or EXCEPTPGNET statement can be specified for each routing blockage in the BLOCKAGES statement. The FILLS statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesLayerFills instead.
Specifies the layer on which to create the blockage.
Writes a FILLS statement, which defines a routing blockage where metal fills cannot be placed. Any one of the LAYER, LAYER COMPONENT, FILLS, SLOTS, PUSHDOWN, or EXCEPTPGNET statements can be specified for each routing blockage in the BLOCKAGES statement. The FILLS statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Writes a LAYER PUSHDOWN statement, which defines the routing blockage as being pushed down into the block from the top level of the design. Either a LAYER, LAYER COMPONENT, FILLS, SLOTS, PUSHDOWN, or EXCEPTPGNET statement can be specified for each routing blockage in the BLOCKAGES statement. The LAYER PUSHDOWN statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesLayerPushdown instead.
Specifies the layer on which the blockage lies.
Writes a LAYER PUSHDOWN statement, which defines the routing blockage as being pushed down into the block from the top level of the design. Any one of the LAYER, LAYER COMPONENT, FILLS, SLOTS, PUSHDOWN, or EXCEPTPGNET statements can be specified for each routing blockage in the BLOCKAGES statement. The LAYER PUSHDOWN statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies the layer on which the blockage lies.
Writes a SLOTS statement, which defines a routing blockage where slots cannot be placed. Either a LAYER, LAYER COMPONENT, FILLS, SLOTS, PUSHDOWN, or EXCEPTPGNET statement can be specified for each routing blockage in the BLOCKAGES statement. The SLOTS statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies the layer on which to create the blockage.
Writes a PLACEMENT statement, which defines a placement blockage. Either a PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statement can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPlacement instead.
Writes a PLACEMENT statement, which defines a placement blockage. Any one of the PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statements can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Writes a PLACEMENT COMPONENT statement, which defines a placement blockage associated with a component. Either a PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statement can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT COMPONENT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPlacementComponent instead.
Specifies the component with which to associate the blockage.
Writes a PLACEMENT COMPONENT statement, which defines a placement blockage associated with a component. Any one of the PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statements can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT COMPONENT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Specifies the component with which to associate the blockage.
Writes a PLACEMENT PARTIAL statement, which specifies that the initial placement should not use more than maxDensity percentage of the blockage area for standard cells. Either a PLACEMENT, PLACEMENT PARTIAL, PLACEMENT COMPONENT, PLACEMENT SOFT, or PLACEMENT PUSHDOWN statement can be specified for each placement blockage. The PLACEMENT PARTIAL statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPlacementPartial instead.
Specifies the maximum density value. The initial placement will not use more than maxDensity percentage of the blockage area for standard cells.
Value: 0.0-100.0
Writes a PLACEMENT PARTIAL statement, which specifies that the initial placement should not use more than maxDensity percentage of the blockage area for standard cells. Any one of the PLACEMENT, PLACEMENT PARTIAL, PLACEMENT COMPONENT, PLACEMENT SOFT, or PLACEMENT PUSHDOWN statements can be specified for each placement blockage. The PLACEMENT PARTIAL statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Specifies the maximum density value. The initial placement will not use more than maxDensity percentage of the blockage area for standard cells.
Value: 0.0-100.0
Writes a PLACEMENT PUSHDOWN statement, which defines the placement blockage as being pushed down into the block from the top level of the design. Either a PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statement can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT PUSHDOWN statement is optional and can be used only once for each placement blockage in a BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPlacementPushdown instead.
Writes a PLACEMENT PUSHDOWN statement, which defines the placement blockage as being pushed down into the block from the top level of the design. Any one of the PLACEMENT, PLACEMENT COMPONENT, PLACEMENT PUSHDOWN, PLACEMENT PARTIAL, or PLACEMENT SOFT statement can be specified for each placement blockage in the BLOCKAGES statement. The PLACEMENT PUSHDOWN statement is optional and can be used only once for each placement blockage in a BLOCKAGES statement.
Writes a PLACEMENT SOFT statement, which specifies that the initial placement should not use the blockage area, but later timing optimization phases can use the blockage area. Either a PLACEMENT, PLACEMENT PARTIAL, PLACEMENT COMPONENT, PLACEMENT SOFT, or PLACEMENT PUSHDOWN statement can be specified for each placement blockage. The PLACEMENT SOFT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPlacementSoft instead.
Writes a PLACEMENT SOFT statement, which specifies that the initial placement should not use the blockage area, but later timing optimization phases can use the blockage area. Any one of the PLACEMENT, PLACEMENT PARTIAL, PLACEMENT COMPONENT, PLACEMENT SOFT, or PLACEMENT PUSHDOWN statements can be specified for each placement blockage. The PLACEMENT SOFT statement is optional and can be used only once for each placement blockage in the BLOCKAGES statement.
Writes a POLYGON statement. Either a RECT or a POLYGON statement is required with a LAYER, LAYER COMPONENT, FILLS, SLOTS, or PUSHDOWN statement. The POLYGON statement can be used more than once for each routing blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesPolygon instead.
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, to the y axis, or at a 45-degree angle.
Writes a POLYGON statement. Either a RECT or a POLYGON statement is required with a LAYER, LAYER COMPONENT, FILLS, SLOTS, or PUSHDOWN statement. The POLYGON statement can be used more than once for each routing blockage in the BLOCKAGES statement.
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, to the y axis, or at a 45-degree angle.
Writes a RECT statement. Either a RECT or a POLYGON statement is required with a LAYER, LAYER COMPONENT, FILLS, SLOTS, or LAYER PUSHDOWN statement. A RECT statement is also required with a PLACEMENT COMPONENT or PLACEMENT PUSHDOWN statement. The RECT statement can be used more than once for each blockage in the BLOCKAGES statement.
Note: This function will become obsolete in the next parser release. Use defwBlockagesRect instead.
xl yl xh yh
Specifies the absolute coordinates of the blockage geometry.
Writes a RECT statement. Either a RECT or a POLYGON statement is required with a LAYER, LAYER COMPONENT, FILLS, SLOTS, or LAYER PUSHDOWN statement. A RECT statement is also required with a PLACEMENT COMPONENT or PLACEMENT PUSHDOWN statement. The RECT statement can be used more than once for each blockage in the BLOCKAGES statement.
xl yl xh yh
Specifies the absolute coordinates of the blockage geometry.
Writes the blockage layer color mask.
Specifies the mask color.
Writes a SPACING statement for the blockage. Either a SPACING or a DESIGNRULEWIDTH statement can be specified for a routing blockage. The SPACING statement is optional and can be used only once for each routing blockage in the BLOCKAGES statement.
Specifies the minimum spacing between this blockage and any other routing shape.
The Bus Bit Characters routine writes a DEF BUSBITCHARS statement. The BUSBITCHARS statement is required and can be used only once in a DEF file. For syntax information about the DEF BUSBITCHARS statement, see "Bus Bit Characters" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a BUSBITCHARS statement.
Specifies the pair of characters used to specify bus bits when DEF names are mapped to or from other databases. The characters must be enclosed in double quotation marks.
If one of the bus bit characters appears in a DEF name as a regular character, you must use a backslash ( \) before the character to prevent the DEF reader from interpreting the character as a bus bit delimiter.
Components routines write a DEF COMPONENTS section. The COMPONENTS section is optional and can be used only once in a DEF file. For syntax information about the DEF COMPONENTS section, see "Components" in the LEF/DEF Language Reference.
The COMPONENTS section must start and end with the defwStartComponents and defwEndComponents routines. All components must be defined between these routines.
If the DEF file contains a REGIONS statement, the COMPONENTS statement must follow it. For more information about the DEF REGIONS routines, see "Regions".
For examples of the routines described here, see "Components Example".
Note: To write a PROPERTY statement for the component, you must use one of the property routines between the routines described here. For more information, see "Property Statements".
All routines return 0 if successful.
Starts the COMPONENTS section.
Specifies the number of components defined in the COMPONENTS section.
Ends the COMPONENTS section.
If the count specified in defwStartComponents is not the same as the actual number of defwComponent routines used, this routine returns DEFW_BAD_DATA.
Writes a set of statements that define one component. This routine is required and can be used more than once in the COMPONENTS statement.
If you specify 0 for all optional arguments except weight, they are ignored. For weight, you must specify -1.0.
Optional argument that specifies that the component being defined should be electrically equivalent to eeq (a previously defined component). Specify NULL to ignore this argument.
Specifies the name of a model defined in the library.
Specifies the component name, which is an instance of master.
Optional argument that specifies the name of a previously defined region in which the component must lie. Specify NULL to ignore this argument.
Optional argument that specifies the component state. Specify NULL to ignore this argument.
Value: Specify one of the following:
Specifies that the component has a location, but can be moved using automatic layout tools. |
||
Optional argument that specifies the orientation of the component. Specify -1 to ignore this argument.
Value: 0 to 7. For more information, see "Orientation Codes".
statusX statusY
Optional arguments that specify the location of the component. Specify 0 to ignore these arguments.
Optional argument that specifies the source of the component. Specify NULL to ignore this argument.
Value: Specify one of the following:
Component is generated by the user for some user-defined reason. |
Optional argument that specifies the weight of the component, which determines if automatic placement attempts to keep the component near the specified location. weight is only meaningful when the component is placed. All non-zero weights have the same effect during automatic placement. Specify 0 to ignore this argument.
Also writes a set of statements that define one component. This routine is the same as the defwComponent routine, with the exception of the foreignOrients argument, which takes a string instead of an integer.This routine is required and can be used more than once in the COMPONENTS statement.
If you specify 0 for all optional arguments except weight, they are ignored. For weight, you must specify -1.0.
Optional argument that specifies that the component being defined should be electrically equivalent to eeq (a previously defined component). Specify NULL to ignore this argument.
Specifies the name of a model defined in the library.
Specifies the component name, which is an instance of master.
Optional argument that specifies the name of a previously defined region in which the component must lie. Specify NULL to ignore this argument.
Optional argument that specifies the component state. Specify NULL to ignore this argument.
Value: Specify one of the following:
Specifies that the component has a location, but can be moved using automatic layout tools. |
||
Optional argument that specifies the orientation of the component. Specify NULL to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
statusX statusY
Optional arguments that specify the location of the component. Specify 0 to ignore these arguments.
Optional argument that specifies the source of the component. Specify NULL to ignore this argument.
Value: Specify one of the following:
Component is generated by the user for some user-defined reason. |
Optional argument that specifies the weight of the component, which determines if automatic placement attempts to keep the component near the specified location. weight is only meaningful when the component is placed. All non-zero weights have the same effect during automatic placement. Specify 0 to ignore this argument.
Writes a HALO statement for a component. The HALO statement creates a placement blockage around the component. The HALO statement is optional and can be used only once for each component in the COMPONENT statement. If you call this routine, you cannot call defwComponentHaloSoft.
left bottom right top
Specifies the amount the halo extends from the left, bottom, right, and top edges of the LEF macro.
Writes a HALO SOFT statement. This routine is similar to defwComponentHalo, except that it also writes the SOFT option. The HALO SOFT statement is optional and can be used only once for each component. If you call this routine, you cannot call defwComponentHalo.
left bottom right top
Specifies the amount the halo extends from the left, bottom, right, and top edges of the LEF macro.
Writes a ROUTEHALO statement. The ROUTEHALO statement is optional and can be used only once for each component.
Specifies the halo distance, as an integer in DEF database units.
Specifies the minimum layer. The routing halo exists for the routing layers between minLayer and maxLayer. minLayer must be a lower routing layer than maxLayer. minLayer must be a string that matches a LEF routing layer name.
Specifies the maximum layer. The routing halo exists for the routing layers between minLayer and maxLayer. maxLayer must be a string that matches a LEF routing layer name.
The following example shows a callback routine with the type defwComponentCbkType. This example only shows the usage of some functions related to component.
The Design routine writes a DEF DESIGN statement. The DESIGN statement is required and can be used only once in a DEF file. For syntax information about the DESIGN statement, see "Design" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a DESIGN statement.
Specifies a name for the design.
Die Area routines write a DEF DIEAREA statement. The DIEAREA statement is optional and can be used only once in a DEF file. For syntax information about the DEF DIEAREA statement, see "Die Area" in the LEF/DEF Language Reference.
If the DEF file contains a PROPERTYDEFINITIONS statement, the DIEAREA statement must follow it. For more information about the DEF PROPERTYDEFINITIONS statement, see "Property Definitions".
This routine returns 0 if successful.
Writes a DIEAREA statement.
Specifies the points of two corners of the bounding rectangle for the design. Geometric shapes (such as blockages, pins, and special net routing) can be outside of the die area, to allow proper modeling of pushed down routing from top-level designs into sub blocks. However, routing tracks should still be inside the die area.
Writes a DIEAREA statement that includes more than two points.
Specifies the number of points specified.
xl yh
Specifies the points of a polygon that forms the die area. Geometric shapes (such as blockages, pins, and special net routing) can be outside of the die area, to allow proper modeling of pushed down routing from top-level designs into sub blocks. However, routing tracks should still be inside the die area.
The following example shows a callback routine with the type defwDieAreaCbkType.
The Divider Character routine writes a DEF DIVIDERCHAR statement. The DIVIDERCHAR statement is required and can be used only once in a DEF file. For syntax information about the DIVIDERCHAR statement, see "Divider Character" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a DIVIDERCHAR statement.
Specifies the character used to express hierarchy when DEF names are mapped to or from other databases. The character must be enclosed in double quotation marks.
If the divider character appears in a DEF name as a regular character, you must use a backslash (\) before the character to prevent the DEF reader from interpreting the character as a hierarchy delimiter.
The Extension routines write a series of statements that define the EXTENSIONS statement in the DEF file. The EXTENSIONS statement is optional and can be used only once in a DEF file. For syntax information about the EXTENSIONS statement, see "Extensions" in the LEF/DEF Language Reference.
You must use the defwStartBeginext and defwEndBeginext routines to create an EXTENSIONS statement. You must define all extensions between these routines.
For examples of the routines described here, see "Extensions Example".
All routines return 0 if successful.
Starts the EXTENSIONS statement.
Specifies the extension name.
Ends the BEGINEXT 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
Specifies the values used for the revision number string.
Adds customized syntax to the DEF 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 defwExtCbkType. This example only shows the usage of some functions related to extensions.
Fills routines write a DEF FILLS statement. The FILLS statement is optional and can be used only once in a DEF file. For syntax information about the DEF FILLS statement, see "Fills" in the LEF/DEF Language Reference.
The DEF FILLS statement must start and end with the defwStartFills and defwEndFills routines. All fills must be defined between these routines.
All routines return 0 if successful.
Starts a FILLS statement.
Specifies the number of fills defined in the FILLS statement.
Ends the FILLS statement.
Writes a LAYER statement. The LAYER statement is required for each fill and can be used more than once in a FILLS statement.
layerName Specifies the layer on which to create the fill.
Writes an OPC keyword for a FILLS LAYER statement, which specifies that FILL shapes require OPC correction during mask generation. defwFillLayer must be called before this routine. This routine is optional and can be called only once after the defwFillLayer or defwFillVia routine.
Specifies the points for a FILLS VIA statement. This routine is required after defwFillVia and can be called more than once.
Specifies the number of points provided.
Specify the placement locations (x y points) for the via.
Writes a POLYGON statement. Either a POLYGON or a RECT statement is required with a LAYER statement. The POLYGON statement is required and can be used more than once for each fill in the FILLS statement.
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.
Writes a RECT statement. Either a POLYGON or a RECT statement is required with a LAYER statement. The RECT statement is required and can be used more than once for each fill in the FILLS statement.
xl, yl, xh, yh
Specifies the coordinates of the fill.
Writes a FILLS VIA statement. The FILLS VIA statement is optional and can be used more than once. Call defwFillPoints after this routine.
The name of the via, which must be previously defined in the DEF VIA or LEF VIA section.
Writes the OPC keyword for a FILLS VIA statement, which specifies that FILL shapes require OPC correction during mask generation. This routine is optional and can only be called after defwFillVia.
The Gcell Grid routine writes a DEF GCELLGRID statement. The GCELLGRID statement is optional and can be used only once in a DEF file. For syntax information about the DEF GCELLGRID statement, see GCell Grid in the LEF/DEF Language Reference.
If the DEF file contains a TRACKS statement, the GCELLGRID statement must follow it. For more information about the DEF TRACKS statement, see "Tracks".
This routine returns 0 if successful.
Writes a GCELLGRID statement.
Specifies the number of columns or rows in the grid.
Specifies the starting location of the grid (that is, the first column or row).
Specifies the step spacing between the grid units.
Specifies the direction of the tracks for the global router grid that overlays the array.
Value: Specify one of the following:
The following example shows a callback routine with the type defwGcellGridCbkType.
The Groups routines write a DEF GROUPS statement. The GROUPS statement is optional and can be used only once in a DEF file. For syntax information about the DEF GROUPS statement, see Groups in the LEF/DEF Language Reference.
You must begin and end a DEF GROUPS statement with the defwStartGroups and defwEndGroups routines. You must define all groups between these routines.
For examples of the routines described here, see "Groups Example".
Note: To write a PROPERTY statement for the component, you must use one of the property routines immediately following the defwGroup* routines that define the group. For more information, see "Property Statements".
All routines return 0 if successful.
Starts the GROUPS statement.
Specifies the number of groups defined in the GROUPS statement.
Ends the GROUPS statement.
Writes a series of statements that define the specified group. This routine is required and can be used more than once in a GROUPS statement.
Specifies a component name, a list of component names, or a regular expression for a set of components.
Specifies the name for a group of components.
Specifies the number of components in the group.
Writes a REGION statement for the group defined. This statement is optional and can be used only once per group name.
Specifies the name of a previously defined region in which the group must lie.
xl xh yl yh
Specifies the coordinates of a rectangular region in which the group must lie. Specify the coordinates or regionName; do not specify both.
The following example shows a callback routine with the type defwGroupCbkType.
The History routine writes a DEF HISTORY statement. The HISTORY statement is optional and can be used more than once in a DEF file. For syntax information about the DEF HISTORY statement, see History in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a HISTORY statement.
Lists a historical record about the design. Each line indicates one historical record. Any text excluding a semicolon (;) can be included. Linefeed and Return do not terminate the statement.
The following example shows a callback routine with the type defwHistoryCbkType.
Nets routines write a DEF NETS statement. The NETS statement is optional and can be used only once in a DEF file. For syntax information about the DEF NETS statement, see "Nets" in the LEF/DEF Language Reference.
A NETS statement must start and end with the defwStartNets and defwEndNets routines. All nets must be defined between these routines. Each individual net must start and end with either defwNet or defwNetMustjoinConnection, and defwNetEndOneNet.
For examples of the routines described here, see "Nets Example".
In addition to the routines in this section, you can also include routines that form a regularWiring statement, a SUBNET statement, and a PROPERTY statement. For information about these routines, see "Regular Wiring" , "Subnet" , and "Property Statements".
All routines return 0 if successful.
Starts a NETS statement. A NET statement must start and end with defwStartNets and defwEndNets.
Specifies the number of nets defined in the NETS statement.
Ends the NETS statement. A NET statement must start and end with defwStartNets and defwEndNets.
Starts a net description in the NETS statement. Each net description must start with either defwNet or defwNetMustJoinConnection, and end with defwNetEndOneNet.
If you specify this routine, you can optionally specify the following routine:
Specifies the name of the net.
Writes a MUSTJOIN statement in the NETS statement. Each net description must start with either defwNet or defwNetMustJoinConnection, and end with defwNetEndOneNet.
compName, pinName
Identifies the net as a mustjoin by specifying one of its pins, using a component name and pin name.
Ends a net description in the NETS statement. Each net description must start with either defwNet or defwNetMustJoinConnection, and end with defwNetEndOneNet.
Defines the net specified in defwNet. This routine can be used more than once for each net in a NETS statement.
Specifies the name of a regular component pin on the net. If you omit this value, the DEF writer writes the PIN statement.
Specifies the name of an I/O pin on the net.
Optional argument that marks the pin as part of a synthesized scan chain.
Value: Specify one of the following:
Writes a SYNTHESIZED statement. |
Writes an ESTCAP statement. The ESTCAP statement is optional and can be used only once for each net in the NETS statement.
Specifies the estimated wire capacitance for the net. ESTCAP can be loaded with simulation data to generate net constraints for timing-driven layout.
Writes a FIXEDBUMP statement that indicates a bump cannot be assigned to a different pin. The FIXEDBUMP statement is optional and can be used only once for a net.
Writes a FREQUENCY statement. The FREQUENCY statement is optional and can be used only once for a net.
Specifies the frequency of the net, in hertz. The frequency value is used by the router to choose the correct number of via cuts required for a given net, and by validation tools to verify that the AC current density rules are met.
Writes a NONDEFAULTRULE statement. The NONDEFAULTRULE statement is optional and can be used only once for a net.
Specifies that the net and wiring are created according to the specified nondefault rule defined in LEF.
Writes an ORIGINAL statement. The ORIGINAL statement is optional and can be used only once for a net.
Specifies the name of the original net partitioned to create multiple nets, including the net being defined.
Writes a PATTERN statement. The PATTERN statement is optional and can be used only once for a net.
Specifies the routing pattern used for the net.
Value: Specify one of the following:
Used in ECL designs to connect output and mustjoin pins before routing to the remaining pins. |
Writes a SOURCE statement. The SOURCE statement is optional and can be used only once for a net.
Specifies the source of the net.
Value: Specify one of the following:
Writes a USE statement. The USE statement is optional and can be used only once for a net.
Specifies how the net is used.
Value: Specify one of the following:
Writes a VPIN statement. The VPIN statement is optional and can be used more than once for a net.
Optional argument that specifies the layer on which the virtual pin lies. Specify NULL to ignore this argument.
layerXl layerYl layerXh layerYh
Specifies the physical geometry of the virtual pin.
Optional argument that specifies the orientation of the virtual pin. Specify -1 to ignore this argument.
Value: 0 to 7. For more information, see "Orientation Codes".
Optional argument that specifies the placement status of the virtual pin. Specify NULL to ignore this argument.
Value: specify one of the following:
Specifies that the pin has a location, but can be moved during automatic layout. |
statusX statusY
Optional arguments that specify the placement location of the virtual pin. If you specify status, you must specify these arguments. Specify 0 to ignore these arguments.
Specifies the name of the virtual pin to define.
Also writes a VPIN statement. This routine is the same as the defwNetVpin routine, with the exception of the orient argument, which takes a string instead of an integer. The VPIN statement is optional and can be used more than once for a net.
Optional argument that specifies the layer on which the virtual pin lies. Specify NULL to ignore this argument.
layerXl layerYl layerXh layerYh
Specifies the physical geometry of the virtual pin.
Optional argument that specifies the orientation of the virtual pin. Specify NULL to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
Optional argument that specifies the placement status of the virtual pin. Specify NULL to ignore this argument.
Value: specify one of the following:
Specifies that the pin has a location, but can be moved during automatic layout. |
statusX statusY
Optional arguments that specify the placement location of the virtual pin. If you specify status, you must specify these arguments. Specify 0 to ignore these arguments.
Specifies the name of the virtual pin to define.
Writes a WEIGHT statement. The WEIGHT statement is optional and can be used only once for a net.
Specifies the weight of the net. Automatic layout tools attempt to shorten the lengths of nets with high weights. A value of 0 indicates that the net length for that net can be ignored. A value of 1 specifies that the net should be treated normally. A larger weight specifies that the tool should try harder to minimize the net length of that net.
For normal use, timing constraints are generally a better method to use for controlling net length than net weights. For the best results, you should typically limit the maximum weight to 10, and not add weights to more than 3 percent of the nets.
Writes a XTALK statement. The XTALK statement is optional and can be used only once for a net.
Specifies the crosstalk class number for the net. If you specify the default value (0), the XTALK statement will not be written to the DEF file.
Value: 0 to 200
The following example shows a callback routine with the type defwNetCbkType. This example only shows the usage of some functions related to net.
Routines described in this section form a regularWiring statement that can be used to define regular wiring for a net or subnet. The regularWiring statement is optional and can be used more than once in a NETS statement. For syntax information about the DEF NETS statement, see "Nets" in the LEF/DEF Language Reference.
A regularWiring statement must start and end with the defwNetPathStart and defwNetPathEnd routines. All regular wiring must be defined between these routines.
For examples of the routines described here, see "Regular Wiring Example".
The regular wiring routines can be included between the following pairs of routines:
|
defwNet and defwEndOneNet |
|
defwNetMustjoinConnection and defwEndOneNet |
|
defwNetSubnetStart and defwSubnetEnd |
All routines return 0 if successful.
Starts a regularWiring statement.
Specifies the regular wiring type.
Value: Specify one of the following:
Ends the regularWiring statement.
Writes a LAYER statement. The LAYER statement is required and can be used more than once in the regularWiring statement.
Specifies the layer name on which the wire lies.
Optional argument that writes the keyword TAPER, which specifies that the next contiguous wire segment is created using the default rule.
Value: Specify one of the following:
Writes the keyword TAPER. If you specify 1, you must specify NULL for the rulename argument. |
Optional argument that specifies that the next contiguous wire segment is created using the specified nondefault rule (ruleName). Specify NULL to ignore this argument. If you specify a rulename, you must specify 0 for the isTaper argument.
Defines the center line coordinates of the route on the layer specified with defwNetPathLayer. This routine is required and can be used only once for each layer in the regularWiring statement.
Specifies the number of points in the wire path (route)
pointX pointY
Specifies the coordinates of the path points.
Optional argument that specifies the amount by which the wire is extended past the end point of the segment. This value must be greater than or equal to 0 (zero). Specify NULL to ignore this argument.
Writes a STYLE statement for the layer specified with defwNetPathLayer. The STYLE statement is optional and can be used only once for each layer in the regularWiring statement.
Specifies a previously defined style from the STYLES section in this DEF file. If a style is specified, the wire's shape is defined by the center line coordinates and the style.
Specifies a via to place at the last point on the layer specified with defwNetPathLayer. This routine is optional and can be used only once for each layer in the regularWiring statement.
Specifies the via to place at the last specified path coordinate.
Specifies the orientation of the via specified with defwNetPathVia. This routine is optional and can be used only once for each via in the regularWiring statement.
Specifies the via.
Specifies the orientation.
Value: 0 to 7. For more information, see "Orientation Codes"
Also specifies the orientation of the via specified with defwNetPathVia. This routine is the same as the defwNetPathViaWithOrient routine, with the exception of the orient argument, which takes a string instead of an integer. The defwNetPathViaWithOrientStr is optional and can be used only once for each via in the regularWiring statement.
Specifies the via.
Specifies the orientation. Specify NULL to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
The Subnet routines write a SUBNET statement which further defines a net. A SUBNET statement is optional and can be used more than once in a NETS statement. For information about the DEF NETS statement, see "Nets" in the LEF/DEF Language Reference.
You must begin and end a SUBNET statement with the defwNetSubnetStart and defwSubnetEnd routines. You must define all subnets between these routines.
For examples of the routines described here, see "Subnet Example".
In addition to the routines described in this section, you can include a NONDEFAULTRULE statement and a regularWiring statement within a SUBNET statement. For more information about these routines, see defwNetNondefaultRule , or "Regular Wiring".
All routines return 0 if successful.
Starts a SUBNET statement. This statement is optional and can be used only once in a NETS statement.
Specifies the name of the subnet.
Ends a SUBNET statement.
Specifies a component for the SUBNET statement. This routine is optional and can be used more than once in a SUBNET statement.
Specifies either a component name, or the value PIN or VPIN.
Specifies either a pin name if component is set to PIN, or a virtual pin name if component is set to VPIN.
Nondefault rule routines write a DEF NONDEFAULTRULES statement. The NONDEFAULTRULES statement is optional and can be used only once in a DEF file. For syntax information about the DEF NONDEFAULTRULES statement, see "Nondefault Rules" in the LEF/DEF Language Reference.
The NONDEFAULTRULES statement must start and end with the defwStartNonDefaultRules and defwEndNonDefaultRules routines. All nondefault rules must be defined between these two routines. Each individual nondefault rule must start with defwNonDefaultRule.
Note: To write a PROPERTY statement for the nondefault rule, you must use one of the property routines immediately following the defwNonDefaultRule routine. For more information, see "Property Statements".
All routines return 0 if successful.
Starts a NONDEFAULTRULES statement.
Specifies the number of rules defined in the NONDEFAULTRULES statement.
Ends the NONDEFAULTRULES statement.
Starts a nondefault rule definition. This routine is required for each nondefault rule and can be used more than once in the NONDEFAULTRULES statement.
Specifies the name for this nondefault rule. This name can be used in the NETS section wherever a nondefault rule name is allowed. The reserved name DEFAULT can be used to indicate the default routing rule used in the NETS section.
Optional argument that specifies that any spacing values that exceed the LEF LAYER ROUTING spacing requirements are "hard" rules instead of "soft" rules. Specify 0 to ignore this argument.
Writes a LAYER statement for the nondefault rule. The LAYER statement is required and can be used more than once for each nondefault rule in the NONDEFAULTRULES statement.
`Specifies the layer for the various width and spacing values. layerName must be a routing layer.
Specifies the required minimum width allowed for layerName.
Optional argument that specifies the diagonal width for layerName, when 45-degree routing is used. Specify 0 to ignore this argument.
Optional argument that specifies the minimum spacing for layerName. The LEF LAYER SPACING or SPACINGTABLE definitions always apply; therefore it is only necessary to add a SPACING value if the desired spacing is larger than the LAYER rules already require. Specify 0 to ignore this argument.
Optional argument that specifies the distance by which wires are extended at vias on layerName. Specify 0 to ignore this argument.
Writes a MINCUTS statement. The MINCUTS statement is optional and can be used more than once for each nondefault rule in the NONDEFAULTRULES statement.
Specifies the cut layer.
Specifies the minimum number of cuts allowed for any via using cutLayerName. All vias (generated or fixed vias) used for this nondefault rule must have at least numCuts cuts in the via.
Writes a VIA statement for the nondefault rule. The VIA statement is optional and can be used more than once for each nondefault rule in the NONDEFAULTRULES statement.
Specifies a previously defined LEF or DEF via to use with this rule.
Writes a VIARULE statement. The VIARULE statement is optional and can be used more than once for each nondefault rule in the NONDEFAULTRULES statement.
Specifies a previously defined LEF VIARULE GENERATE to use with this routing rule. If no via or via rule is specified for a given routing-cut-routing layer combination, then a VIARULE GENERATE DEFAULT via rule must exist for that combination, and it is implicitly inherited.
Pin routines write a DEF PINS statement. The PINS statement is optional and can be used only once in a DEF file. For syntax information about the DEF PINS statement, see "Pins" in the LEF/DEF Language Reference.
A PINS statement must start and end with the defwStartPins and defwEndPins routines. All pins must be defined between these routines. Each individual pin must start with a defwPin routine.
If the DEF file contains a COMPONENTS statement, the PINS statement must follow it. For more information about DEF COMPONENTS routines, see "Components".
For examples of the routines described here, see "Pins Example".
Note: To write a PROPERTY statement for the pin, you must use one of the property routines immediately following the defwPin routine. For more information, see "Property Statements".
All routines return 0 if successful.
Starts a PINS statement.
Specifies the number of pins defined in the PINS statement.
Ends the PINS statement. If count is not the same as the actual number of defwPin routines used, defwEndPins returns DEFW_BAD_DATA.
Starts a pin description in the PINS statement. Each pin description must start with defwPin. This routine is required and can be used more than once in a PINS statement.
Optional argument that specifies the pin type. Specify NULL to ignore this argument.
Value: Specify one of the following:
Pin that can accept signals going either in or out of the cell. |
Specifies the corresponding internal net name.
Optional argument that specifies the orientation for the pin. Specify -1 to ignore this argument.
Value: 0 to 7. For more information, see "Orientation Codes".
Specifies the name for the external pin.
Optional argument that identifies the pin as a special pin. Specify 0 to ignore this argument.
Value: Specify one of the following: I
Writes a SPECIAL statement. |
Optional argument that specifies the placement status of the pin. Specify NULL to ignore this argument.
Value: Specify one of the following:
Specifies that the pin has a location, but can be moved during automatic layout. |
statusX statusY
Optional arguments that specify the placement location of the pin. If you specify status, you must specify these arguments.Specify 0 to ignore these arguments.
Optional argument that specifies how the pin is used. Specify NULL to ignore this argument.
Value: Specify one of the following:
Pin is used for connectivity to the chip-level ground distribution network. |
||
Pin is used for connectivity to the chip-level power distribution network. |
||
Also starts a pin description in the PINS statement. This routine is the same as the defwPin routine, with the exception of the orient argument, which takes a string instead of an integer. Each pin description must start with defwPin. This routine is required and can be used more than once in a PINS statement.
Optional argument that specifies the pin type. Specify NULL to ignore this argument.
Value: Specify one of the following:
Pin that can accept signals going either in or out of the cell. |
Specifies the corresponding internal net name.
Optional argument that specifies the orientation for the pin. Specify NULL to ignore this argument.
Value: N, W, S, E, FN, FW, FS, or FE
Specifies the name for the external pin.
Optional argument that identifies the pin as a special pin. Specify 0 to ignore this argument.
Value: Specify one of the following: I
Writes a SPECIAL statement. |
Optional argument that specifies the placement status of the pin. Specify NULL to ignore this argument.
Value: Specify one of the following:
Specifies that the pin has a location, but can be moved during automatic layout. |
statusX statusY
Optional arguments that specify the placement location of the pin. If you specify status, you must specify these arguments.Specify 0 to ignore these arguments.
Optional argument that specifies how the pin is used. Specify NULL to ignore this argument.
Value: Specify one of the following:
Pin is used for connectivity to the chip-level ground distribution network. |
||
Pin is used for connectivity to the chip-level power distribution network. |
||
Writes an ANTENNAMODEL statement. The ANTENNAMODEL statement is optional and can be used more than once in a pin definition.
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: OXIDE3 and OXIDE4 are currently not supported. If you specify either of these models, the tool parses and ignores it.
Writes an ANTENNAPINDIFFAREA statement. The ANTENNAPINDIFFAREA statement is optional and can be used more than once in a PIN section.
Specifies the diffusion (diode) area to which the pin is connected on a layer.
Optional argument that specifies the layer. Specify NULL to ignore this argument.
Writes an ANTENNAPINGATEAREA statement. The ANTENNAPINGATEAREA statement is optional, and can be used once after each defwPinAntennaModel routine in a PINS section.
Specifies the gate area to which the pin is connected on a layer.
Optional argument that specifies the layer. Specify NULL to ignore this argument.
Writes an ANTENNAPINMAXAREACAR statement. The ANTENNAPINMAXAREACAR statement is optional, and can be used once after each defwPinAntennaModel routine in a PINS section.
Specifies the maximum cumulative antenna ratio, using the metal area below the current pin layer.
Specifies the pin layer.
Writes an ANTENNAPINMAXCUTCAR statement. The ANTENNAPINMAXCUTCAR statement is optional, and can be used once after each defwPinAntennaModel routine in a PINS section.
Specifies the maximum cumulative antenna ratio, using the cut area below the current pin layer.
Specifies the pin layer.
Writes an ANTENNAPINMAXSIDEAREACAR statement. The ANTENNAPINMAXSIDEAREACAR statement is optional, and can be used once after each defwPinAntennaModel routine in a PINS section.
Specifies the maximum cumulative antenna ratio, using the metal side wall area below the current pin layer.
Specifies the pin layer.
Writes an ANTENNAPINPARTIALCUTAREA statement. The ANTENNAPINPARTIALCUTAREA statement is optional and can be used more than once in a PINS 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. Specify NULL to ignore this argument.
Writes an ANTENNAPINPARTIALMETALAREA statement. The ANTENNAPINPARTIALMETALAREA statement is optional and can be used more than once in a PINS 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. Specify NULL to ignore this argument.
Writes an ANTENNAPINPARTIALMETALSIDEAREA statement. The ANTENNAPINPARTIALMETALSIDEAREA statement is optional and can be used more than once for each pin in a PINS statement.
Specifies the partial metal side wall 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. Specify NULL to ignore this argument.
Writes a GROUNDSENSITIVITY statement for a pin in the PINS statement. The GROUNDSENSITIVITY statement is optional and can be used only once for each pin in the PINS statement.
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 LAYER statement for a pin in the PINS statement. Either a LAYER or a POLYGON statement can be specified for a pin. The LAYER statement is optional and can be used more than once for each pin in the PINS statement.
Specifies the routing layer used for the pin.
Optional argument that specifies the minimum spacing allowed between this pin and any other routing shape. If you specify a minimum spacing, you must specify 0 for designRuleWidth. Specify 0 to ignore this argument.
Optional argument that specifies that this pin has a width of designRuleWidth for the purpose of spacing calculations. If you specify a designRuleWidth value, you must specify 0 for spacing. Specify 0 to ignore this argument.
xl yl xh yh
Specifies the physical geometry for the pin on the specified layer.
Writes a NETEXPR statement for a pin in the PINS statement. The NETEXPR statement is optional and can be used only once for each pin in the PINS statement.
Specifies a net expression property name (such as power1 or power2). If pinExpr matches a net expression property higher up in the netlist (for example, in Verilog, VHDL, or OpenAccess), then the property is evaluated, and the software identifies a net to which to connect this pin.
Writes a POLYGON statement for a pin in the PINS statement. Either a LAYER or a POLYGON statement can be specified for a pin. The POLYGON statement is optional and can be used more than once for each pin in the PINS statement.
Specifies the layer on which to generate a polygon.
Optional argument that specifies the minimum spacing allowed between this pin and any other routing shape. If you specify a minimum spacing, you must specify 0 for designRuleWidth. Specify 0 to ignore this argument.
Optional argument that specifies that this pin has a width of designRuleWidth for the purpose of spacing calculations. If you specify a designRuleWidth value, you must specify 0 for spacing. Specify 0 to ignore this argument.
Specifies the number of polygon sides.
xl yl
Specifies a sequence of points to generate a polygon for the pin. The polygon edges must be parallel to the x axis, the y axis, or at a 45-degree angle.
Writes a PORT statement for a pin in the PINS statement. The PORT statement is optional and can be used more than once in a PINS statement.
Writes a LAYER statement for a PINS PORT statement. Either a LAYER, POLYGON, or VIA statement can be specified for a pin port. This routine is optional and is called after defwPinPort.
Specifies the layer name.
Optional argument that specifies the minimum spacing allowed between this pin port and any other routing shape. If you specify spacing, you must specify 0 for designRuleWidth. Specify 0 to ignore this argument.
Optional argument that specifies that this pin port has a width of designRuleWidth for the purpose of spacing calculations. If you specify designRuleWidth, you must specify 0 for spacing. Specify 0 to ignore this argument.
xl yl xh yh
Specifies the physical geometry for the pin port on the specified layer.
Writes a FIXED, PLACED, or COVER statement for a PINS PORT statement. This routine is optional and is called after defwPinPort.
Specifies the placement status of the pin.
Value: specify one of the following:
Specifies that the pin has a location, but can be moved during automatic layout. |
statusX statusY
Specifies the placement location of the pin. If you specify status, you must specify these arguments.
Specifies the orientation of the pin.
Value: 0 to 7. For more information, see "Orientation Codes".
Writes a POLYGON statement for a PINS PORT statement. Either a LAYER, POLYGON, or VIA statement can be specified for a pin port. This routine is optional and is called after defwPinPort.
Specifies the layer name.
Optional argument that specifies the minimum spacing allowed between this pin port and any other routing shape. If you specify a minimum spacing, you must specify 0 for designRuleWidth. Specify 0 to ignore this argument.
Optional argument that specifies that this pin port has a width of designRuleWidth for the purpose of spacing calculations. If you specify designRuleWidth, you must specify 0 for spacing. Specify 0 to ignore this argument.
Specifies the number of polygon sides.
xl yl
Specifies a sequence of points to generate a polygon for the pin port. The polygon edges must be parallel to the x axis, the y axis, or at a 45-degree angle.
Writes a VIA statement for a PINS PORT statement. Either a LAYER, POLYGON, or VIA statement can be specified for a pin port. This routine is optional and is called after defwPinPort.
Specifies the via name. The via name must have been defined in the associated LEF files or this DEF file before this function is called.
Specifies the point at which the via is to be placed.
Writes a SUPPLYSENSITIVITY statement for a pin in the PINS statement. The SUPPLYSENSITIVITY statement is optional and can be used only once for each pin in the PINS statement.
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 VIA statement for a pin in the PINS statement. The VIA statement is optional and can be used more than once for a pin.
Specifies the via name. The via name must have been defined in the associated LEF files or this DEF file before this function is called.
Specifies the point at which the via is to be placed.
The following example shows a callback routine with the type defwPinCbkType.
The Pin Properties routines write a DEF PINPROPERTIES statement. The PINPROPERTIES statement is optional and can be used only once in a DEF file. For syntax information about the DEF PINPROPERTIES statement, see "Pin Properties" in the LEF/DEF Language Reference.
You must begin and end a DEF PINPROPERTIES statement with the defwStartPinProperties and defwEndPinProperties routines. You must define all pin properties between these routines. Each property definition must start with a defwPinProperty routine.
If the DEF file contains a PINS statement, the PINPROPERTIES statement must follow it. For more information about the DEF PINS writer routines, see "Pins".
For examples of the routines described here, see"Pin Properties Example".
Note: To write a PROPERTY statement for a pin, you must use one of the property routines immediately following the defwPinProperty routine, which specifies the pin name. For more information, see "Property Statements".
All routines return 0 if successful.
Starts a PINPROPERTIES statement.
Specifies the number of pin properties defined in the PINPROPERTIES statement.
Ends the PINPROPERTIES statement. If count specified in defwStartPinProperties is not the same as the actual number of defwPinProperty routines used, defwEndPinProperties returns DEFW_BAD_DATA. This routine does not require any arguments.
Begins a property definition. This routine is required and can be used more than once in a PINPROPERTIES statement.
Specifies either the string to use for the component pin name, or the keyword PIN.
Specifies the I/O pin name. Specify this value only when component is set to PIN.
The following example shows a callback routine with the type defwPinPropCbkType.
The Property Definitions routines write a DEF PROPERTYDEFINITIONS statement. The PROPERTYDEFINITIONS statement is optional and can be used only once in a DEF file. For syntax information about the DEF PROPERTYDEFINITIONS statement, see Property Definitions in the LEF/DEF Language Reference.
You must begin and end a DEF PROPERTYDEFINITIONS statement with the defwStartPropDef and defwEndPropDef routines. You must define all properties between these routines.
If the DEF file contains a HISTORY statement, the PROPERTYDEFINITIONS statement must follow it. For more information about the DEF HISTORY routine, see "History".
For examples of the routines described here, see "Property Definitions Example".
All routines return 0 if successful.
Starts a PROPERTYDEFINITIONS statement. This routine does not require any arguments.
Ends the PROPERTYDEFINITIONS statement. This routine does not require any arguments.
Writes an integer property definition. This routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
Specifies the type of object for which you can define properties.
Value: DESIGN, COMPONENT, NET, SPECIALNET, GROUP, ROW, COMPONENTPIN, NONDEFAULTRULE, or REGION
Specifies a unique property name for the object type.
leftRange rightRange
Optional arguments that limit integer property values to a specified range. That is, the value must be greater than or equal to leftRange and less than or equal to rightRange. Specify 0 to ignore these arguments.
Optional argument that specifies a numeric value for an object. Specify NULL to ignore this argument.
Writes a real property definition. This routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
Specifies the type of object for which you can define properties.
Value: Specify DESIGN, COMPONENT, NET, SPECIALNET, GROUP, ROW, COMPONENTPIN, NONDEFAULTRULE, or REGION
Specifies a unique property name for the object type.
Optional arguments that limit real number property values to a specified range. That is, the value must be greater than or equal to leftRange and less than or equal to rightRange. Specify 0 to ignore these arguments.
Optional argument that specifies a numeric value for an object. Specify NULL to ignore this argument.
Writes a string property definition. This routine is optional and can be used more than once in a PROPERTYDEFINITIONS statement.
Specifies the type of object for which you can define properties.
Value: DESIGN, COMPONENT, NET, SPECIALNET, GROUP, ROW, COMPONENTPIN, NONDEFAULTRULE, or REGION
Specifies a unique property name for the object type.
leftRange rightRange
Optional arguments that limit string property values to a specified range. That is, the value must be greater than or equal to leftRange and less than or equal to rightRange. Specify 0 to ignore these arguments.
Optional argument that specifies a character value for an object. Specify NULL to ignore this argument.
The following example shows a callback routine with the type defwPropDefCbkType.
The Property Statements routines write PROPERTY statements when used after the defwRow, defwRegion, defwComponent, defwPin, defwPinProperty, defwSpecialNet, defwNet, defwNonDefaultRule, or defwGroup routines.
For examples of the routines described here, see "Property Statements Example".
Writes a PROPERTY statement with an integer value. This statement is optional and can be used more than once.
Specifies a unique property name for the object.
Specifies an integer value for the object.
Writes a PROPERTY statement with a real number value. This statement is optional and can be used more than once.
Specifies a unique property name for the object.
Specifies a real value for the object.
Writes a PROPERTY statement with a string value. This statement is optional and can be used more than once.
Specifies a unique property name for the object.
Specifies a string value for the object.
The following example shows how to create a property inside a Rows callback routine.
The Regions routines write a DEF REGIONS statement. The REGIONS statement is optional and can be used only once in a DEF file. For syntax information about the DEF REGIONS statement, see "Regions" in the LEF/DEF Language Reference.
You must begin and end a DEF REGIONS statement with the defwStartRegions and defwEndRegions routines. You must define all regions between these routines. Each region definition must start with a defwRegions routine.
If the DEF file contains a VIAS statement, the REGIONS statement must follow it. For more information about the DEF VIAS routines, see "Vias".
For examples of the routines described here, see "Regions Example".
Note: To write a PROPERTY statement for the region, you must use one of the property routines immediately following the defwRegion routines. For more information, see "Property Statements".
All routines return 0 if successful.
Starts a REGIONS statement.
Specifies the number of regions defined in the REGIONS statement.
Ends the REGIONS statement. If count specified in defwStartRegions is not the same as the actual number of defwRegionName routines used, this routine returns DEFW_BAD_DATA. This routine does not require any arguments.
Starts a region description. This routine must be called the number of times specified in the defwStartRegions count argument.
Specifies the name of the region.
xl yl xh yh
Specifies the corner points of the region.
Writes a TYPE statement. The TYPE statement is optional and can be used only once per region.
Specifies the region type.
Value: Specify one of the following:
The following example shows a callback routine with the type defwRegionCbkType.
The Row routines write a DEF ROWS statement. The ROWS statement is optional and can be used more than once in a DEF file. For syntax information about the DEF ROWS statement, see "Rows" in the LEF/DEF Language Reference.
If the DEF file contains a DIEAREA statement, the ROWS statement must follow it. For more information about the DEF DIEAREA writer routines, see "Die Area".
Note: To write a PROPERTY statement for the row, you must use one of the property routines immediately following the defwRow routine. For more information, see "Property Statements".
All routines return 0 if successful.
Writes a ROWS statement.
Optional argument that specifies the number of columns in the array pattern. Specify 0 to ignore this argument.
Optional argument that specifies the number of rows in the array pattern. Specify 0 to ignore this argument.
Specifies the orientation of all sites in the row.
Value: 0 to 7. For more information, see "Orientation Codes"
Specifies the row name for this row.
Specifies the site to use for the row.
stepX stepY
Optional arguments that specify the spacing between the columns and rows. Specify 0 to ignore these arguments.
Specifies the location in the design of the first site in the row.
Also writes a ROWS statement. This routine is the same as the defwRow routine, with the exception of the orient argument, which takes a string instead of an integer.
Optional argument that specifies the number of columns in the array pattern. Specify 0 to ignore this argument.
Optional argument that specifies the number of rows in the array pattern. Specify 0 to ignore this argument.
Specifies the orientation of all sites in the row.
Value: N, W, S, E, FN, FW, FS, or FE
Specifies the row name for this row.
Specifies the site to use for the row.
stepX stepY
Optional argument that specifies the spacing between the columns and rows. Specify 0 to ignore these arguments.
Specifies the location in the design of the first site in the row.
The following example shows a callback routine with the type defwRowCbkType.
The Scan Chain routines write a DEF SCANCHAINS statement. The SCANCHAINS statement is optional and can be used only once in a DEF file. For syntax information about the DEF SCANCHAINS statement, see "Scan Chains" in the LEF/DEF Language Reference.
You must begin and end a DEF SCANCHAINS statement with the defwStartScanchains and defwEndScanchains routines. You must define all scan chains between these routines. Each scan chain specification must start with a defwScanchains routine.
For examples of the routines described here, see "Scan Chain Example".
Note: To write a PROPERTY statement for the region, you must use one of the property routines following defwScanchains. For more information, see "Property Statements".
All routines return 0 if successful.
Starts the SCANCHAINS statement.
Specifies the number of scan chains defined in the SCANCHAINS statement.
Ends the SCANCHAINS statement. If count specified in the defwStartScanChains routine is not the same as the actual number of defwScanChain routines used, this routine returns DEFW_BAD_DATA.
Starts a scan chain specification. This routine must be used the number of times specified in the defwStartScanchains count argument.
Specifies the name of the scan chain.
Writes a COMMONSCANPINS statement. The COMMONSCANPINS statement is optional and can be used only once for each scan chain.
Optional arguments that specify the common scan-in and scan-out pins. The inst1 argument can have the value IN or OUT. The inst2 argument can have the remaining IN or OUT value not specified in the inst1 argument. Specify NULL to ignore either of these arguments.
Specifies the names of the scan-in and scan-out pins that correspond with the value of inst1 and inst2. Specify NULL to ignore either of these arguments.
Note: The inst1/pin1 and inst2/pin2 arguments must be used as pairs. If you specify NULL for either inst1 or inst2, you must also specify NULL for the corresponding pin1 or pin2. Similarly, if you specify IN or OUT for inst1 or inst2, you must specify a pin name for the corresponding pin1 or pin2.
Writes a FLOATING statement. The FLOATING statement is optional and can be used more than once for each scan chain.
Specifies the floating component name.
inst1 inst2
Optional arguments that specify the in and out pins for the component. The inst1 argument can have the value IN or OUT. The inst2 argument can have the remaining IN or OUT value not specified in the inst1 argument. Specify NULL to ignore either of these arguments.
pin1 pin2
Specifies the names of the in and out pins that correspond with the value of inst1 and inst2. Specify NULL to ignore either of these arguments.
Note: The inst1/pin1 and inst2/pin2 arguments must be used as pairs. If you specify NULL for either inst1 or inst2, you must also specify NULL for the corresponding pin1 or pin2. Similarly, if you specify IN or OUT for inst1 or inst2, you must specify a pin name for the corresponding pin1 or pin2.
Writes a FLOATING statement that contains BITS information. The FLOATING statement is optional and can be used more than once for each scan chain.
Specifies the floating component name.
inst1 inst2
Optional arguments that specify the in and out pins for the component. The inst1 argument can have the value IN or OUT. The inst2 argument can have the remaining IN or OUT value not specified in the inst1 argument. Specify NULL to ignore either of these arguments.
pin1 pin2
Specifies the names of the in and out pins that correspond with the value of inst1 and inst2. Specify NULL to ignore either of these arguments.
Note: The inst1/pin1 and inst2/pin2 arguments must be used as pairs. If you specify NULL for either inst1 or inst2, you must also specify NULL for the corresponding pin1 or pin2. Similarly, if you specify IN or OUT for inst1 or inst2, you must specify a pin name for the corresponding pin1 or pin2.
Optional argument that specifies the sequential bit length of any chain element. Specify -1 to ignore this argument.
Writes an ORDERED statement. The ORDERED statement specifies an ordered list of scan chains. The ORDERED statement is optional and can be used more than once for each scan chain.
Specifies the fixed component names. You must specify both name1 and name2 the first time you call this routine within a scanchain. If you call this routine multiple times within a scanchain, you only need to specify name1.
inst1 inst2 inst3 inst4
Optional arguments that specify the scan-in and scan-out pins for the components. The inst1 and inst3 arguments can have the value IN or OUT. The inst2 and inst4 arguments can have the remaining IN or OUT not specified in the inst1 or inst3 arguments. Specify NULL to ignore any of these arguments.
pin1 pin2 pin3 pin4
Specifies the names of the scan-in and scan-out pins that correspond with the inst* values. Specify NULL to ignore any of these arguments.
Note: The inst*/pin* arguments must be used as pairs. If you specify NULL for inst1, you must also specify NULL for the corresponding pin1. Similarly, if you specify IN or OUT for inst1, you must specify a pin name for the corresponding pin1.
Writes an ORDERED statement that contains BITS information. The ORDERED statement specifies an ordered list of scan chains. The ORDERED statement is optional and can be used more than once for each scan chain.
name1 name2
Specifies the fixed component names. You must specify both name1 and name2 the first time you call this routine within a scanchain. If you call this routine multiple times within a scanchain, you only need to specify name1.
inst1 inst2 inst3 inst4
Optional arguments that specify the scan-in and scan-out pins for the components. The inst1 and inst3 arguments can have the value IN or OUT. The inst2 and inst4 arguments can have the remaining IN or OUT not specified in the inst1 or inst3 arguments. Specify NULL to ignore any of these arguments.
pin1 pin2 pin3 pin4
Specifies the names of the scan-in and scan-out pins that correspond with the inst* values. Specify NULL to ignore any of these arguments.
Note: The inst*/pin* arguments must be used as pairs. If you specify NULL for inst1, you must also specify NULL for the corresponding pin1. Similarly, if you specify IN or OUT for inst1, you must specify a pin name for the corresponding pin1.
Optional argument that specifies the sequential bit length of any chain element. Specify -1 to ignore this argument.
Writes a PARTITION statement. The PARTITION statement is optional and can be used only once to define a scan chain.
Specifies a partition name. A partition name associates each chain with a partition group, which determines their compatibility for repartitioning by swapping elements between them. Chains with matching PARTITION names constitute a swap-compatible group.
Optional argument that specifies the maximum bit length that the chain can grow to in the partition. Specify -1 to ignore this argument.
Writes a START statement. The START statement is required and can be used only once to define a scan chain.
Specifies the start of the scan chain. You can specify a component name, or the keyword PIN to specify an I/O pin.
Specifies the out pin name. If you do not specify the out pin, DEF uses the out pin specified for common scan pins. If the scan chain starts at an I/O pin, you must specify the I/O pin name as the out pin.
Writes a STOP statement. The STOP statement is required and can be used only once to define a scan chain.
Specifies the end point of the scan chain. You can specify a component name, or the keyword PIN to specify an I/O pin.
Specifies the in pin name. If you do not specify the in pin, DEF uses the in pin specified for common scan pins. If the scan chain starts at an I/O pin, you must specify the I/O pin name as the in pin.
The following example shows a callback routine with the type defwScanchainCbkType.
Special Nets routines write a DEF SPECIALNETS statement. The SPECIALNETS statement is optional and can be used only once in a DEF file. For syntax information about the DEF SPECIALNETS statement, see "Special Nets" in the LEF/DEF Language Reference.
A SPECIALNETS statement must start and end with the defwStartSpecialNets and defwEndSpecialNets routines. All special nets must be defined between these routines. Each individual special net must start and end with the defwSpecialNet and defwSpecialNetEndOneNet routines.
For examples of the routines described here, see "Special Nets Example".
In addition to the routines in this section, you can also include routines that form a specialWiring statement and a PROPERTY statement. For information about these routines, see "Special Wiring" and "Property Statements".
All routines return 0 if successful.
Starts the SPECIALNETS statement.
Specifies the number of special nets defined in the SPECIALNETS statement.
Ends the SPECIALNETS statement. If count specified in defwStartSpecialNets is not the same as the actual number of defwSpecialNet routines used, this routine returns DEFW_BAD_DATA.
Starts a special net description. Each special net in the SPECIALNETS statement must start and end with defwSpecialNet and defwSpecialNetEndOneNet.
Specifies the name of the net to define.
Ends the special net description started with defwSpecialNet. Each special net in the SPECIALNETS statement must start and end with defwSpecialNet and defwSpecialNetEndOneNet.
Specifies the special pin and component information for the special net. This routine is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies a component name or a regular expression that specifies a set of component names.
Specifies the name of the special pin on the net that corresponds to the component. During evaluation of the regular expression, components that match the expression but do not have a pin named pinName are ignored.
Optional argument that marks the pin as part of a synthesized scan chain.
Value: Specify one of the following:
Writes a SYNTHESIZED statement. |
Writes an ESTCAP statement. The ESTCAP statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies the estimated wire capacitance for the net. ESTCAP can be loaded with simulation data to generate net constraints for timing-driven layout.
Writes a FIXEDBUMP statement that indicates the bump cannot be assigned to a different pin. The FIXEDBUMP statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Writes an ORIGINAL statement. The ORIGINAL statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies the original net partitioned to create multiple nets, including the current net.
Writes a PATTERN statement. The PATTERN statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies the routing pattern used for the net.
Value: Specify one of the following:
Used in ECL designs to connect output and mustjoin pins before routing to the remaining pins. |
Writes a SOURCE statement. The SOURCE statement is optional and can only be used once for each special net in the SPECIALNETS statement.
Specifies the source of the net.
Value: Specify one of the following:
Writes a USE statement. The USE statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies how the net is used.
Value: Specify one of the following:
Writes a VOLTAGE statement. The VOLTAGE statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies the voltage for the net as an integer in units of .001 volts. For Example, 1.5 v is equal to 1500 in DEF.
Writes a WEIGHT statement. The WEIGHT statement is optional and can be used only once for each special net in the SPECIALNETS statement.
Specifies the weight of the net. Automatic layout tools attempt to shorten the lengths of nets with high weights. Do not specify a net weight larger than 10, or assign weights to more than 3 percent of the nets in a design.
The following example shows a callback routine with the type defwSNetCbkType. This example only shows the usage of some functions related to special net.
Special wiring routines form a specialWiring statement that can be used to define the wiring for both routed and shielded nets.The specialWiring statement is optional and can be used more than once in a SPECIALNET statement. For syntax information about the DEF SPECIALNETS statement, see "Special Nets" in the LEF/DEF Language Reference.
A specialWiring statement can include routines to define either rectangles, polygons, or a path of points to create the routing for the nets. Each path of points must start and end with the defwSpecialNetPathStart and defwSpecialNetPathEnd routines. If defined, a specialWiring statement must be included between the defwSpecialNet and defwEndOneNet routines.
For examples of the routines described here, see "Special Wiring Example".
All routines return 0 if successful.
Starts a specialWiring statement. Each specialWiring statement must start and end with defwSpecialNetPathStart and defwSpecialNetPathEnd.
Specifies the special wiring type. If no wiring is specified for a particular net, the net is unrouted.
Value: Specify one of the following:
Ends the specialWiring statement. Each specialWiring statement must start and end with defwSpecialNetPathStart and defwSpecialNetPathEnd.
Writes a LAYER statement. Either a LAYER, POLYGON, or RECT statement is required for each specialWiring statement.The LAYER statement can be used more than once for each specialWiring statement.
Specifies the layer on which the wire lies.
Defines the center line coordinates of the route on the layer specified with defwSpecialNetPathLayer. Either this routine or defwSpecialNetPathPointWithWireExt is required with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies the number of points in the route.
Specifies the route coordinates.
Defines the center line coordinates and wire extension value of the route on the layer specified with defwSpecialNetPathLayer. Either this routine or defwSpecialNetPathPoint is required with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies the number of points in the route.
pointX pointY
Specifies the route coordinates.
Optional argument that specifies the amount by which the wire is extended past the endpoint of the segment. Specify NULL to ignore this argument.
Writes a SHAPE statement. The SHAPE statement is optional with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies a wire with special connection requirements because of its shape.
Value: RING, PADRING, BLOCKRING, STRIPE, FOLLOWPIN, IOWIRE, COREWIRE, BLOCKWIRE, FILLWIRE, BLOCKAGEWIRE, or DRCFILL
Writes a STYLE statement. A STYLE statement is optional with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies a previously defined style number from the STYLES section in this DEF file.
Specifies a via for the special wiring. This routine is optional with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies a via to place at the last point of the route.
Creates an array of power vias of the via specified with defwSpecialNetPathVia. This routine is optional with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
numX numY
Specifies the number of vias to create in the x and y directions.
stepX stepY
Specifies the step distance between vias, in the x and y directions
Writes a WIDTH statement. The WIDTH statement is required with a LAYER statement, and can be used only once for each LAYER statement in a specialWiring statement.
Specifies the width for wires on the layer specified with defwSpecialNetPathLayer.
Specifies the name of a regular net to be shielded by the special net being defined. This routine is required if SHIELD is specified in the defwSpecialNetPathStart routine and can be used only once for each specialWiring statement.
Specifies the name of the regular net to be shielded.
Writes a POLYGON statement. Either a LAYER, POLYGON, or RECT statement is required for each specialWiring statement. The POLYGON statement can be used only once for each specialWiring statement.
Specifies the layer on which to generate the polygon.
Specifies the number of polygon sides.
xl yl
Specifies a sequence of points to generate a polygon geometry on layerName. The polygon edges must be parallel to the x axis, the y axis, or at a 45-degree angle.
Writes a RECT statement. Either a LAYER, POLYGON, or RECT statement is required for each specialWiring statement. The RECT statement can be used only once for each specialWiring statement.
Specifies the layer on which to create the rectangle.
xl yl xh yh
Specifies the coordinates of two points which define the opposite corners of the rectangle.
The shielded routing routines form a shielded routing specification that can be used to define a special net. The shielded routing specification is optional and can be used more than once in a SPECIALNET statement. For syntax information about the DEF SPECIALNETS statement, see Special Nets in the LEF/DEF Language Reference.
You must begin and end a shielded routing specification with the defwSpecialNetShieldStart and defwSpecialNetShieldEnd routines. You must define all shielded routing between these routines. The shielded routing routines must be included between the defwSpecialNet and defwEndOneNet routines.
For examples of the routines described here, see "Shielded Routing Example".
Specifies the net shield name.
Ends the shielded routing specification.
Writes a LAYER statement. The LAYER statement is required and can be used only once per special net shield.
Specifies the layer on which the wire lies.
Specifies the number of points in the special net shield.
Specifies the coordinate locations for the path points.
Writes a SHAPE statement. The SHAPE statement is optional and can be used only once per special net shield.
Specifies a wire with special connection requirements because of its shape.
Value: RING, PADRING, BLOCKRING, STRIPE, FOLLOWPIN, IOWIRE, COREWIRE, BLOCKWIRE, FILLWIRE, or BLOCKAGEWIRE
Specifies the via to place at the last specified path coordinate.
Creates an array of power vias of the via specified with the defwSpecialNetShieldVia routine. This routine is optional and can be used more than once for a special net.
numX numY
Specifies the number of vias to create in the x and y directions.
stepX stepY
Specifies the step distance in the x and y directions.
Writes a WIDTH statement. The WIDTH statement is required and can be used only once per special net shield.
Specifies the wire width.
Slots routines write a DEF SLOTS statement. The SLOTS statement is optional and can be used only once in a DEF file. For syntax information about the DEF SLOTS statement, see "Slots" in the LEF/DEF Language Reference.
The SLOTS statement must start and end with the defwStartSlots and defwEndSlots routines. All slots must be defined between these routines.
All routines return 0 if successful.
Starts a SLOTS statement.
Specifies the number of defwSlotLayer routines in the SLOTS statement.
Ends the SLOTS statement.
Writes a LAYER statement. The LAYER statement is required for each slot and can be used more than once in a SLOTS statement.
Specifies the layer on which to create the slot.
Writes a POLYGON statement. Either a POLYGON or RECT statement is required with a LAYER statement. The POLYGON statement can be used more than once for each slot in the SLOTS statement.
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.
Writes a RECT statement. The RECT statement is required and can be used more than once for each slot in the SLOTS statement.
Specifies the coordinates of the slot geometry.
Styles routines write a DEF STYLES statement. The STYLES statement is optional and can be used only once in a DEF file. For syntax information about the STYLES statement, see "Styles" in the LEF/DEF Language Reference.
The STYLES statement must start and end with the defwStartStyles and defwEndStyles routines.
All routines return 0 if successful.
Starts the STYLES statement.
Specifies the number of styles defined in the STYLES statement.
Ends the STYLES statement.
Defines a style. This routine is required and can be used more than once in the STYLES statement.
Defines a style. styleNums is a positive integer that is greater than or equal to 0 (zero), and is used to reference the style later in the DEF file. When defining multiple styles, the first styleNums must be 0 (zero), and any following styleNums should be numbered consecutively so that a table lookup can be used to find them easily.
Specifies the number of points in the style.
xp yp
Specifies a sequence of points to generate a polygon geometry. The syntax corresponds to a coordinate pair, such as x y. Specify an asterisk (*) to repeat the same value as the previous x or y value from the last point. The polygon must be convex. The polygon edges must be parallel to the x axis, the y axis, or at a 45-degree angle, and must enclose the point (0 0).
The Technology routine writes a DEF TECHNOLOGY statement. The TECHNOLOGY statement is optional and can be used only once in a DEF file. For syntax information about the TECHNOLOGY statement, see "Technology" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a TECHNOLOGY statement.
Specifies a technology name for the design in the database.
The Tracks routine writes a DEF TRACKS statement. The TRACKS statement is optional and can be used only once in a DEF file. For syntax information about the DEF TRACKS statement, see Tracks in the LEF/DEF Language Reference.
If the DEF file contains a ROWS statement, the TRACKS statement must follow it. For more information about the DEF ROWS writer routine, see "Rows".
For examples of the routines described here, see "Tracks Example".
This routine returns 0 if successful.
Writes a TRACKS statement.
Specifies the number of tracks to create.
Specifies the step spacing between the tracks.
Specifies the coordinate of the first line.
Specifies the routing layers used for the tracks.
Specifies the direction for the first track defined.
Value: Specify one of the following:
Specifies the number of routing layers to use for tracks.
The following example shows a callback routine with the type defwTrackCbkType.
The Units routine writes a DEF UNITS statement. The UNITS statement is optional and can be used only once in a DEF file. For syntax information about the UNITS statement, see "Units" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a UNITS statement.
Specifies the convert factor used to convert DEF distance units into LEF distance units.
The Version routine writes a DEF VERSION statement. The VERSION statement is required and can be used only once in a DEF file. For syntax information about the DEF VERSION statement, see "Version" in the LEF/DEF Language Reference.
This routine returns 0 if successful.
Writes a VERSION statement.
Specifies the major number.
Specifies the minor number.
Vias routines write a DEF VIAS statement. The VIAS statement is optional and can be used only once in a DEF file. For syntax information about the DEF VIAS statement, see "Vias" in the LEF/DEF Language Reference.
The VIAS statement must start and end with the defwStartVias and defwEndVias routines. All vias must be defined between these routines. Each individual via must start and end with the defwViaName and defwOneViaEnd routines.
For examples of the routines described here, see "Vias Example".
All routines return 0 if successful.
Starts a VIAS statement.
Specifies the number of vias defined in the VIAS statement.
Ends the VIAS statement.
If the count specified in defwStartVias is not the same as the actual number of defwViaName routines used, this routine returns DEFW_BAD_DATA.
Starts a via description in the VIAS statement. Each via in the VIAS statement must start and end with defwViaName and defwOneViaEnd. This routine must be used the exact number of times specified with count in defwStartVias.
Each via can include one of the following routines:
Specifies the name of the via. Via names are generated by appending a number after the rule name. Vias are numbered in the order in which they are created.
Ends a via description in the VIAS statement. Each via in the VIAS statement must start and end with defwViaName and defwOneViaEnd. This routine must be used the exact number of times specified with count in defwStartVias.
Writes a POLYGON statement for a via in the VIAS statement. Either a POLYGON, RECT, or VIARULE statement can be specified for a via. The POLYGON statement is optional and can be used more than once for each via in the VIAS statement.
Specifies the layer on which to generate a polygon.
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, to the y axis, or at a 45-degree angle.
Writes a RECT statement for a via in the VIAS statement. Either a POLYGON, RECT, or VIARULE statement can be specified for a via. The RECT statement is optional and can be used more than once for each via in the VIAS statement.
Specifies the layer on which the via geometry lies. All geometries for the via, including the cut layers, are output by the DEF writer.
Defines the via geometry for the specified layer. The points are specified with respect to the via origin. In most cases, the via origin is the center of the via bounding box.
Writes a VIARULE statement for a via in the VIAS statement. Either a POLYGON, RECT, or VIARULE statement can be specified for a via. The VIARULE statement is optional and can be used only once for each via in the VIAS statement.
If you specify this routine, you can optionally specify the following routines:
Specifies the name of the LEF VIARULE that produced this via. The VIARULE must be a VIARULE GENERATE via rule; it cannot refer to a VIARULE without a GENERATE keyword.
xCutSize yCutSize
Specifies the required width (xCutSize) and height (yCutSize) of the cut layer rectangles.
botMetalLayer cutLayer topMetalLayer
Specifies the required names of the bottom routing layer, cut layer, and top routing layer. These layer names 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 form one cut edge to 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 a ROWCOL statement in the VIARULE for a via. The ROWCOL statement is optional and can be used only once for each via in the VIAS statement.
numCutRows numCutCols
Specifies the number of cut rows and columns that make up the cut array.
Writes an ORIGIN statement in a VIARULE statement for a via. The ORIGIN statement is optional and can be used only once for each via in the VIAS statement.
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 an OFFSET statement in a VIARULE statement for a via. The OFFSET statement is optional and can be used only once for each via in the VIAS statement.
xBotOffset yBotOffset xTopOffset yTopOffset
Specifies the x and y offset for the bottom and top metal layers. These values allow each metal layer to be offset independently.
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, 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.
Writes a PATTERN statement in a VIARULE statement for a via. The PATTERN statement is optional and can be used only once for each via in the VIAS statement.
Specifies the cut pattern encoded as an ASCII string.
The following example shows a callback routine with the type defwViaCbkType.