Stream to OpenAccess Translator (strm2oa)


Overview

You can translate Stream data to the OpenAccess database format using the strm2oa command-line executable. A destination library and a Stream file are required to begin a translation.

Command Syntax

strm2oa -gds file -lib library [Optional Arguments]

strm2oa translates the Stream file to the destination OpenAccess library. Use the -help or -h argument to display command-line help. The command-line arguments are described in the following table.

Required Arguments
-gds file Specifies the Stream file to translate. You must specify the complete path to the Stream file.
-lib library

Specifies the destination library for the Stream file contents. If the library does not exist, strm2oa creates it. For information about how the translator finds a library using the library definitions file, see How Translators Use Libraries.

Optional Arguments
-cell name Specifies the top-level cell to translate. If you want to stream in part of a design, specifying a topCell is one way to accomplish this.

If a translation creates more than one library, a cell named using this option is always in the library specified by the -lib option. See Note 2 for additional information.

By default, strm2oa translates all cells in the Stream file.
-cellMap file

Specifies the cell mapping file to use during translation. You must specify the complete path to the file. If you use the asterisk (*) character in the cellmap file in place of the library name, the translator searches all the reference libraries for the mapped cellname.

The format for the mapping file is:

<destination library name> <destination cell name> <destination view name> <stream structure name>

If you specify a cell mapping file, strm2oa creates stream structures and instances of that structure found in the map file as the destination library, cell, and view name specified. No case conversion is processed on these names. strm2oa translates stream structures and instances not found in the mapping file using the structure names in the Stream file.

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

Sample Cell Mapping File

#library name cell name view name stream name
des_lib nand2 layout nand2_1
sdes_lib nand2 layout nand2_2
des_lib cell_nu layout cell_nu
* cell_nu layout cell_new

Each stream name in the cell mapping file must be unique.

-convertPathToPathSeg Converts all orthogonal and diagonal paths to an oaPathSeg object for those paths that connect only two points. Paths that are neither orthogonal nor diagonal are not converted to oaPathSeg objects but imported as oaPath objects.
-dataModel dataModel value Specifies a dataModel value of 0, 1, 2, or 3, which determines the data model for the OpenAccess 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.

-dbuPerUU number Specifies the dbuPerUU value. The dbuPerUU value in the OpenAccess database is always explicity set when you use this option even if the supplied value is the same as the existing value in the database.
-detectVias Enables the automatic detection of standard and custom vias when a viaMap file is not available. If -techLib is used to specify a technology library, the physical layer material type and mask number specified in the tech database are used for detecting the via structures. Otherwise, the material type and mask numbers specified in the layermap file (using -layerMap) are used to detect the via structures. The translator can detect single and multicut vias as well as custom via structures. All references to a Stream via structure map to an oaStdVia instead of an oaDesign.

If you do not have a viaMap file and you do not use this option and provide the necessary information in the layerMap file, the translator produces many oaDesigns to represent the vias. This can adversely affect performance of both strm2oa and other applications running on the oaDesigns that are produced.
-DMAttributes attributeList 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:
    strm2oa ... -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.
-excludeMapToVia file

Specifies the via exclusion file to be used for via recognition during translation. If the –detectVia option is used, the GDS structures listed in the via exclusion file are not mapped to an oaStdVia even if they can be represented as an oaStdVia.

The via exclusion file contains one GDS structure per line. The wildcards ‘*’ and ‘?’ can also be used.

Blank lines and lines beginning with character # are ignored from the via exclusion file.

Sample Via Exclusion File

# List of structures to be excluded from via mapping

M1M2Wire                 # Do not map M1M2Wire to a via

M2M3Wire*              # Do not map cells starting with M2M3Wire to a via

-fontMap file

Specifies the font mapping file to use during translation. You must specify the complete path to the file.

The format for the mapping file is:

   <stream id> <OpenAccess font name> 

If you specify a font mapping file, stream font values found in the map file translate as the OpenAccess font name specified. Stream font values not found in the mapping file translate as defined by the following defaults:

  • Id 0 translates to a Fixed font
  • Id 1 translates to a EuroStyle font
  • Id 2 translates to a Gothic font
  • Id 3 translates to a Math font

Valid values for Stream Font Ids are 0, 1, 2, and 3.

Valid values for OpenAccess Font Names are EuroStyle, Gothic, Math, Roman, Script, Stick, Fixed, Swedish, and MilSpec.

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

Sample Font Mapping File

#stream ID OA font name
0 EuroStyle
1 Roman
2 Gothic
3 Script
-help | -h

Prints command-line help.

-hierDepth number

Specifies the hierarchical depth to translate to.
The default depth is 20.

-ignoreBoxes Specifies that Stream Box Records are not translated.
By default, Box Records are translated as rectangles.
-layerMap fileList

Specifies a quoted, space-separated list of one or more layer mapping files to be used during translation. You must specify the complete path for each layer map file.

The format for the map file is:

   <oaLayerName> <oaLayerPurpose> <gdsLayer> <gdsPurpose> [<oaMaterial> [<oaMaskNumber>]] [<Qualifier>]

If you specify a layer mapping file, strm2oa creates Stream objects on the layer and purpose numbers found in the technology library using the gdsLayer and gdsPurpose names specified in the map file. Stream objects on layer and type combinations not found in the map file are not translated.

If strm2oa cannot find the layer or purpose in the technology library, a warning message is issued, but strm2oa attempts to create it.

By default, if you do not specify a mapping file, stream layers and types translate to the names L<gdsLayer>, and P<gdsPurpose> respectively. If the layer name or purpose name is not in the technology library, strm2oa attempts to add it.

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

The oaMaterial, oaMaskNumber, and Qualifier fields are optional. However, an oaMaskNumber may only be specified if the oaMaterial is also specified.

Currently, no qualifiers are supported by strm2oa. The Qualifier field is used by oa2strm and future enhancements. Any qualifiers specified are ignored.

Note: You cannot specify the same gdsLayer/gdsPurpose type combination for multiple entries. If you do, an error is issued and the entry is ignored. When you are merging layers, if gdsLayer and gdsPurpose combinations match the same layer and purpose combinations in the database, a warning is issued.

If you use -detectVias, the oaMaterial and oaMaskNumber columns are used for automatically detecting via structures. However, if -techLib is used, and the technology library includes the material and mask numbers for the physical layers, the information in the technology library is used to detect via structures unless the material and mask numbers differ with the layer map file. If material and mask numbers differ, the technology library is updated with the layermap material and mask number information, and a warning is issued.

If you do not use this option to specify oaMaterial and the -detectVias option, and the design has many different vias defined as cellViews, the translator will produce many new cellViews, which can adversely affect performance of both strm2oa and other applications running on the oaDesigns that are produced.

Sample Layer Mapping File

# oaLayerName oaLayerPurpose gdsLayer gdsPurpose oaMaterial oaMaskNumber
  PImp drawing  13  13 pImplant  3
  Metal1 drawing  1  1 metal  6
  Via1 drawing  2  2 cut  7
  Metal2 drawing  3  3 metal  8
  Via2 drawing  4  4 cut  9
  Metal3 drawing  5  5 metal  10
  Via3 drawing  6  6 cut  11
  Metal4 drawing  7  7 metal  12
  Via4 drawing  8  8 cut  13
  Metal5 drawing  9  9 metal  
  Via5 drawing  10  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.
-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.
-logFile file

Specifies the log filename. If this option is omitted, the log filename defaults to strm2oa.log

-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.
-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.
-numCellsInLibLimit limit

Specifies the maximum number of cells that can be created in a library. If a limit value corresponding to this option is not specified, the maximum number of cells per library as supported by the DM system will be used. Specifying a limit that exceeds the maximum limit supported by the DM system will result in an error.

For example, the output library of FileSys data management system is limited to 20,000 cells to prevent exceeding UNIX limits on the number of files per directory.

When the number of cells for a library is exceeded, the translator creates additional libraries by appending an underscore and a number to the library name specified with the -lib option.

For example, if you specify:

strm2oa -lib GLib...

If the number of cells created in GLib exceeds the limit, strm2oa creates an additional library named GLib_n, where n starts at 1 and is incremented to create additional libraries as needed.

The name of the library directory is also modified in the same manner. For example, if the command includes:

strm2oa -lib GLib –libPath /data/lib/libGDS ...

When the number of cells in the first library exceed the limit, the second library is named GLib_1 and is created at /data/lib/libGDS_1. A new library and library directory is created each time the cell limit is exceeded.

The limit of cells in a library can be exceeded in certain cases. When translating an SREF or an AREF that cannot be characterized as an oaTransform class object applied to a cell (for example, if magnification is involved), strm2oa creates variants of the cell and all masters referenced from the cell. All the variants are placed into the same library, to ensure that the total number of cells in the library may exceed the specified limit.

When the translator creates multiple libraries, the cell named using the -cell option is always included in the first output library.

-overwrite Replaces an existing design with the translated data. If this option is omitted, any cell in the stream file that corresponds to a pre-existing oaDesign is silently skipped.
-propMap file

Specifies the property mapping file to use during translation. You must specify the complete path to the file.

The format for the map file is:

   <stream id> <object type> <destination property name>

If you specify a property mapping file, strm2oa creates Stream properties with id and object type combinations found in the map file using the property name specified. strm2oa creates stream properties on id and object type combinations not found in the mapping file with the name STREAM PROPERTY #<strmid>.

Valid objects types are: Dot, Line, Path, Polygon, Rect, Text, ArrayInst, and ScalarInst.

If you do not specify a mapping file, strm2oa interprets stream properties values as a list of properties separated by the property separator character with the form:

   <property name> = <property value>

For example, height=10,width=20 yields two properties, the first named height with a value of 10, and the second named width with a value of 20.

strm2oa creates all properties as oaStringProps.

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

Sample Property Mapping File

#stream Id object name
1 Rect instP11
2 Polygon poly1
3 Path sigName
4 Text pad32
5 Pin io_term
-propSeparator char

Specifies the property separator character used to interpret property records.

If you specify a property map file, strm2oa ignores the propSeparator argument. The default value for this argument is a comma.

-refLibs libList Specifies one or more libraries in which to search for master cells. You specify multiple libraries with a quoted, space-separated list. If you omit this option, the refLibs list contains the design and tech libraries.
-refLibList file

Specifies a file containing the list of libraries with cells referenced in the design. A library name in the file must match the library name in the cds.lib file.

If you do not use the refLibList argument, cells that are referenced in the Stream file but not defined are instantiated by name and remain unbound. If you specify a filename that does not exist, strm2oa issues an error.

-refViews viewList Specifies a particular view in which to search for leaf cells. You can specify multiple views with a quoted, space-separated list.

The default view list has a single view name: abstract.

refViews are searched in the order they appear on the command line. refViews are searched after the arguments for -refLib are searched. If no appropriate view is available, a stub module with the name of the first view name in the refViews list is generated for the leaf.
-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.
-techDMAttributes attrList Specifies a list of DM attributes to associate with each tech library that the translator creates.
-techDMSystem sysName DM system to use for the technology library, which is either oaDMTurbo or oaDMFileSys. The default is oaDMTurbo.
-techLib library Specifies the technology library to use during the translation. If the library does not exist, strm2oa creates it.
The default value for this argument is the destination library specified with the library argument.
-techLibPath path Specifies the path for the technology library. If not specified, the technology path defaults to the current working directory.
-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 template file containing arguments to strm2oa. 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

#strm2oa arguments for AC33
logFile strm2oa.abstract.log
view abstract
hierDepth 2
noOverwrite  
cellMap strm2oa.cell.map
toUpper  
fontMap strm2oa.font.map
ignoreBoxes  
layerMap strm2oa.layer.map
refLibList strm2oa.reflibs
propMap strm2oa.prop.map
propSeparator :
-textHeight value Specifies the text height for labels. If this option is not used, the text height defaults to the DBUPerUU value. For example, if the DBUPerUU value is 1000, the default textHeight is 1000 or 1 user unit.
-toLower

Specifies that strm2oa convert all cell and instance names to lower case. The toLower argument does not affect Stream structures found in the cell mapping file, if specified.
By default, strm2oa preserves the case.

The arguments toUpper and toLower are mutually exclusive. Specifying both arguments is an error.

-toUpper

Specifies that strm2oa convert all cell and instance names to upper case. This argument does not affect Stream structures found in the cell mapping file if specified.
By default, strm2oa preserves the case.

The arguments toUpper and toLower are mutually exclusive. Specifying both arguments is an error.

-toLowerLabel Converts labels to lower case.
-toUpperLabel Converts labels to upper case.
-viaMap fileList Specifies a quoted, space-separated list of one or more via mapping files that define which structures to recognize as customViaDef masters. You must specify the complete path for each via map file.

Custom Via Mapping File Syntax:
# Comment
# Blank lines are ignored
<Structure Name> <oaCustomViaDef Name> <Layer1 Name/Number> <Layer2 Name/Number>
Example Via Mapping File:
# Custom Via Master List for aDesign
via1 m1m2via m1 10 m2 20
via2 m2m3via m2 20 m3 30
-view view

Specifies the destination view name for the cells.
If you omit this option, the default destination view name is layout.

-v Prints tool, format, and library version information.
-version Prints tool and format version information.

Notes

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 namespace.

Handling Library Definitions File Errors

If your library definitions file has errors, or any of the referenced libraries cannot be opened, either an error message is generated and translation halted or, if the library is not required to complete the translation, translation proceeds without an error or warning. For more information about this behavior, see the Handling Errors in lib.defs Files section in the Programmers Guide chapter How Translators Use Libraries.

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 and for other names that refer to name-mapped OpenAccess objects, such as net and module names.

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.

In addition to the three standard elements, messages can also include two optional elements. An optional filename/line number element is included, when available, to more precisely identify the source of a problem or condition within the source data file. 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