DEF to OpenAccess Translator (def2oa)

The DEF to OpenAccess Translator imports a file in the DEF format into an OpenAccess design. DEF contains the design-specific information about a circuit. DEF to OpenAccess is available from the command line through the executable def2oa. A DEF file, and destination library, cell, and view are required to begin a translation.

Command Syntax

To run def2oa, enter the following:

def2oa -def file -lib library [Optional Arguments]

Use the -help or -h argument to display command-line help. The command-line arguments are described in the following table.

Required Arguments
-def file Specifies the DEF file to import into the OpenAccess database.
-lib library Specifies the name of the output library. If the library already exists, it must contain a technology database or refer to a library with a technology database. If the library does not exist, the library is created in the current working directory (unless -libPath is specified) and refers to the technology database of the library specified with the -techLib option. If the specified target library exists, the translator locates the library using the library definition file.
Optional Arguments
-cell cell Specifies the name of the output cell, which defaults to the name specified in the DEF file using the DESIGN construct if this option is omitted.
-commentChar char Identifies the comment character
-dataModel dataModel value Specifies a dataModel value of 0, 1, 2, or 3, which determines the data model for the OpenAccess database and determines how properties are mapped to the database. If this option is omitted, the default dataModel value of 1 is used unless the OA_DATAMODEL environment variable is set or a file named OA.DATAMODEL is found in the data directory of your OpenAccess installation hierarchy. See the discussion Specifying a DataModelRev for a Flow for more information.
-DMAttributes Specifies a list of DM attributes that are associated with every library that this application creates. Attributes are specified as name=value pairs. There must be no space on either side of the equal sign, two or more pairs must be space-separated, and the list must be enclosed in quotes. For example:
    def2oa ... -DMAttributes "name1=value name2=value name3=value"
-DMSystem sysName Specifies the DM system to use for the library, which can be any DM plug-in available to the user. The DM plug-ins included with OpenAccess are oaDMTurbo or oaDMFileSys. The default DM system is oaDMSystem, which automatically selects between oaDMTurbo or oaDMFileSys. Use of the oaDMTurbo plug-in is not recommended.
-help | -h Display usage information.
-libPath path Specifies the full path name (including the library name) for the library. Use this argument only if the library does not exist. If not specified, the library is ./<library>, where <library> is the value of the -lib argument.
-layerMap file Specifies the layer mapping file to use during translation. You must specify the complete path to the file.

The format for each line of the map file is:
   <layerName> <layerNumber> 
If you specify a layer mapping file, def2oa maps DEF objects found on the specified layerName to the specified layerNumber. The layerMap file is referenced during translation before looking up the layer names in the technology library. This permits mapping a layer name to a different layer name in the technology library. If a layer number does not exist in the technology library, an error is generated.

Lines in the layerMap file that are blank and lines beginning with the comment character (#) are ignored.

# Example layer map file
#layerName  	layerNumber
   Metal1        1 
   Via1          2
   Metal2        3
   Via2          4
   Metal3        5
   Via3          6
   Metal4        7
   Via4          8
   Metal5        9
   Via5          10
-libDefFile filename Specifies the lib.defs file to load. The path to the lib.defs file can be a full or relative path. If this option is omitted, the default search mechanism of the DM system is used to find and load the lib.defs file.
-logFile file Specifies the log filename. If this option is omitted, the log filename defaults to def2oa.log
-masterLibs library If you use this option, a warning is issued. This option is deprecated. Use the -refLibs option instead.
-masterViews masterViewName If you use this option, a warning is issued. This option is deprecated. Use the -refViews option instead.
-noInfo msgIds Suppresses the specified INFO messages. msgIds is a quoted, space separated list of numbers. Each number in the list represents the numerical portion of the ID for the message you want to suppress. None of the numbers in the list may be zero. Suppressed messages do not appear on the terminal or in the log file.
-noModHier Specifies that the translator does not create a module hierarchy based on hierarchical names of instances and nets in the DEF file. Instead, the translator escapes hierarchy delimiters in the names of instances and nets in the OpenAccess database. See Name Mapping in the Programmers Guide for additional information about hierarchy delimiters, escaping illegal characters, and the oaNameBase class to learn how hierarchical names are represented in OpenAccess. The default is to create a module hierarchy based on hierarchical names of instances and nets.
-noRouting Ignores any routing data during translation including the vias section. Note: routing rules (DEF5.6) will be parsed.
-noWarning msgIds Suppresses the specified WARNING messages. msgIds is a quoted, space separated list of numbers. Each number in the list represents the numerical portion of the ID for the message you want to suppress. None of the numbers in the list may be zero. Suppressed messages do not appear on the terminal or in the log file and are not included in the total of WARNING messages displayed in the summary. You can browse the list of error and warning messages to determine which you want to suppress.
-overwrite Replaces an existing design with the translated data. If this option is omitted, the default behavior is to update the existing library.
-refLibs libList Specifies one or more libraries in which to search for master cells. You specify multiple libraries with a quoted, space-separated list. By default, the refLibs list contains the design and tech libraries.
-refViews refLibraryViews Specifies one or more view names to search for master cells. You specify multiple views with a quoted, space-separated list. By default, the refViews list contains abstract. If you use this option, only the views you specified are searched.
-shared Allows other applications to access the output library while this application is running.
Note: The additional synchronization overhead required for shared library access can increase translation time.
-techLib library Specifies the technology library name to attach to the design library. Use this argument only if the design library does not exist. A library definition file is necessary to find the specified technology library name. The -techLib argument is required if the design library does not exist.
-techRefs parentTechs Creates an incremental technology database that derives from one or more of the specified parent technology databases.

Notes:
  • If the library being translated does not have a technology database, this option creates an incremental technology database that has references to the specified parentTechs.
  • If the library being translated already has a standalone technology database, this option converts that technology database to an incremental type that has references to the specified parentTechs.
  • If the library being translated has an attached technology database, that attached technology database must be included in the list of parentTechs, or the translator issues an error.
  • If the library being translated already uses an incremental technology database, the current references from the incremental technology database must be included in the specified parentTechs, or the translator issues an error. Additional references can be provided.
  • This option requires data model 3. If you use this option without setting the data model to 3 (by using the -dataModel option, the OA_DATAMODEL environment variable, or using the OA.DATAMODEL file), an error is issued and the translation stops.
For more information, refer to Incremental Technology Databases in the Using Technology Databases section of the Programmers Guide, and see also Specifying a DataModelRev for a Flow.
-templateFile file

Specifies a file containing arguments to def2oa. You can specify a template file instead of entering a string of arguments on the command line.

If you specify a template file, arguments on the command line have precedence over arguments specified in the file. So, if the same argument exists in the template file and in the command line, the translator uses the argument on the command line.

Specify arguments in a template file as follows:

  • Enter arguments in the template file without a dash (-) before the argument.
  • Enter each argument and value pair on a single line.
  • Separate the argument from its value using a space or a tab.
  • Designate comment lines with a # sign as the first character in the line.

Sample Template File

# def2oa command line arguments

logFile        mydef2oa.log
oaDMSystem     oaDMTurbo
overwrite
useCustomVias
-useCustomVias Specifies that the translator creates and uses oaCustomViaDefs instead of existing oaStdViaDefs for all vias in the def file.
-v Prints tool, format, and library version information.
-version Prints tool and format version information.
-view view  Specifies the name of the output view, which defaults to layout if this option is omitted.

Note: Command line arguments specifying library, cell, and view names are interpreted according to the Native name space. See Native Name Space in the Name Mapping article of the Programmers Guide for details about the native name space.


The following is an example of def2oa command line syntax:

    def2oa -def ac36.def -lib myDesignLib -libPath /db/myProject/cds/myDesignLib  \
    -cell myDesign -view layout -techLib ac36 -optimize -noModHier -useCustomVias

Updating an Existing EMH

If there is an existing design, def2oa attempts to fit the physical information into the existing embedded module hierarchy. def2oa attempts to find the logical equivalent of each object in the DEF file and append its physical information (such as routes, pin shapes, and so forth) to the design. Attempting to update an existing physical design produces duplicate shapes in the design and unpredictable results. To disable this update mode, use the -overwrite option, which causes def2oa to overwrite an existing design.

If there is no existing design, def2oa attempts to create the logical hierarchy based on the hierarchical names in the DEF file. To disable the creation of objects in the module domain, use the -noModHier option.

Soft-Matching

Some net names in the DEF file might not match the net names in the module hierarchy. This can happen in Verilog or DEF-only flows. If a net name in a DEF file cannot be matched to a net name in the module hierarchy, the translator attempts to create a match by finding the first instTerm on the net.

Error Handling

If an error occurs during translation, usually the translator can emit a warning or error message and continue. However, certain translation errors halt further translation. The manner in which translation errors are handled depend on the type of error.

DEF Update Mode

When annotating physical information into an existing logical design, any object in DEF that has no logical equivalent produces a warning, and translation continues with the next object. In particular:

Handling of Physical-only Objects

Physical-only objects are treated differently. No corresponding object is created in the module domain for physical-only objects, and therefore, a subsequent export to Verilog does not include the physical-only objects. Also, when using def2oa to annotate physical information into an existing logical design, these objects are created in the block domain even though a logical equivalent does not exist. Certain DEF objects are considered physical-only. These occur in the following constructs:

How the Translator Uses Namespaces

A namespace is a set of rules that define the legal characters and determine how names are interpretted. This translator uses the oaNative namespace to interpret library, cell, and view names in the command line. Other names that refer to name-mapped OpenAccess objects, such as net and module names, use the DEF namespace.

Merging Verilog and LEF/DEF Information

If you need to merge Verilog and LEF/DEF information, you must follow a particular sequence of steps. Refer to the verilog2oa documentation and the section Creating a Design by Merging Verilog and LEF/DEF Information for the steps you must follow.

Error and Warning Message Format

Translators emit messages that report translation progress, report warnings about unusual data or conditions, or report problems with files or data that caused partial or complete translation failure. These messages are written to a log file so you can review translation status, identify error and warning conditions, and consider whether additional actions are needed.

OpenAccess translators use a standard message format to ensure comprehensive and consistent messaging. This message format consists of three elements, which are: message type keyword, message prefix, and message text. The message text can be further divided into three parts. The first part indicates what caused the message, the second indicates the consequence of the problem or condition, and the third part suggests an action you can take to remedy the problem or condition.

In addition to the three standard elements, messages can also include two optional elements. An optional filename and optional line number element are included, when available, to more precisely identify the source of a problem or condition within the source data file. When present in an error or warning message, the filename and line number correspond to the location of the last line parsed for the object, and therefore, the cause of the error or warning can occur on a line preceding the indicated line number. A context string is another optional element that is included, when available, to identify the type of data object that caused the message to be emitted. The following example shows a typical error message that includes the optional filename and line number element.

    ERROR: (OALEFDEF-50004): file.lef(123): A cell was not specified. Translation was terminated. 
    You must specify a cell.

One benefit of this message format is that it allows you to sort, filter, and examine only those types of messages that interest you. The keyword at the start of each message is either ERROR or WARNING and is always all uppercase. The message prefix identifies the translator family and the specific message source within the translator. The message prefix is a stable value that will not change between versions even when the message text gets updated. This makes it suitable for routine sorting and filtering.

If you seek assistance for resolving an issue related to a translator error or warning message, be sure to retain the message type keyword (ERROR or WARNING), and retain the message prefix to identify the translator family and the message source. Also make note of the filename/line number and context information if these are included in the message.

Return to top of page