Product Documentation
Design Data Translators SKILL Reference
Product Version IC23.1, November 2023

5


LEF/DEF Functions

This section provides syntax, descriptions, and examples for the SKILL functions associated with the LEF/DEF translator.

ldtrLefReadOA

ldtrLefReadOA(
t_fileName
t_libName
[ t_libPath ]
[ t_techName ]
[ t_techPath ]
[ g_overwriteTech { t | nil } ]
[ g_shared { t | nil } ] 
[ t_viewName ]
[ t_logName logName ]
[ t_layermapFileName ]
[ t_commentChar ]
[ t_templateFileName ]
[ t_pinpurp ]
[ t_textLayer ]
[ t_textHeight ]
[ t_techRefs ]
[ g_compress { t | nil }]
[ t_compressLevel ]
[ g_mapConflicts { t | nil }]
[ g_pnrLibDataOnly { t | nil } ]
[ g_useFoundryInnovus { t | nil } ]
[ g_useTextLayerFromPin {t |nil} ]
[ t_textPurposeName ]
[ g_keepOrigDisplayDrf {t |nil} ]
[ g_createFixedViaDefs ]
[ t_verilogStubFile ]
[ g_lockColorData { t | nil } ]
[ t_suffix ]
[ g_widthAndRatio { t | nil } ]
)
=> t / nil

Description

Reads the specified LEF file into an OpenAccess library. t_lockColorData is an advanced nodes only argument.

Arguments

t_fileName

Name of the LEF file to be read into the OpenAccess library.

t_libName

Name of the output OpenAccess library. If the output library does not exist, a new library is created in the current directory and contains the translated technology database and macros.

If the output library exists, it must contain a technology database or refer to the technology database of another library. In addition, any existing macros, if redefined in the LEF file, are overwritten and new cells are created for the new macros.

t_libPath

Complete path where the OpenAccess library is to be created.

t_techName

Name of the technology library that is to be created.

t_techpath

Path to technology library.

g_overwriteTech

Overwrite the existing technology file. Specify nil to update the technology file.

g_shared

Share the OA library with other applications while the current application is running.

t_viewName

View name for the translated macros. The default view name is abstract.

t_logName

Name of the log file for storing the error messages.

t_layermapFileName

Name of the layer map file. While creating layers, the layer numbers specified in this file are used.

t_commentChar

Special character that identifies comments in the LEF file.

t_templateFileName

Name of the template file that contains all the command options.

t_pinpurp

Purpose for pin geometries.

t_textLayer

Defines the text layer name to use for pin labels.

t_textHeight

Defines the text height to use for pin labels.

t_techRefs

List of libraries that contain master technology databases.

g_compress

Allow libraries to be compressed.

t_compressLevel

Define the compression level to use.

Default value: 1

g_mapConflicts

Map certain conflicts between incremental and base technologies to constraints and constraint parameter definitions.

g_pnrLibDataOnly

Filter the Place and Route information. The information can be stored only as incremental technology database on the top of existing referenced technology database. Therefore, the t_techRefs option needs to be specified. For more information, see General Processing Rules of -pnrLibDataOnly.

This option cannot be specified along with g_useFoundryInnovus option.

The g_pnrLibDataOnly argument works for 20 nm and larger designs. Cadence recommends using the g_useFoundryInnovus argument, instead.

g_useFoundryInnovus

  

Enables Innovus to see the same design rules that are described in LEF without impacting the Virtuoso tools. For more information, see General Processing Rules of useFoundryInnovus.

This option cannot be specified along with g_pnrLibDataOnly option.

g_useTextLayerFromPin

Specify the text layer name from pin.

t_textPurposeName

Specify the purpose name.

g_keepOrigDisplayDrf

Specify whether the original display.drf file is retained.

g_createFixedViaDefs

Enables creation of fixed via definitions.

t_verilogStubFile

Specify list of input Verilog files

g_lockColorData

Lock color data of all shapes created using the PORT and PIN definitions and are associated with a MASK construct.

t_suffix

Appends the specified suffix to the names of the standard constraint groups, LEFDefaultRouteSpec, LEFSpecialRouteSpec, and foundry_innovus. These suffixed constraint groups are then used during LEF In translation, instead of the standard constraint groups.

When you use this option, you can import the LEF file into different constraint group of existing technology without using -techRefs option.

g_widthAndRatio

Specifies whether values specified for the LEF MACRO pin property LEF58_ANTENNADIFFAREA should be translated as width and ratio.

The default is nil.

Value Returned

t

Returns t on successful execution of the function.

nil

Returns nil when the function encounters an error.

Example

ldtrLefReadOA("tech.lef macro1.lef macro2.lef macro3.lef" "techPlusDesignLib" "" "" "" nil nil "abstract" "" "layer.map" "" "" "" "" "" "" t "7" )

In the above example, four LEF files are read into the techPlusDesignLib library with compress option enabled and compress level set to 7.

ldtrLefWriteOA

ldtrLefWriteOA(
t_fileName
t_libName
[ t_cellNames ]
[ t_cellListFileName ]
[ t_viewNames ]
[ t_logName ]
[ g_noTech { t | nil } ]
[ t_version ]
[ g_techOnly { t | nil } ]
[ t_templateFileName ]
[ g_useFoundryInnovus { t | nil}]
[ g_lockedColorOnly { t | nil }]
[ t_suffix ]
[ g_widthAndRatio { t | nil } ]
)
=> t / nil

Description

Writes a LEF file from a specified OpenAccess library. t_lockedColorOnly is an advanced nodes only argument.

Arguments

t_fileName

Name of the LEF file to be created from the OpenAccess library.

t_libName

Name of the source OpenAccess library.

t_cellNames

Name of the cells to be translated as a macro. You can specify more than one cell name.

t_cellListFileName

Name of the file containing a list of cell names to be translated as macros. The cell list file contains the list of library names and cell names separated by a space. In a cell list file for Virtuoso design environment on OpenAccess 2.2 you do not need to specify the view name.

The cell names in a cell list file appear in the following format:

<libName> <cellName>

A sample cell list file is shown below:

   #libName          cellName
  designLib1        ACCSHCINX2
  designLib1        ACCSHCINX4
  designLib1        ACCSHCONX2

If you specify the cell names as well as a cell list file as arguments, then the cell list file is used. The specified cell names are ignored and a warning message is displayed.

t_viewNames

View names for the input cell names.

t_logName

Name of the log file for storing the error messages.

g_noTech

Specify t if you do not want to output the technology information.

t_version

Specify the version of LEF. Supported versions are 6.0, 5.8, 5.7, 5.6, 5.5, and 5.4.

g_techOnly

Output only the technology information and cell, cell list, and cell view options are ignored.

t_templateFileName

Name of the file that contains all the command options.

g_useFoundryInnovus

  

Output the foundry_innovus group constraint as a LEF LAYER LEF58 property.

g_lockedColorOnly

Output colors for only those shapes that have their locked state set to true.

This includes pathSegs in nets, rects and polygons, and fill shapes and vias in specialnets.

t_suffix

Appends the specified suffix to the names of the standard constraint groups, LEFDefaultRouteSpec, LEFSpecialRouteSpec, and foundry_innovus when searching for the standard constraint groups.

g_widthAndRatio

Specifies whether values specified for the LEF MACRO pin property LEF58_ANTENNADIFFAREA should be created as width and ratio from constraint.

The default is nil.

Value Returned

t

Returns t on successful execution of the function.

nil

Returns nil when the function encounters an error.

Example

ldtrLefWriteOA("out.lef.tech" "techPlusDesignLib" "" "" "" "" nil "5.4" t)

In the above example, a LEF file, out.lef.tech, is created from the techPlusDesignLib library.

ldtrDefReadOA

ldtrDefReadOA(
t_fileName
t_libName
[ t_libPath ]
[ t_cellName ]
[ t_viewName ]
[ t_techName ]
[ t_viewNameList ]
[ t_masterLibs ]
[ g_shared  { t | nil } ]
[ g_noRouting  { t | nil } ]
[ t_logName ]
[ g_useCustomVias  { t | nil } ]
[ g_overwrite  { t | nil } ]
[ g_createModHier  { t | nil } ]
[ t_commentChar commentChar ]
[ t_templateFileName ]
[ t_layermapFileName ]
[ t_techRefs ]
[ t_pinpurp ]
[ g_compress { t | nil } ]
[ t_compressLevel ]
[ g_ignoreDrcFill { t | nil } ]
[ t_userSkillFile ]
[ g_lockColorData { t | nil } ]
[ t_oaMapFile ]
[ t_alternateFoundry constraintGroupName ]
)
=> t / nil

Description

Reads the specified DEF file into an OpenAccess library. t_lockColorData is an advanced nodes only argument.

Arguments

t_fileName

Name of the DEF file to be read into the OpenAccess library.

t_libName

Name of the target OpenAccess library.

t_libPath

Complete path where the OpenAccess library is to be created.

t_cellName

Output cell name.

t_viewName

View name for the translated design.

t_techName

Name of the technology library to be attached to the output OpenAccess library.

t_viewNameList

List of view names for the master cells, which can be searched for the DEF COMPONENTS construct record.

t_masterLibs

List of reference libraries that contain master cells.

g_shared

Shares the input-output library with other applications while the current application is running.

g_noRouting

Specify t to ignore any routing data including the vias section.

t_logName

Name of the log file for storing the error messages.

g_useCustomVias

Create custom vias for all DEF vias.

g_overwrite

Overwrite the existing design in the target library.

g_createModHier

Specify this as nil to create only the physical data. No module hierarchy is derived from the DEF hierarchical names.

t_commentChar

Special character that identifies comments in the DEF file.

t_templateFileName

Name of the template file that contains all the command options.

t_layermapFileName

Name of the layer map file. While creating layers, the layer numbers specified in this file are used.

t_techRefs

List of libraries that contain master technology databases.

t_pinpurp

Purpose for pin geometries.

g_compress

Allow libraries to be compressed.

t_compressLevel

Define the compression level to use.

Default value: 1

g_ignoreDrcFill

Map all shapes specified with the +SHAPE DRCFILL tag in the SPECIALNETS section to the drawing purpose. If this option is not specified, such shapes are mapped to the gapFill purpose.

When lockColorData is specified, the ldtrDefReadOA SKILL function is incompatible with ICADV12.2 ISR6 and earlier versions. For more information, see example.

t_userSkillFile

Specifies a file that consists of user-defined SKILL routines.

g_lockColorData

Lock color data of all shapes created using the PORT and PIN definitions and are associated with a MASK construct.

t_oaMapFile

Uses the specified mapping file to post-process the design before it is saved.

For more information, see Using the oaMapFile option for different OpenAccess Database Formats in Design Data Translators Reference.

t_alternateFoundry

Uses the specified constraint group instead of the default foundry constraint group. Constraint group specified using this option, overwrites the name specified in the .cdsenv file using the AlternateFoundryCG environment variable.

Value Returned

t

Returns t on successful execution of the function.

nil

Returns nil when the function encounters an error.

Examples

Example 1

In the following example, three DEF files are read into the definLib library with compress option enabled and compressLevel set to 8.

ldtrDefReadOA("sroutes01.def sroutes02.def sroutes03.def" "definLib" "" "defCell" "layout" "" "layout abstract autoLayout route" "techLib techPlusDesignLib" t t "" t t t "" "" "" "" t "8")

Example 2

The following example shows how the code changes when t_ignoreDrcFill is specified in a code that already specifies t_lockedColorData.

In the following ICADV12.2 ISR6 or earlier version code, t is the 22nd value that specifies value for t_lockedColorData.

ldtrDefReadOA("defin.def" "lib" "" "design" "layout" "" "" "" nil nil "defin.log" nil nil nil "" "" "" "" "" nil "" t) 

From ICADV12.2 ISR7 onward, the function also supports t_ignoreDrcFill. Therefore, the code that previously specified t_lockedColorData will have to be changed. As you can see below, in the updated code, the 22nd value nil now specifies the value for t_ignoreDrcFill, and the 23rd value t specifies value for t_lockedColorData.

ldtrDefReadOA("defin.def" "lib" "" "design" "layout" "" "" "" nil nil "defin.log" nil nil nil "" "" "" "" "" nil "" nil t)

The updated code is incompatible with ICADV12.2 IRSR6 and earlier versions.

ldtrDefWriteOA

ldtrDefWriteOA(
t_fileName
t_libName
t_cellName
t_viewName 
[ t_logName ]
[ t_version ]
[ t_templateFileName ]
[ g_skipNoneOrViaCellType ]
[ t_mapDividerChar ]
[ t_dividerChar ]
[ t_busbitChars ]
[ g_outputFloatingShapes { t | nil } ]
[ g_warnOnNotPlacedInsts { t | nil } ]
[ g_skipPhysOnlyInsts { t | nil }]
[ g_gdsCompatible ]
[ t_userSkillFile ]
[ t_noDefOnError { t | nil } ]
[ g_lockedColorOnly { t | nil } ]
[ g_skipTrimShapes { t | nil } ]
[ g_skipTrimProductShapes { t | nil } ]
[ g_genBridgeMetalShapes { t | nil } ]
[ g_outputTrimSegsAsNets { t | nil } ]
[ t_maskShiftLayer ]
[ t_oaMapFile ]
[ g_skipTrimmedShapes { t | nil } ]
[ t_errorOnGrayShapes { t | nil } ]
[ t_errorOnUnlockedShapes { t | nil } ]
)
=> t / nil

Description

Creates a DEF file from a specified OpenAccess library.

Arguments

t_fileName

Name of the DEF file to be created from the OpenAccess library.

t_libName

Name of the source OpenAccess library.

t_cellName

Name of the cell to be translated.

t_viewName

View name for the cell name to be translated.

t_logName

Name of the log file for storing the error messages.

t_version

Specify the version of DEF. Supported versions are 6.0, 5.8, 5.7, 5.6, 5.5, and 5.4.

t_templateFileName

Name of the file that contains all the command options.

g_skipNoneOrViaCellType

  

Cells of type none or via will not be written in output DEF file.

t_mapDividerChar

Specifies a single character to be replaced in instance and net names by the DEF.

t_dividerChar

Specifies a new divider character to be used during output.

t_busbitChars

Specifies new busbit character pair to be used during output.

g_outputFloatingShapes

Outputs floating shapes into the SPECIALNETS section.

Floating shapes are shapes that do not have any connectivity information. All shapes on tsvMetal and padMetal layers that do not have any connectivity are also considered as floating shapes.

When specified during DEF OUT translation, any drawing shape on a layer, which is not a member of a net is exported on a net in the SPECIALNETS section named _FLOATING_DRAWING_SHAPES_RESERVED.

g_warnOnNotPlacedInsts

Adds warnings in the log file for the instances in the DEF Out output that have no placement status.

g_skipPhysOnlyInsts

Prevents output of physical instances. If this option is not specified, physical instances are placed in the DEF COMPONENTS section and have the + SOURCE DIST statement added to them.

g_gdsCompatible

Generates a DEF file with limits that make it compatible with GDS.

t_userSkillFile

Specifies a file that consists of user-defined SKILL routines.

t_noDefOnError

Prevents the DEF output file from being generated if there are errors during translation.

g_lockedColorOnly‘

Outputs colors for only those shapes that have their locked state set to true.

This includes pathSegs in nets, rects and polygons, and fill shapes and vias in specialnets.

g_skipTrimShapes

Prevents output of trim layers shapes into the FILLS section.

This option works only when the -outputFloatingShapes option is specified.

g_skipTrimProductShapes

Prevents output of trim product shapes into the SPECIALNETS section.

g_genBridgeMetalShapes

Outputs the trim gap fill shapes (bridge metal shapes) into the SPECIALNETS section.

g_outputTrimSegsAsNets

Outputs trim product shapes into NETS section.

Arguments t_skipTrimProductShapes and t_outputTrimSegsAsNets cannot set to t together.

t_maskShiftLayer

Specifies list of layers used in COMPONENTMASKSHIFT statement.

t_oaMapFile

Uses the specified mapping file to pre-process the design before it is exported to DEF.

For more information, see Using the oaMapFile option for different OpenAccess Database Formats in Design Data Translators Reference.

g_skipTrimmedShapes

Prevents output of trim layers shapes into the SPECIALNETS section.

This option works only when the g_outputFloatingShapes option is specified. ‘

t_errorOnGrayShapes

Displays errors if gray or uncolored shapes or vias are found during translation.

(Virtuoso Advanced Node for Layout Only) When the technology library contains preColoredLayers constraint and in the VirtuosoMPTSetup constraint group, the layers list from the first preColoredLayers constraint is not considered for error checking. Additionally, colorless layers and colorless LPPs are not considered for error checking.

t_errorOnUnlockedShapes

Displays errors if any colored shapes or vias with unlocked status are found during translation.

(Virtuoso Advanced Node for Layout Only) When the technology library contains preColoredLayers constraint and in the VirtuosoMPTSetup constraint group, the layers list from the first preColoredLayers constraint is not considered for error checking. Additionally, colorless layers and colorless LPPs are not considered for error checking.

Value Returned

t

Returns t on successful execution of the function.

nil

Returns nil when the function encounters an error.

Examples

Example 1

ldtrDefWriteOA("out.def" "definLib" "defCell" "layout" "defout.log" "5.6")

In this example, a DEF file, out.def, is created from the definLib library.

Example 2

ldtrDefWriteOA("out.def" "definLib" "defCell" "layout" "defout.log "5.8" "" nil "" "" "" t nil nil t t t nil)

In the above example, a DEF file, out.def, is created from the definLib library with boolean options t_allowFloatingShapes, t_skipTrimShapes, t_skipTrimProductShapes, and t_genBridgeMetalShapes set to t.

This example is valid only for ICADV12.3 ISR9 version. It is incompatible with older and newer versions of this function. Argument t_allowFloatingShapes, which was fifteenth argument in previous releases has been moved to twelfth place. Therefore, a block of code that already specified one or more of the following options will have to be modified to work correctly in ICADV12.3 ISR9:

Example 3

ldtrDefWriteOA("out.def" "definLib" "defCell" "layout" "defout.log "5.8" "" nil "" "" "" nil t)

In the above example, a DEF file, out.def, is created from the definLib library with Boolean option t_warnOnNotPlacedInsts set to t.

This example is valid only for ICADV12.3 ISR10. It is incompatible with the older versions of this function. Argument t_warnOnNotPlacedInsts has been added as the thirteenth argument. Therefore, a block of code that already specifies one or more of the following options will have to be modified to work correctly ICADV12.3 ISR10 onward:

Command-Line SKILL Functions

defoutPreTranslate

defoutPreTranslate(
lib
cell
view
)

Description

During DEF Out, this function is called just before the translation starts.

Arguments

lib

Contains the input library specified by the user.

cell

Contains the cell specified by the user.

view

Contains the view specified by the user.

Value Returned

None

Example

procedure( defoutPreTranslate( lib cell view )
 prog( ( )
   printf("In PreTranslate of defout") 
   printf("Library: %s\n" lib)
   printf("Cell: %s\n" cell)
   printf("View: %s\n" view)
    );prog
  ) 

defoutPostTranslate

defoutPostTranslate(
lib
cell
view
)

Description

During DEF Out, this function is called just after the translation is completed.

Arguments

lib

Contains the input library specified by the user.

cell

Contains the cell specified by the user.

view

Contains the view specified by the user.

Value Returned

None

Example

procedure( defoutPostTranslate( lib cell view )
 prog( ( )
 printf("In PostTranslate of defout\n")
 printf("Library: %s\n" lib)
 printf("Cell: %s\n" cell)
 printf("View: %s\n" view)
 );prog
 )

definPreTranslate

definPreTranslate(
lib
cell
view
)

Description

During DEF In, this function is called just before the translation starts.

Arguments

lib

Contains the destination library specified by the user.

cell

Contains the cell specified by the user or empty string if not specified.

view

Contains the view specified by the user or the default view layout is used.

Value Returned

None

Example

procedure( definPreTranslate( lib cell view )
  prog( ( )
   printf("In PreTranslate of defin\n")
   printf("Library: %s\n" lib)
   printf("Cell: %s\n" cell)
   printf("View: %s\n" view)
  );prog
) 

definPostTranslate

definPostTranslate(
lib
cell
view
)

Description

During DEF In translation, this function is called just after the translation is completed.

Arguments

lib

Contains the destination library specified by the user.

cell

Contains the cell specified by the user or empty string if not specified.

view

Contains the view specified by the user or the default view layout is used.

Value Returned

None

Example

procedure( definPostTranslate( lib cell view )
  prog( ( )
   printf("In PostTranslate of DefIn\n")
   printf("Library: %s\n" lib)
   printf("Cell: %s\n" cell)
   printf("View: %s\n" view)
  );prog
)

Return to top
 ⠀
X