You are on page 1of 59

DXL1701 OrCAD Capture to EDIF

Schematic Translator

User's and Reference Manual


V.10.01.99-O
The software programs described in this document are confidential and
proprietary products of Engineering DataXpress or its licensors. No part of
this document may be photocopied, reproduced or translated without the
prior written consent of Engineering DataXpress. This document and the
information contained in this document may not be transferred, disclosed or
otherwise provided to third parties.

This document is for informational and instructional purposes. Engineering


DataXpress reserves the right to make changes in specifications and other
information contained in this publication without prior notice, and the reader
should, in all cases, consult Engineering DataXpress to determine whether
any changes have been made.

The terms and conditions governing the sale and licensing of Engineering
DataXpress products are set forth in the written contracts between
Engineering DataXpress and its customers. No representation or other
affirmation of fact contained in this publication shall be deemed to be a
warranty or give rise to any liability of Engineering DataXpress whatsoever.

ENGINEERING DATAXPRESS MAKES NO WARRANTY OF ANY KIND WITH


REGARD TO THIS MATERIAL, INCLUDING BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.

ENGINEERING DATAXPRESS SHALL NOT BE LIABLE FOR ANY INCIDENTAL,


INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES WHATSOEVER
(INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT OF OR
RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF ENGINEERING DATAXPRESS HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.

The information in this document is intended for use with the releases of
OrCAD software that are specified in the manual text.

Copyright © Engineering DataXpress 1996-1999. All rights reserved.

Printed in U.S.A.
DXL1701 Schematic Translator Manual Table of Contents

TABLE OF CONTENTS
About This Manual............................................................................................i
Prerequisite Knowledge...........................................................................i
Manual Organization...............................................................................i
Related Publications...............................................................................ii
Overview.........................................................................................................iii
What is EDIF?.........................................................................................iii
What is the DXL1701?...........................................................................iii
Major Features of the DXL1701 Schematic Translator..........................iv
Requirements........................................................................................iv
Section 1 - The cap2edif Module.....................................................................1
Section Overview..........................................................................1
How Does cap2edif Work?............................................................1
What Does the Configuration File Do?...................................................3
Structure of the Configuration File.........................................................3
Export Design Dialog Box .....................................................................4
Section 2 – Capture to EDIF Schematic Writer................................................1
'Introduction: cap2edif'..........................................................................1
'Key Concepts: Capture and EDIF'..........................................................1
Libraries and Directories...............................................................1
Cells, Views, Symbols, and Schematics........................................1
Pins and Ports...............................................................................2
Parameters, Properties, and Attributes........................................2
Section 3 - How to Run the Capture to EDIF Translator..................................1
Section Overview...................................................................................1
Running Capture to EDIF........................................................................1
Getting Help On the Edit Window Arguments........................................2
Preparing Schematics to be Translated.................................................2
Selecting Input, Output, and Configuration Files...................................2
Default Configuration Files...........................................................3
Using Design and Translator Specific Configuration Files............3
Using Special Characters in the Configuration Files.....................4
Generating Binary EDIF Databases..............................................5
Producing Human Readable Output.............................................5
Selecting the Symbols and Schematics to be Translated......................5
Selecting Specific Files to Translate (Without Hierarchy).............5
Selecting Symbols and Symbol Libraries to be Translated...........6
Translating a Design Tree.............................................................6
Selecting Portions of a Design Hierarchy.....................................7
Expanding Schematics with Sheets or Multiple Symbols.............7
Translating and Using Libraries..............................................................8
DXL1701 Schematic Translator Manual Table of Contents

Translating a Symbol Library........................................................8


Referencing a Translated Symbol Library....................................8
Changing the Grouping and Naming of Cells and Libraries...................9
Changing the Name of Libraries...................................................9
Changing Cell, View, and Library Grouping..................................9
Setting the View Names.............................................................10
Outputting Convert Symbols......................................................10
Changing Cell Names and Pin Names.........................................11
Inhibiting Cells From Translation................................................11
General Purpose Name Translations....................................................11
Translating Complemented Names............................................12
Character and Substring Translations........................................12
Translating Prefixes and Suffixes...............................................13
General Number Notation...........................................................13
Translating Properties..........................................................................14
Changing the Name of a Property..............................................14
Outputting Properties as Parameters.........................................15
Inhibiting Property Translation...................................................15
Creating Numeric Properties and Setting a Unit Scale Factor....15
Creating Boolean Properties.......................................................17
Translating Property Values.......................................................17
Setting an Owner........................................................................17
Translating the Schematic and Symbol Graphics................................17
Creating a Title Block..................................................................18
Suppressing Junction Tie Dots....................................................18
Setting the Coordinate Units......................................................18
Setting a Scale Factor.................................................................19
Setting a Scale Factor By Matching Pin Grids.............................19
Translating Net Information.................................................................20
Translating Busses......................................................................20
Changing Net Names..................................................................21
Net Name Displays.....................................................................21
Specifying FigureGroup Names for EDIF Graphics......................21
Special Handling for Instances.............................................................22
Changing Instance Names..........................................................22
Translating Unnamed Instances.................................................22
EDIF Status Information.......................................................................23
Section 4 - Special Considerations for EDIF.....................................................1
EDIF Keyword Attributes........................................................................1
EDIF Attribute Subnames.......................................................................2
EDIF Unit Names....................................................................................3
EDIF Value Names..................................................................................4
Section 5 - cap2edif Command References.....................................................1
OrCAD Capture Files...............................................................................1
DXL1701 Schematic Translator Manual Table of Contents

Configuration Files.................................................................................1
Command/Configuration Options...........................................................1
Section 6 - cap2edif Error Messages...............................................................1
Status Messages....................................................................................1
Error Messages.......................................................................................1
DXL1701 Schematic Translator Manual About This Manual

About This Manual


This manual describes the DXL1701 OrCAD Capture to EDIF Schematic
Translator. The DXL1701 allows you to translate an OrCAD Capture
schematic into an EDIF 2 0 0 or EDI database file. EDI is the Engineering
DataXpress intermediate database.

Prerequisite Knowledge
This manual assumes that you are familiar with the concepts and
information listed below:

• OrCAD Capture

• MS Windows 95, 98 or NT Operating Systems

• MS Windows 95, 98 or NT file and directory structures

Manual Organization
The Overview section provides a general description of the DXL1701.

Section 1, The cap2edif Module, provides detailed information on how to


run the translator and the translator options.

Section 2, Capture to EDIF Schematic Writer, presents the basic


concepts you must understand in order to use the DXL1701.

Section 3, How to Run the Capture to EDIF Translator, provides step-


by-step instructions on operating the cap2edif translator.

Section 4, Special Considerations for EDIF, present special usage


instructions for EDIF.

Sections 5 & 6, Command References and Errors and Messages are


small reference guides, which aid in the use of the translator as well as
proficient troubleshooting.

October 1999 1
DXL1701 Schematic Translator Manual About This Manual

Related Publications
The following OrCAD manual contains important information on related
topics:

The OrCAD Capture for Windows User’s Guide contains basic


information and key concepts for using Capture.

In addition, if you need information on the MS Windows Operating System


command file manipulation concepts, you may want to refer to the following
manual:

MS Windows User’s Guide

October 1999 2
DXL1701 Schematic Translator Manual Overview

Overview
What is EDIF?
EDIF stands for Electronic Design Interchange Format, a data interchange
format designed to account for all types of electronic design information,
including schematic design, symbolic and physical layout, connectivity, and
textual information, such as properties.

EDIF was originally proposed as an industry standard by Mentor Graphics,


Motorola, National Semiconductor, Texas Instruments, Daisy Systems,
Tektronix, and the University of California at Berkeley, all of which
collaboratively embarked on its development. Since that time, EDIF has
been accepted by more and more companies. In 1987 it was approved as a
standard by EIA (Electronic Industries Association) and by ANSI (American
National Standards Institute) in 1988.

The proliferation of EDIF as an industry standard for exchanging electronic


design data will make it much easier to exchange electronic design data
between different systems.

To support the EDIF standard, Engineering DataXpress has created the


DXL1701 OrCAD Capture to EDIF Schematic Translator. The DXL1701 allows
you to translate an OrCAD Capture schematic into an EDIF file.

What is the DXL1701?


The DXL1701 OrCAD Capture to EDIF Schematic Translator consists of a
single module that allows you to perform the following task:

• Translate OrCAD Capture design schematics into an EDIF 2 0


0 file.

The name of the program performing this task is cap2edif. cap2edif takes
as its input schematics and symbols created with the OrCAD Capture
schematic system and creates as its output an EDIF file describing the
schematics and symbols. You can think of this program as the "write" or
"output" module in that it allows you to port your OrCAD Capture generated
designs to other systems.

October 1999 3
DXL1701 Schematic Translator Manual Overview

Major Features of the DXL1701 Schematic Translator


The following lists the major capabilities of the DXL1701:

• DXL1701 supports EDIF Version 2 0 0.

• DXL1701 can translate all schematic database concepts, which map


to EDIF level 0 out of the OrCAD Capture schematic system.

• DXL1701 can transfer a full design including symbols and


schematic pages; that is, the DXL1701 can transfer all levels of
design hierarchy.

• DXL1701 can transfer information in the "symbol only" mode. This


allows you to transfer symbol libraries.

• DXL1701 can transfer design data including connectivity objects,


properties, and graphics.

• DXL1701 allows you to control its actions through a configuration


file containing user-specified commands. This control includes the
translation of properties.

• DXL1701 allows sheets to reference symbols not defined in the


EDIF file, but which are readily accessible on the receiving system.

• DXL1701 provides useful warnings and error messages, allowing


you to debug your translation.

Requirements
For the DXL1701 program to work properly, please ensure the following:

• You must have Microsoft Windows 95/98 or NT

October 1999 4
DXL1701 Schematic Translator Manual The cap2edif Module

Section 1 - The cap2edif Module


Section Overview
The DXL1701 product contains the cap2edif program. This section describes
how this module operates and how the module uses its configuration file to
perform user-specified operations.

How Does cap2edif Work?


The cap2edif module of the DXL1701 translates schematics and symbols
created in the OrCAD Capture schematic system into an EDIF 2 0 0 file.

EDIF, or Electronic Design Interchange Format, is a standard intermediate


file format that is used to exchange electronic design information including
graphical schematics and symbols. The schematic and symbol files created
by the OrCAD Capture system are read and translated into EDIF. The
EDI/EDIF file can then be read into many other vendors' systems using the
EDIF readers supplied for each system.

In order to help tailor the translation process to accommodate the particular


requirements of a particular target system, users may provide options to
cap2edif in configuration files. The use of these options to perform
transformations on the data, as it is being mapped into the EDIF output file,
is described in detail below. This process involves the following elements:

• cap2edif Module

Execute cap2edif from within the OrCAD Capture environment.

• Input Schematic Database Files

The input schematic database files are produced by the OrCAD


Capture schematic system.

• The Configuration File

The configuration file is a text file that you create for specifying
commands which control the cap2edif operation. Though it is an
optional item, the configuration file is usually involved in a
translation.

October 1999 1-1


DXL1701 Schematic Translator Manual The cap2edif Module

Create the configuration file as you would any other text file,
entering the information you need. Then, when you run cap2edif,
specify the name of the configuration file you want to use.

• The EDIF file

The EDIF file is created when you run the cap2edif module. Each
Capture symbol creates a symbol in the EDIF file; each page of a
Capture schematic creates a page in the EDIF file.

The translation process is illustrated in Figure 2-1.

Figure 2-1 Creating an EDI/EDIF File with cap2edif

October 1999 1-2


DXL1701 Schematic Translator Manual The cap2edif Module

What Does the Configuration File Do?


You can use the configuration file to control what design information is
translated from your design file, and how it is translated. Within the
configuration file you can:

• Specify which property values in a design will be translated and


how they will be named.

• Define libraries.

• Control the translation of libraries and their name.

• Remove properties during the translation process.

• Control the storage of path in a library.

• Map Capture part declarations to an EDIF cell.

Structure of the Configuration File


You can place information in a configuration file in the form of commands,
which are simply one-line statements. You can also include comments in a
configuration file. Precede each comment line with a pound sign (#).

The configuration file can contain several types of commands including:

• Commands that specify data about a property for which EDIF has
its own standard name (called a keyword or attribute).

• Commands that specify data about a property for which there is no


standard name in EDIF attributes.

• Commands that specify system unit types and values for properties
and attributes.

• Commands that inhibit certain properties in a schematic design


from translating to the EDIF database file.

• Commands that store part definitions into a library.

• Commands that map Capture parts to EDIF cell declarations.

October 1999 1-3


DXL1701 Schematic Translator Manual The cap2edif Module

Export Design Dialog Box


You must have a Capture design selected before you can translate it. To
convert a Capture design database to an EDIF or EDI database file, select
File, Export Design. Then select the EDIF tab in the Export Design dialog
box. The dialog box will now have two edit lines and two Browse buttons:

Save As line
outdir / filename

A mandatory EDIF filename with an optional directory name


where the output file should be placed. If no directory is
specified, the file will be placed in the directory of the selected
design. If a file extension is .qdb, then an EDI database file is
assumed, otherwise an EDIF file will be assumed. The -libname
option described below will be used instead of the outdir
specification.

Configuration file line

Any of the configuration options listed in the “Command


References” section are allowed in the configuration file.

Note that brackets [ ] are used to indicate optional parts of arguments and
an ellipsis (. . .) indicates the argument may be repeated one or more times.
These should not be included in the actual command line of the edit window
or configuration file.

October 1999 1-4


DXL1701 Schematic Translator Manual Capture to EDIF Schematic
Writer

Section 2 - Capture to EDIF Schematic Writer


Introduction: cap2edif
This section describes the cap2edif program, which converts an OrCAD
Capture database file into an EDIF 2 0 0 or EDI database file.

The translation may be for a single Capture schematic or symbol file, or may
be a collection of schematics, schematic hierarchies, and symbol libraries.
The definitions for symbols referenced in schematic files may be translated
from the EDIF input file, or a reference may be made to symbol libraries,
which have been translated separately.

In order to select the files or design hierarchies and to help tailor the
translation process to accommodate the particular requirements of a
particular target system, users may provide options to cap2edif via
configuration files. Described in detail below is how to use these options to
perform transformations on the data as it is being mapped to the EDIF
output file.

Key Concepts: Capture and EDIF


This document makes references to terminology for both Capture objects
and EDIF objects. We assume users are familiar with either Capture terms or
EDIF terms, and the correspondence is explained here to avoid confusion.

Libraries and Directories

The Capture system makes use of groups of symbols and schematics called
libraries, which are mapped into file system directories. Within the EDIF file,
collections of cells are grouped together into libraries.

Cells, Views, Symbols, and Schematics

The Capture symbol and schematic are represented as one entity in EDIF,
typically as a cell with a symbol and contents. Within a cell, there can be
alternative views, which can be used for a variety of purposes. Typically
multiple views for schematic systems would be used to represent alternative
symbols (e.g. DeMorgan equivalents) for the same cell (schematic/gate).
OrCAD Capture supports two views for a part. These views are called the
“Normal” view and the “Convert” view. EDIF cells with a normal view and a

October 1999 2-1


DXL1701 Schematic Translator Manual Capture to EDIF Schematic
Writer

convert view will be grouped into OrCAD Capture parts with a normal and
convert view. Views with names other than “Normal” and “Convert” will be
mapped into “Normal” and “Convert” views if the pin names and connect
locations are the same, otherwise they will be mapped into separate OrCAD
Capture parts.

Pins and Ports

The Capture pins and I/O connectors called hierarchical ports are the nets,
which form hierarchical connections. In EDIF these are called ports. We may
use the name port and pin interchangeably.

Parameters, Properties, and Attributes

Most schematic systems including Capture represent these three terms as


synonymous, and these specify a means to associate a general string
name=value with a symbol instance, a net, or a schematic or symbol
definition. Capture usually calls these properties, and the Capture setup has
a means of defining the property names, which can be used.

In EDIF, the Capture property is most closely represented as an EDIF


property. There are some predefined values in EDIF, such as designator
which has a specific meaning and maps into the Capture property Part
Reference. These predefined values in EDIF are called keyword attributes,
and they have a special syntax defined.

EDIF parameters are a part of EDIF Level 1, which is not widely supported
(most systems use level 0). Some systems may require their properties to
be represented by EDIF parameters, so there is a way to map Capture
properties to EDIF parameters.

October 1999 2-2


DXL1701 Schematic Translator Manual How to Run cap2edif

Section 3 - How to Run the Capture to EDIF


Translator
Section Overview
This section describes how to run the OrCAD Capture to EDIF schematic
translator and tailor the translation by supplying configuration file options.
The options, which are documented in detail in the "Command References"
section, are presented here arranged according to solving specific tasks.

The cap2edif options described below may be placed in a configuration file.


The default configuration file, "cap2edi.cfg", is typically used to hold options
that are specific to the target system and specific to the conventions used in
the OrCAD Capture system.

Running Capture to EDIF


Below are instructions on how to translate an OrCAD Capture schematic or
library file into an EDIF or EDI database file, after launching your Capture
system:

1. Select a schematic or library file in OrCAD Capture.

2. Click File -> Export Design

3. Click on EDIF tab.

4. In the "Save As" line, type the name of what you wish to call the EDIF file,
or use the “Browse” button.

5. In the "Configuration file" line, type the location and name of the cap2edi
configuration file, or use the “Browse” button.

6. Hit the OK button.

7. There will be a file called cap2edi.log created in the same directory for
the design you selected for #1. Check this log file for errors and warnings.

8. Now you have a schematic EDIF 2 0 0 file.

October 1999 3-1


DXL1701 Schematic Translator Manual How to Run cap2edif

Getting Help On the Edit Window Arguments


A summary of configuration file options will be displayed in the OrCAD
Session log window by following the steps listed below:

1. Select a design in OrCAD Capture. (It doesn't matter which one since it's
not going to be translated.)

2. Click File -> Export Design

3. Click on EDIF tab.

4. In the "Save As" line, delete everything and type

-helpall

5. Leave "Configuration file" line blank.

6. Hit the OK button, ignore the warning pop-up window.

7. There will also be a file called cap2edi.log created in the same directory
for design you selected for #1, you can check that file as well.

Preparing Schematics to be Translated


Schematics and library files to be translated are created in the normal
manner using the OrCAD Capture editor.

Selecting Input, Output, and Configuration Files


A simple example of invoking the translator is:

Open cpu.dsn
Save As cpu.edi
Configuration file toMentor.cfg

Here, the file cpu.dsn is the OrCAD schematic file generated using Capture.
A list of schematic files could have been given and a library file may also be
explicitly included. The library files defined for Capture will be automatically
searched to locate the symbol definitions used in the schematics.

The “Save As” line specifies that the EDIF output will be placed in the
cpu.edi file in the current directory.

October 1999 3-2


DXL1701 Schematic Translator Manual How to Run cap2edif

The “Configuration file” line specifies a file containing other cap2edif


options, which may be required to translate this technology to a specific
system, e.g. Mentor. The translator also reads the default configuration file,
which is cap2edi.cfg in the current directory, or the file specified by the
environment variable CAP2EDICFG.

Default Configuration Files

The default configuration file read is determined by the setting of the


environment variable CAP2EDICFG. If this environment variable is not set,
then the file cap2edi.cfg in the current working directory is assumed. The
default configuration file is read even if other -c options are specified.

To specify a particular default configuration file, add the following line to


your AUTOEXEC.BAT file:

set CAP2EDICFG=C:\cap2edi.cfg

This example command causes cap2edif to read the configuration file from
the root directory on the C: drive rather than from the current directory. NT
users may use the environment systems menu under settings, control
panel.

Using Design and Translator Specific Configuration Files

For many people, setting a default configuration file in the root directory will
suffice. However, a more complex arrangement of the configuration files
may be useful for specifying options that change from design to design, or
which depend on the target system. The -c option can be used nested within
a configuration file to include common options in another file.

A target system specific configuration file, e.g., toMentor.cfg, could be


created to select options that tailor the translation process to the
requirements of the Mentor EDIF input. If this file is specified with the -c
option, a default configuration file can supply common options used at your
company. If the default configuration file is set to toMentor.cfg, then the line

-c c:\cap2edif\cap2edi.cfg

could be added within the file, toMentor.cfg, to include the common


options.

Some designs may require specific name translations or other special


mappings. These specific mappings can be put in a design specific

October 1999 3-3


DXL1701 Schematic Translator Manual How to Run cap2edif

configuration file. One way to do this is to use a cap2edi.cfg file in the


current working directory with the design files. This design specific
configuration file can then include other configuration files as needed. In
this case, because we want to use the current working directory as the
default location for the cap2edi.cfg file, the CAP2EDICFG environment
variable should be left undefined. Note that if the cap2edi.cfg file is not in
the current working directory, then an explicit -c command is required to
specify its location.

When name mapping options are used, it is useful to place all of these
design specific name mapping options into a separate configuration file
which could be included by the main configuration file. Since the names and
format of these options are identical for edif2cap and cap2edif, the same
configuration file can be used to translate into and out of Capture.

Another use for specific configuration files is building a production release


tape. A set of files can contain the options including the input and output
files for translations such as releasing a symbol library or packaging a
design tree.

Using Special Characters in the Configuration Files

If a string value for an option is to contain spaces, then the value must be
enclosed in quotes. Consider the example configuration file:

# Sample Configuration File


-pretty
-substr _B_ \
-dataorigin "ACE Widget Company"
-author "Robert \"Bob\" Widlar" # Comments here

October 1999 3-4


DXL1701 Schematic Translator Manual How to Run cap2edif

An option beginning with # indicates the remainder of the line is a


comment. The options may be placed across multiple lines. The \ character
may be used as a string in a configuration file, as shown in the -substr
option above. If a double-quote (“) character is to be used literally, then it
must be escaped with a backslash (\) character, as in the –author option
above.

Generating Binary EDIF Databases

When translating to another system that uses the Engineering DataXpress


EDI system, a binary .qdb database file can be used, which can improve
translation speed by eliminating the formatting and parsing of an ASCII EDIF
file. If the file type is .qdb, then a binary database will be assumed, e.g.,

Save As cpu.qdb

Producing Human Readable Output

Normally, the ASCII EDIF output files are only read by another translator, so
the output is produced in a compressed form with no indentation and extra
spaces removed. The output file written can be pretty printed with indented
parentheses using the option in the configuration file:

-pretty

Selecting the Symbols and Schematics to be Translated


The design files or symbol names specified as the first arguments to
cap2edif, or specified in a -t option, will be translated as a hierarchy. When a
library part is found, the schematic file associated with the library part will
be automatically included in the EDIF output. If the hierarchy should not be
expanded or only portions of the hierarchy should be expanded, then one of
the -i, -s, or -external options can be used, as described below.

Selecting Specific Cells to Translate (Without Hierarchy)

The schematics can be translated either as a hierarchical tree as shown


above, or as a set of explicitly specified cells. The -i option indicates that
only the symbols and schematics specified should be translated.

October 1999 3-5


DXL1701 Schematic Translator Manual How to Run cap2edif

For a simple case, the schematic power in the design cmoscpu.dsn can be
selected for translation with

-i cmoscpu.dsn/POWER

In addition, the symbols in the library search path, which are referenced in
the schematic files, will also be included (unless an external library is
specified in the configuration file).

With the -i option, the symbol and corresponding schematic will be


translated. For example,

-i lib.olb/cpu.Normal

specifies that the normal view of the cpu symbol will be translated. If the
schematic file name is found, then the schematic will also be translated
along with its referenced symbols, but the referenced symbols will not have
their schematics translated. File name and symbol name extensions are
required here.

Selecting Symbols and Symbol Libraries to be Translated

The -s option is similar to -i, except only the symbol will be translated and
the schematic will be ignored (unless specified in a -i or -t option). To
translate the symbol NAND2, use

-s nand2

Translating a Design Tree

The schematics in a hierarchical tree rooted at specified cells can be


translated as in the example,

-design cpu.sch

Here, not only will the cpu.sch schematic be translated, but also the symbols
which are referenced, and the schematics corresponding to those symbols in
the hierarchy. In addition, a “(design” form is added to the EDIF output file,
indicating the top cell in the hierarchy. The -design option is similar to the -t
option except that the cells specified in the -design at the top of the
hierarchy have a “(design” form added.

October 1999 3-6


DXL1701 Schematic Translator Manual How to Run cap2edif

Selecting Portions of a Design Hierarchy

The -design, -t, -i, and -s options can be used to select out portions of a
design hierarchy. The -design and -t file names specify files that are the top
level cells in a design. The hierarchy will start at these files and traverse
downward until either no referenced schematic is found or the cell is
identified in a -i or -s option. The -i option specifies that the schematic and
symbol will be written, however, no schematics for cells referenced in the
schematic will be written. The -s option specifies that only the symbol
definition will be written.

Consider the following example:

-t cpu.dsn -i cache -s alu

Here, the cpu.dsn file forms the top of a design tree that is to be expanded.
For each symbol used in the cpu.dsn schematic, the symbol is written to the
EDIF output and a check is made to see if a corresponding schematic exists.
If found and the symbol is not referenced in a -s option, then the schematic
will be translated. If the cell is not referenced in a -i option, then the
schematic will form a new tree top and the symbols used will be expanded
in a similar manner. In this example, the schematic for the cache symbol will
be written, but the schematics for symbols referenced in cache will not be
translated. The symbol for alu will be created, but the schematic will not be
output.

Expanding Schematics with Sheets or Multiple Symbols

In EDIF 2 0 0 there is no way to specify that a schematic should be


associated with more than one symbol. For convert symbols or multiple
occurrences of hierarchical blocks, the schematic referenced will be
duplicated under the contents section of the EDIF file. Each hierarchical
block occurrence is written as a separate symbol since the size and pin
positions can change. For hierarchical sheets, an exponential expansion of
schematics might occur.

Many input translators can associate symbols defined in multiple views


under a cell with a single schematic definition under one of the views. In this
case, the size of the resulting EDIF file can be substantially reduced by using
the -noaltviewsch option. If hierarchical sheets are used, this option is
recommended.

October 1999 3-7


DXL1701 Schematic Translator Manual How to Run cap2edif

Translating and Using Libraries


By default, the Capture libraries are mapped into separate libraries within
the EDIF output file. This grouping into libraries may be used by the target
system translator to group the incoming cells, or to transfer a separate
symbol library, which can then be referenced in schematic files.

Translating a Symbol Library

Most schematic systems use libraries of symbols, which represent basic


gates, ICs, and standard cells, and are referenced in many schematics.
Typically, a given technology, e.g. gate array family, has an associated
library which should be transferred to a target system before any
schematics are translated. To prepare a library for translation, first translate
only the symbols, e.g.

-s 74ls.olb cmoslib.olb

In this example, we assume that the OrCAD Capture symbol libraries are
represented by the two files 74ls.olb, and cmoslib.olb, which contain the
symbol definitions. The EDIF output file (74ls.edi) will contain two libraries,
each containing the symbols located in the corresponding libraries. The EDIF
library names will be the same as the library file names without an
extension, e.g. 74ls. The -libname option described below may be used to
change the name of the library in the EDIF file if the target system requires
a different library name.

The EDIF file created can then be used as input to an EDIF schematic
translator on the target system in order to build a corresponding symbol
library.

Referencing a Translated Symbol Library

After a symbol library has been translated, the schematics translated can
reference the already translated symbols, rather than include the symbol
definitions in the EDIF output. Typically, the default configuration file
identifies the libraries, which have already been translated, and contains a
line such as:

-external 74ls.lib cmoslib.lib

This specifies that the symbols found in the specified library files will not be
translated. Instead, their names are contained in an “(external” section of
the EDIF output file, which indicates to the receiving schematic translator

October 1999 3-8


DXL1701 Schematic Translator Manual How to Run cap2edif

that these symbols should already have been translated. The names
specified in -external option may be mapped by the -libname option, or may
represent the mapped EDIF name.

Changing the Grouping and Naming of Cells and Libraries


The default naming and grouping of cells into libraries works well for almost
all translations. There are several options described in the section "General
Purpose Name Translations", which allow the user to specify general
translations for restrictions in character sets, etc. For specific exceptions,
the name translation options given below may be useful.

There may be a need to regroup the packaging of cells, views and libraries.
One method is to use the library and cell name mapping options described
in the next section.

Changing the Name of Libraries

If the target system requires a specific library name in EDIF to represent the
cells defined in a Capture library, the name can be mapped as shown in the
following example:

-libname ttllib ”PARTS LIB”

In this example, the symbols for part definitions will be placed in the EDIF
library TTLLIB (the EDIF identifiers are converted to upper case).

By default, the schematic files specified as input to the translator which do


not have a corresponding symbol, are placed in the default library with the
same name as the output file, without the file extension.

Changing Cell, View, and Library Grouping

If the cells are not placed into the desired libraries, or if a few cells need to
be moved to different libraries, the -cellname option may be used to define
a particular cell mapping. Consider the following example:

-cellname cpulib/cpu cpu


-cellname cpulib2/cpu cpu2
-cellname ttllib/7400.D 7400
-libname ttllib /usr/local/Capture/lib/ttl.olb

The / (slash) character separates the library name from the cell name, and
the . (period) character separates the cell name from the view name. Note

October 1999 3-9


DXL1701 Schematic Translator Manual How to Run cap2edif

that the library name must be the name of an existing Capture library. In
the above example, the cell cpu will be placed in the EDIF library CPULIB,
and cell cpu2 will be placed in library CPULIB2 and will be called CPU. Cell
7400 is placed in view D (for DeMorgan equivalent) in cell 7400 of library
TTLLIB. The library or view is optional. A view should be specified for the
OrCAD name on library parts, and should be omitted on other symbols.

Setting the View Names

Normally the EDIF cell name corresponds to the symbol or schematic name,
and the view name will be Normal for library parts, otherwise 1. If the
receiving system requires another name, the -defaultview option can be
used to change all non-convert symbol view names, or the -cellname option
can be used on each symbol.

Outputting Convert Symbols

By default convert symbols are written out as an alternate view under the
same EDIF cell. The default convert view name may be set using the
-convertview option, and will be Convert if not specified. For example,

-defaultview symbol
-convertview demorgan
-cellname cpu.sym cpu
-cellname cpu.sym2 cpu2

will write normal symbols with the view name symbol, convert symbols with
the view name demorgan, except for cell cpu which will be output with a
view sym and symbol cpu2 which will be written as view sym2 under cell
cpu.

Some systems do not handle multiple views under an EDIF cell. For these
systems, convert symbols can be written out as a separate cell, with a suffix
added to the symbol name. For example,

-convertsuffix _D

specifies that a symbol with a convert definition such as 7400 will be written
as a pair of cells, 7400 and 7400_D.

October 1999 3-10


DXL1701 Schematic Translator Manual How to Run cap2edif

Changing Cell Names and Pin Names

The names of cells may require changing either to accommodate


restrictions in the target system, or to map from one library to another.
When symbols are mapped into a different library, the pin names may also
require changing. This can be done as illustrated in the following example:

-cellname LS00 7400


-cellname LS02 7402 A=1 B=2 C=3
-cellname I\/O_DRIVER IO_DRIVER

Here, the cell 7400 is mapped to LS00. The cell 7402 is mapped to LS02,
and Capture pins 1, 2 and 3 are mapped to EDIF ports A, B and C. Since the /
character is used to separate library names from cell names, the \ escape
character is required so that IO_DRIVER is mapped to I/O_DRIVER.

Inhibiting Cells From Translation

Sometimes it may be necessary to prevent a cell from being translated. For


example, the target system may not be able to process a title block or
graphic instance placed inside a schematic. In order to prevent a cell (the
symbol and schematic) and the corresponding instances from being
translated, the following option can be given,

-cellname (none) title1

Any instances of the title1 symbol will be omitted from the EDIF file, along
with the definition of title1. The special name (none) is recognized as
meaning do not translate the cell. Note that if a regular instance is omitted
using this option, the netlist connectivity will be modified.

General Purpose Name Translations


A set of configuration file entries may be used to specify generalized
translations for characters, which appear in the names of objects. Other
vendor systems as well as OrCAD Capture may not allow the use of certain
characters, which are supported on the target system. The translations
below apply to the EDIF names for library, cell, figureGroup, instance, net,
and property. If an explicit name is not specified with a -libname, -cellname,
-figurename, -instname, -netname, -attrname, -propname, or -paramname
option, then the Capture name is used with the character and substring
translations described below.

October 1999 3-11


DXL1701 Schematic Translator Manual How to Run cap2edif

Translating Complemented Names

Several options are available to define how names with a complement bar
are to be represented. In order to be represented in EDIF, the names must
be mapped into ASCII. By default, a \ character will be placed after each
complemented character, unless a -barcharformat or -barformat option is
used.

The receiving system may use a prefix or a suffix to indicate complemented


signals, or may use a prefix on individual complemented characters. The
-barcharformat option is used when the target system requires a prefix or
suffix character on each complemented character.

When a prefix and/or suffix on a complemented name is required, the


-barformat option can be used. If only a substring is complemented, the
-begbarformat, -midbarformat, and -endbarformat options provide a special
case where the complemented substring is at the beginning, middle, or end
of the name.

For details on these options, see the “Command References” section of this
manual.

Character and Substring Translations

Character translations into or out of Capture for identifier names can be


handled with a substitution. Suppose that the target system does not allow
a name like A&B, and we would like to change the & character into _AND_ to
get A_AND_B. Also, suppose that the system does allow a \ character, which
is not allowed in Capture pin names. We can create Capture names like
A__B, then map a double underscore to a \. The configuration file entries for
these examples would be:

-char & _AND_


-char !@# _X_
-substr __ \

The -char option translates any characters in the first argument into the
string specified by the second argument. The second line is equivalent to

-char ! _X_
-char @ _X_
-char # _X_

In the third line, the double underscore substring is translated into the
output string \.

October 1999 3-12


DXL1701 Schematic Translator Manual How to Run cap2edif

Since most systems cannot handle spaces in identifier names, there is a


default mapping of spaces to an _ character,

-char " " _

which can be overridden using the option,

-char " " " "

which maps a space to a space.

Translating Prefixes and Suffixes

Some systems have different conventions for prefixes or suffixes. For


example, Capture uses I and N prefixes for unnamed instances and nets,
respectively. Some users use a suffix of _N to indicate complemented nets.
Suppose the system to which we are translating requires a $ prefix on
unnamed instances and nets, and we want to translate a _N suffix to a ~.
The configuration file entries would be:

-prefix N $
-prefix I $
-suffix _N ~

Another option might be useful for removing the directory path prefixes in a
library name such as \path\path...\name. To remove the path parts and only
use the name part, use:

-trimprefix \

This option trims all characters to the left of a \ character, including the
backslash. Note that since this option applies to all identifiers, a backslash
should not be used in any other identifiers.

General Number Notation

When writing numbers in the configuration files, an integer or floating point


number may be used, optionally followed by a scale factor suffix. The suffix
consists of a single letter scale optionally followed by a comment string. The
scale is the standard power of 3 notation, f p n u m K M G for 1e-15 to 1e9,
and c for 1e-2. There is no letter which means 1. The following special
suffixes are recognized:

" inch

October 1999 3-13


DXL1701 Schematic Translator Manual How to Run cap2edif

in IN inch
mil MIL 1/1000 inch
ft FT Ft feet
aA Angstrom
gG Gram (.001 SI units)
Kg KG kg Kilogram (1.0 SI units)
lb LB Pounds
oz OZ Ounces
deg DEG Degrees of an angle (scale=pi/180)
mm MM Millmeters (1/1000 Meter)
degF DEGF Degrees Fahrenheit
degC DEGC Degrees Celsius

These suffixes are also processed when converting an attribute string into a
numeric value. If the value strings have a metric suffix, then the -units
values should be left in SI units. When converting an attribute string into a
number, the degF and degC suffix may be used and a conversion into
degrees Kelvin will be made. However, this conversion does not apply to the
scale factors in a -units temperature or units=temperature specification.

Translating Properties
By default, the Capture properties will be translated into EDIF properties
with the same names and will be output as string values.

Changing the Name of a Property

The name of the property created may be changed. For example,

-propname W FIELD1
-propname EDIFname Capturename

In this example, the Capture part FIELD1 will be output as the EDIF property
W.

October 1999 3-14


DXL1701 Schematic Translator Manual How to Run cap2edif

Outputting Properties as Parameters

Some systems might require Capture properties to be written as


parameters. In Capture, the property value associated with an instance
replaces a default value defined with a symbol. Technically, in order to get
this effect in EDIF, a parameter is required. However, very few vendor
systems support parameters. For those that support and require
parameters, the following could be used to create parameters:

-paramname val value

This will change the value property to the parameter val.

Inhibiting Property Translation

By default, all the properties found in Capture schematics are written to the
EDIF output file. Properties can be prevented from being automatically
written in one of two ways. First, if an option is present of the form,

-propname (none) TegasModel

then the attribute TegasModel will not be written. Second, if the option

-noallprops

is present, then only the properties with an explicit –propname,


-paramname , or -attrname will be translated.

Creating Numeric Properties and Setting a Unit Scale Factor

Normally, properties are written as a string value. EDIF allows properties to


be numeric, and allows a unit type to be added. For numeric properties, a
scale factor can be added to the translation process to convert between the
Capture units and the target units (usually metric in EDIF). The following
example illustrates numeric properties:

-propname delay delay units=time


-propname pin_delay PinDelay units=time:ps
-propname fanin fanin units=1
-propname netlen netlen units=distance:1.0um
-propname load SilosLoad units=capacitance:.2e-12
-attrname acLoad Cap units=1e-6
-units angle .01745329252 # Radians (for degrees)
# we could write -units angle deg

October 1999 3-15


DXL1701 Schematic Translator Manual How to Run cap2edif

-units capacitance pF # Farads


-units conductance 1mMho # Siemens (Mho)
-units charge 1 # Coulombs
-units current 1uA # Amperes
-units energy 1 # Joules
-units flux 1 # Webers
-units frequency MHz # Hertz
-units inductance mH # Henrys
-units mass g # Kilograms (grams in OrCAD Capture)
-units power 1mW # Watts
-units resistance KOhm # Ohms
-units temperature 1 # Degrees Kelvin
-units time 1.0e-9 # Seconds

For each of the -propname lines, the units=value specification indicates that
the property will be written as a number rather than a string. For the EDIF
keyword attributes, the type is already defined and the units xis only used
for a scale factor.

The -units option specifies the conversion from the units used in Capture
attributes to the SI (metric MKS) units defined by EDIF. For example, unless
a separate scale factor is found, capacitance is in picofarads, current is in
microamps, and clock speed is in MegaHertz. If a -units definition is not
supplied, then the SI units are assumed.

Normally, the -units distance value is not used since this applies to
coordinates as well as properties.

A units=name, units=scale, or units=name:scale may be placed on


-attrname, -propname, or -paramname option. If a name is supplied, then it
must match one of the EDIF units listed below, and the property is written
with an EDIF (units section added. If a scale is specified alone, then the
attribute value will be converted to a number and a scale factor applied. In
the fanin attribute above, the scale factor was 1 so the attribute would be
written as a number rather than a string. When name:scale is supplied, the
scale factor, which is always in SI units, overrides the units defined in the
-units option. For example, suppose we have a Capture attribute Cap=.01.
The Capture units for capacitance are picofarads whereas the Cap attribute
is defined to be in microfarad units.

October 1999 3-16


DXL1701 Schematic Translator Manual How to Run cap2edif

Creating Boolean Properties

A string attribute may be written as a Boolean property by setting Boolean


units as shown in the following example:

-propname OpenOK OpenOk units=boolean

When the string is converted to Boolean, most values will convert properly,
including the following:

true t T 1 on ON On high H Yes y Y YES non-null


false f F 0 off OFF Off low L No n N NO null space

Other interpretations may require an attribute value translation.

Translating Property Values

If the values for a property are a specific set of string values, then a string
replacement may be specified. For example,

-propname openok openok B=false A=true units=boolean


-propname level symboltype cell=2 block=2 component=0 \
gate=1 graphic=0 pin=0 master=0 ripper=0

specifies a mapping of A to true and B to false, and specifies the conversion


of the symboltype built-in attribute to a level number.

Setting an Owner

The EDIF (owner string) can be set as in the following example:

-propname W Width owner=spice units=distance:1um

Translating the Schematic and Symbol Graphics


The cap2edif translator has a number of options, which control the manner
in which the graphics on a schematic are translated. The target system may
require the coordinates to be in particular units or they may need to be
scaled. Also, some systems make special assumptions on the way title
blocks are written. Below is a guide to controlling these options.

October 1999 3-17


DXL1701 Schematic Translator Manual How to Run cap2edif

Creating a Title Block

By default, the translator will include the graphics and text forming the title
block. If this information is not required or not supported in the target
system, the information can be suppressed with the -noborder option.

Suppressing Junction Tie Dots

By default, each junction object will be written as a tie dot symbol instance
in the EDIF output. If tie dots are not required or not supported in the target
system, they can be suppressed with the -notiedots option.

Setting the Coordinate Units

When EDIF output is translated into some systems, the coordinate units or
schematic symbol sizes may be different. The problem may be due to the
units in which coordinates are written or the scale factor for the data.

When the EDIF data is created, the (x,y) coordinate locations are written as
a specific distance from the origin (0,0). The size of these distance units is
defined in terms of meters and is placed in the (technology section of the
EDIF file. Normally, an EDIF schematic reader should read the distance units
and then convert the incoming coordinates from meters to the internal
coordinate units of the target system. However, sometimes this does not
work properly, usually because the target system does not scale the data
properly. Some systems have unitless coordinates which do not have a
specific distance assigned. If the EDIF schematic reader cannot scale the
data properly, then the cap2edif translator must create the coordinates in a
form, which the target system can read properly. This can be accomplished
by a combination of adjusting the units and setting a scale factor as
explained below with the -units and -scale options.

By default, the distance values are written in units of mils. This allows
Capture coordinate units and English units of .001 inch to be written as an
integer value. Another resolution could be used by adding

-edifcoord .01in

to set the units to .01 inch.

October 1999 3-18


DXL1701 Schematic Translator Manual How to Run cap2edif

Setting a Scale Factor

If the target system does not use the Capture convention of a .1 inch pin
grid, the data can be magnified or shrunk as the schematic is written to
EDIF. Suppose that the target system uses a .25 inch pin spacing where
Capture uses .1 inch, and that a symbol .5 inch wide in Capture should be
1.25 inches wide after translation. A scale factor can be set with

-scale 2.5

Suppose the target system has a grid of .24 inch and the Capture grid is .1
inch with the symbol defined with a pin spacing of .2 inch. We could use a
scale factor,

-scale 1.2

to magnify the coordinates appropriately.

Setting a Scale Factor By Matching Pin Grids

Since the arithmetic required to calculate a proper scale factor in order to


match the pin spacing grid is somewhat complicated, there is a special
option which performs this calculation automatically. A typical Mentor
schematic has an internal grid of 1/250 inch and the pins are placed on a pin
grid of 60 units or 60/250=.24 inch. By specifying

-edifgrid .24in

option in the configuration file, the target system has a pin grid of .24 inch
and a scale factor should be computed which will be the closest to 1 which
will make the Capture grids be an even multiple of the target grid. If the
Capture grid is .1 inch then a scale factor of 0.8 will make 3 Capture grids
equal to the .24 inch target grid.

We can use all the scale factor options as in the following example:

-edifgrid .24in
-scale 2
-edifcoord .004in

Here, the pin grid scale is first matched as described above. The -scale
option provides an additional magnification by a factor of 2. Finally, the
-edifcoord option specifies the units of the EDIF coordinates to 1/250 inch
units.

October 1999 3-19


DXL1701 Schematic Translator Manual How to Run cap2edif

In order to aid in reading the schematics, the major grid used in Capture
schematics is written as a special (userdata section in the EDIF (technology
definition. This definition is automatically generated, and does not require
any configuration file options. If the Capture major grid is .1 inch the EDIF
output will contain:

(userdata GRIDRESOLUTION (integer 25400 25400))

assuming the default of -edifcoord .1um.

Translating Net Information


Several of the configuration file options are important to insure that all of
the net connectivity is translated properly. Typical problems may include
how busses are represented, and how global nets are handled.

Translating Busses

In EDIF, the busses are usually represented as a net with an array


specification. Unfortunately, busses like data[4:7] sometimes have problems
in translation since the EDIF array is always 0 to n-1, where n is the width of
the bus. In this example, the EDIF net array would have a width of 4, and
some systems might change the name to data[0:3].

Typically, the EDIF rename string contains the original name which contains
subscripts which can be parsed to reconstruct the beginning and ending
range. To convert busses into EDIF, the rename string is parsed and it is
assumed to be a list of names in the form

name[beg [:end] [, beg [:end] ... ]] [, ...]

where beg and end are a beginning and ending subscript range, and [ ]
enclose optional parts. The subscript bracket characters may be any of [({<
>})] with range separators :-;. A comma or space may be used to separate
names or subscript ranges.

If the bus name is too complex to be parsed properly, or the parsed width
does not match the EDIF bus width, the bus name can be translated as
shown in the next section.

October 1999 3-20


DXL1701 Schematic Translator Manual How to Run cap2edif

Changing Net Names

An individual net or bus name may be changed with the -netname option, as
needed. This may be useful for changing the names of global signals or
mapping complex bus names. Consider the example,

-netname GROUND GND


-netname data_4_7[0:3] data[4:7]
-netname alib/;ground agnd
-netname alib/pwr.1;ground gnd
-netname pwr_reg;ground agnd
-netname edifName CaptureName

Here, the Capture net GND is mapped to GROUND, except in cells in library
alib and the cell pwr_reg, which map from AGND. For the cell pwr in library
alib with view 1, the net GND is mapped to GROUND.

The bus data[4:7] which has a non-zero beginning subscript is mapped to


the simple name data_4_7[0:3] which is a 4 bit bus with a subscript starting
at 0.

The option is of the form -netname edifName CaptureName, where the


edifName may optionally qualify the library, cell, or view by specifying
library/cell.view;netname. The library/, cell, or .view can be omitted in which
case all libraries, cells, or views will be matched. If the name of the cell has
a / or . (period) in it , then these characters must be preceded by a \ in the
configuration file as in the following example,

-netname a\/b;gnd ground

Net Name Displays

By definition, a Capture net which is unnamed has no visible name location.


All other nets must have a display location, and if one is not present one
may automatically be added by the EDIF schematic translator. When this
occurs, a warning message may be printed so the user knows to edit the
schematic and determine if the name locations are reasonable.

Specifying FigureGroup Names for EDIF Graphics

Within the EDIF file, the graphics are organized by type and are called
figureGroups. The figureGroup is typically used to specify how lines are
drawn, e.g. color, width, linestyle, etc. as well as specify the use. The

October 1999 3-21


DXL1701 Schematic Translator Manual How to Run cap2edif

figureGroup names used in the EDIF file correspond roughly to the options
set in the Local Configuration menu for Capture.

If the target system requires specific figureGroup names for a particular


type of graphics or text, the names can be mapped as in the following
example:

-figurename net wire


-figurename bundle bus

Here, the default names wire and bus are mapped to the names net and
bundle.

Special Handling for Instances

Changing Instance Names

Like other schematic objects, instance names may be changed explicitly as


in the following example,

-instname dr datareq
-instname alib/;dr2 datareq
-instname alib/test.1;dr datareq
-instname test2;dr3 datareq

Here, the first line specifies the name datareq is changed into dr. The EDIF
name may be of the form library/cell.view;instname, where library/, cell,
or .view are optional in which case all libraries, cells, or views will be
matched. The other lines in the example, thus specify name dr2 for cells in
library alib except for cell test which is translated to dr. The instance name
datareq in cell test2 for all libraries will be translated into dr3.

Translating Unnamed Instances

In Capture, all the instances which do not have an instance name assigned
by the user will have a name automatically generated of the form U?A. The
-prefix option may be useful for changing this notation to a name which
matches the default names on the target system. For example, if the target
system has names of the form I$number, the names will be converted with

-prefix I$ I_

October 1999 3-22


DXL1701 Schematic Translator Manual How to Run cap2edif

EDIF Status Information


The (status section of the EDIF output file contains descriptive information
about the data contained in the file, such as the author, data origin, etc.
The following example sets the author of the design, the originating location
of the data, and the version for the data:

-author "Robert \”Bob\” Brown"


-dataOrigin "ACE Widget Corp."
-dataVersion "2.2G"

There is a default value for dataOrigin, which identifies the data as a


Capture schematic.

October 1999 3-23


DXL1701 Schematic Translator Manual Special Considerations for EDIF

Section 4 - Special Considerations for EDIF


This section contains a discussion of some special EDIF information
contained in the output files, which may also be relevant to the target
system translator. Also, the names used for EDIF objects are listed below.

EDIF Keyword Attributes


The following names are EDIF keywords, which may be added to a Capture
attribute value. These names are recognized as an edifname in the
-attrname option.

acLoad

author In the (status section

cell Automatically mapped from source package

criticality

dataOrigin In the (status section

dcFaninLoad

dcFanoutLoad

dcMaxFanin

dcMaxFanout

designator Automatically mapped from Part Reference


in symbols, Pin Number in ports

instance Automatically mapped from Name

netDelay

portDelay

program In the (status section

timeStamp In the (status section

October 1999 4-1


DXL1701 Schematic Translator Manual Special Considerations for EDIF

EDIF Attribute Subnames

October 1999 4-2


DXL1701 Schematic Translator Manual Special Considerations for EDIF

The following names may be used to select a single value in an EDIF


attribute with multiple values. These names will be recognized in the
-attrname edifname option as name.subname. Multiple subnames may also
be given where appropriate. The order of multiple subnames is arbitrary.

min The minimum of a miNoMax value

nom The nominal of a miNoMax value

max The maximum of a miNoMax value

calculated Delay values with a calculated derivation

measured Delay values with a measured derivation

required Delay values with a required derivation

load Delay per unit load on (portDelay

rise Timing from false/low/off to true/high/on

fall Timing from true/high/on to false/low/off

version Version string on (dataOrigin or program

date Date string in a (timeStamp

datetime Date and time string in a (timeStamp

time Time string in a (timeStamp

EDIF Unit Names


The unit names listed below may be used in the -units option, which provide
a default conversion for attributes in EDIF which have the corresponding
units defined.

Unit Name SI Units

angle radians

capacitance farads

charge coulombs

October 1999 4-3


DXL1701 Schematic Translator Manual Special Considerations for EDIF

conductance Siemens

current amperes

distance meters (this applies to X, Y coordinates as


well)

energy joules

flux Webers

frequency hertz

inductance henrys

mass kilograms

power watts

resistance ohms

temperature degrees Kelvin

time seconds

voltage volts

EDIF Value Names

The following value names are used in EDIF and may be changed in the
-attername, -paramname and -propname edifval=value option. Other
names may be used in properties which are system dependent.

true

false

unconstrained

undefined

October 1999 4-4


DXL1701 Schematic Translator Manual Command References

Section 5 - cap2edif Command References


To convert a Capture design database to an EDIF or EDI database file,
please refer to Section 3, How to Run the Capture to EDIF Translator.

OrCAD Capture Files


For the schematic and library file names specified as input, the .dsn or .olb
extension is required, and is used to determine the type of file. A directory
path is optional, and if not supplied the current directory will be searched.

Configuration Files
Options, which control the translation, may be placed in one or more
configuration files. The default configuration file, “cap2edi.cfg”, will be
processed first, followed by any configuration files specified within the
default configuration file. The name and/or location of the default
configuration can be changed by setting the environment variable
CAP2EDICFG. Another configuration file may be read by specifying the
location and name in the “Configuration file” line of the Export Design pop-
up window. An option given last may override the value specified by a prior
option.

In a configuration file, spaces, tabs, and newlines are all treated like spaces
to separate option names and arguments. If an argument contains spaces or
starts with a dash (-), then it must be enclosed in quotes ("). Quotes or
control characters can be escaped by preceding them with a \. If an option
begins with #, then it and the remainder of the line will be treated as a
comment and ignored.

Command/Configuration Options

-adjustdescent number

This option indicates that the origins for text with a lower justification should
be shifted down (or up if number is negative) by number times the font
height (prior to scaling) when writing to EDIF. If the target system reading
EDIF assumes lower justified text is at the bottom of the text bounding box,
and it uses a font which has a descent which is 20% of the textHeight, then

October 1999 5-1


DXL1701 Schematic Translator Manual Command References

an -adjustdescent .2 in the EDIF writer will lower the text as it appears in the
target system so the baseline of the text is at the original location. The
adjustment will be rounded to the closest OrCAD Capture grid unit,
typically .01 inch. In an EDIF reader, an -adjustdescent .2 will raise the
apparent location of text. Thus the same -adjustdescent option can be used
for an EDIF reader and writer interfacing to a particular external system.

-allprops

Specifies that all properties will be translated to EDIF. This option cancels a
-noallprops option given in the cap2edi.cfg file.

-attrname edifname Capturename [owner=name]


[edifval=Captureval ...] [units=val]

Similar to the -propname option but is used to specify the OrCAD Capture
attribute should be represented as an EDIF keyword.

-author name

Specifies the author name for the (status section.

-barcharformat string

Sprintf format for complemented character. This option may be used in lieu
of -barformat to specify a way to format individual complemented
characters. For example, -barcharformat "\%c" will cause a \ character to
precede each complemented character. If this option is supplied, then
-barformat must not be specified. The default is “%c\” unless one of the
-barxx switches is used.

-barformat string

Sprintf format for complemented signals. This is a C printf format string for
use in translating names which have a complement bar over them. The set
of adjacent characters with a bar are collected and passed to sprintf with
the specified format. For example, -barformat "~%s" places an ~ prefix in
front of the complemented characters, -barformat "%s_N" places an _N
suffix after the complemented name, and "<%s>" encloses the
complemented characters in < > characters.

-begbarformat string

Partially complemented name beginning with an overbar. Similar to


-barformat but this format applies only for a complemented substring at the

October 1999 5-2


DXL1701 Schematic Translator Manual Command References

beginning of the name. For example, -begbarformat "~%s_" may be used to


provide the ~ prefix, plus a _ suffix following the complemented substring. If
not specified, -barformat will be used.

-c filename [filename ...]

Include the options given in the configuration file(s) filename [filename ...].

-cellname edifname Capturename [portname=pinname...]

Specifies that a mapping of OrCAD Capture symbol or schematic names be


placed in cell names in the EDIF output file. The edifname argument is of the
form [library/]cell[.view]. If library and/or view is specified, then the name
mapping only applies to the specified library and view. If a -cellname option
is not specified for a cell, then the edifname and Capturename will be
assumed to be the same. The names of ports on the cell may be renamed
with the portname=pinname option, where portname is the EDIF port name
and pinname is the Capture pin name.

-char inchars outstr

Specifies that if any of the inchar characters appears in a Capturename, it


should be mapped into the string outstr when converting to EDIF. If inchars
or outstr contain special characters, they should be enclosed in quotes and a
\ used if needed. If outstr is (none), any inchars characters will be deleted.

-convertsuffix name

Specifies a cell name suffix for convert symbols. If the input translator does
not handle multiple views for convert symbols, the convert symbol can be
output as a separate name with the specified suffix.

-convertview name

Specifies the view name for convert symbols. This option allows the view
name to be set for convert symbols. Usually the view name Convert will be
used.

-dataorigin name

Specifies the (dataOrigin string used in the (status section of the EDIF file.

October 1999 5-3


DXL1701 Schematic Translator Manual Command References

-dataversion name

Specifies the version string supplied with (dataOrigin in the (status section
of the EDIF file.

-defaultview name

Specifies the default name for EDIF views. If not specified, the default view
name will be Normal for library parts, 1 for other symbols. Use this only if
the input translator (schematic reader) requires a different view name.

-d name name ...


-design name name ...

Specifies top-level cells for an EDIF design. This is similar to the -t option,
except an EDIF (design form will be defined for the names specified. Use this
when the input translator (schematic reader) requires a (design name form.

-displayname

If NOT specified, by default the display locations for names will be specified
on the rename string rather than the name as a whole. Some EDIF readers
do not interpret the name displays properly, and so this option moves the
display locations to the name as a whole.

-displayportclass

For the name displays of global ports (e.g. power and ground net names),
the ImplicitPortClass property display location is used in lieu of the port
name. This is required for Viewlogic, which does not handle global port
names properly.

-edifcoord number

Size in meters for the integer EDIF output coordinates. By default, the units
will be .001 inch, which is the internal unit for Capture.

-edifgrid number

Specifies a snap grid for the target system. A scale factor will be
automatically computed to match the Capture grid to the target grid. The
scale will be closest to 1, where the target grid is an even multiple of
Capture grids. The -scale option applies in addition to this option.

October 1999 5-4


DXL1701 Schematic Translator Manual Command References

-endbarformat string

Partially complemented name ending with an overbar. Similar to -barformat


but this format applies only for a complemented substring at the end of the
name.

-external name ...

Specifies libraries which should be written as (external libraries in the EDIF


file. Usually, the symbol libraries can be translated once using the -s option,
then referenced with -external in subsequent schematic translations. If this
option is not specified, the symbols referenced in translated schematics will
be translated and included in the EDIF output file.

-figurename edifname Capturename

Specifies a mapping of the EDIF (figureGroup names.

-fulllibrarypath

Specifies that the translator will output the full path name of all libraries to
EDIF. By default, only the file name is output and not the path name. This
option allows you to translate designs that reference parts with the same
name, in libraries with the same name, but the libraries have different
paths.

-help

Will print a summary of the basic commands and configuration file options.

-helpall

Will print a summary of all commands and configuration file options.

-i name name ...

Specifies one or more input cells to be translated, where name is of the form
library/cell.view, with library/, cell and .view optional. If the library, cell, or
view name is omitted, then all libraries, cells, or views will be assumed. Also
specifies that the schematics are to be translated without hierarchy
expansion. The specified schematics or a symbol with the corresponding
schematic will be translated, but no additional levels of the hierarchy will be
included. Use this option when the hierarchy should not be traversed.

October 1999 5-5


DXL1701 Schematic Translator Manual Command References

-instname edifname Capturename

Specifies a mapping of instance name between the Capture input and EDIF
output. The edifname value will replace the EDIF (rename string. The
edifname may be of the form library/cell.view;instance where library/, cell
and .view are optional qualifiers for the EDIF context for the mapping of the
instance. Capturename is of the form instance name.

-libname ediflib path/ Capturelib

Specifies a mapping between a Capture library name and an EDIF library.


The argument path specifies the input file path name for schematics and
symbols in the Capture library Capturelib.

-maxerr number

Specifies a limit on the number of errors permitted without terminating. If


not specified, no limit will be imposed.

-midbarformat string

Partially complemented name with an overbarr in the middle of the name.


Similar to -barformat but this format applies only for a complemented
substring in the middle of the name. For example, -midbarformat "_N_%s_"
provides an N_ prefix on the complemented substring with an _ substring
separator.

-netname edifname Capturename

Specifies a name mapping to be applied to a net. The edifname value will


replace the EDIF (rename string. The edifname may be of the form
library/cell.view;net where library/, cell and .view are optional qualifiers for
the EDIF context for the mapping of the net. Capturename is of the form
net name.

-netref

Specifies that the cap2edif translator performs additional semantic checking


on nets.

-noallprops

Specifies that only the names defined with a -propname, -paramname, or


-attrname option(s) will be processed. If not specified, all properties,

October 1999 5-6


DXL1701 Schematic Translator Manual Command References

parameters, and keyword attributes defined in the Capture source will be


added to the EDIF output file.

-noaltviewsch

If several symbols are defined for a schematic, for example with a sheet
part, then output the schematic only with the first symbol view. EDIF 2 0 0
technically requires the schematic to be duplicated for each different symbol
view. Use this option if the receiving system can find the schematic for a
symbol in the contents of a different view. For hierarchical schematics, this
option will make a huge difference in the size of the EDIF file.

-noborder

Inhibits translating the title block graphics and text.

-nodbprops

Inhibits translating Capture internal database properties on symbols and


symbol pins.

-nographicsym

By default, symbols with no pins are assumed to be of (viewType GRAPHIC


within EDIF, and instances of these cells will be placed within a
(commentGraphics section of EDIF. However, EDIF does not allow graphic
symbols to have properties and propertyDisplays. If your EDIF schematic
reader can properly interpret schematic instances with no pins, then this
option can be given to translate these symbols and retain the display
locations for property values as defined within Capture. This may be useful
for symbols such as title blocks where default property display locations and
values are defined in a title block symbol which has no pins.

-nopinpropdisplay

If the names of the pins in a symbol are not unique, then the EDIF port
name will be modified and the original name will be saved in a port property
called "ORIGINALPINNAME". If the names are visible, then the display
location for the Capture pin names will be specified as a propertyDisplay on
ORIGINALPINNAME. Some systems do not display port properties, so this
switch allows this fixed port property to be displayed as annotated text.

-nosemck

This option disables EDI semantic checking on the EDIF file.

October 1999 5-7


DXL1701 Schematic Translator Manual Command References

-nosynck

This option disables EDI syntax checking on the EDIF file.

-notiedots

Inhibits outputting of tie dot symbols to the EDIF file. This option may be
used to decrease the size of the EDIF file if tie dots are not required in the
target system.

-o name

Specifies the name of the EDI or EDIF output file. If a .qdb extension is
supplied, an EDI database will be written, otherwise an EDIF file will be
written. The default output file, name.edi, will be written in the current
directory, where name is derived from the first name found in a -design, -t,
-i, or -s option.

-paramname edifname Capturename [owner=name]


[edifval=Captureval ...] [units=val]

Similar to the -propname option, but specifies that the Capture attribute
should be represented as an EDIF parameter.

-pinlistdelim string

Specifies the string separating the pin numbers in the designator attribute.
If the
-viewlogic switch is specified, "," will be assumed. Otherwise, if not specified
" " (space) will be assumed.

-pinnumberlistprop name

Specifices the property name for pin number lists. For multiple parts per
package, the pin designators in the symbol are translated as a list of
numbers. If only one number should be used, the list of numbers can be
written separately as the specified property.

-pintopinnet

This option will output zero length line graphics for a net if there are
coincident pins connecting at a particular location.

October 1999 5-8


DXL1701 Schematic Translator Manual Command References

-prefix inprefix outprefix

Specifies that if the characters inprefix are found at the start of an identifier,
they will be mapped into outprefix. This translation could be used to map
the complemented net name character.

-pretty

Specifies that the EDIF output file will be pretty-printed with indentation and
parentheses.

-propname edifname Capturename [owner=name]


[edifval=Captureval ...] [units=val]

Specifies the mapping of part fields in Capture into EDIF properties. The
edifname argument is of the form [type/]name[.subname], where type/ is
the optional construct to which the attribute applies, one of cell or port,
name is a property name and .subname may optionally qualify the values
listed in the section “Special Considerations for EDIF” which represent a
structure. The Capturename argument is the name of a part field or value,
a property defined within the Capture system. If edifname is (none), then
the specified property will be ignored. If a -propname option is not specified
for a property, then the Capturename and edifname will be assumed to be
the same.

The optional owner argument may be used to specify an owner string. The
units argument specifies the conversion between Capture units and SI
(metric) units and is used to derive a scale factor for converting numbers.
The val may be a unit name, a scale factor, or unitname:scale. If a unit
name alone is given, the scale factor is derived from the -units option.
Otherwise, the specified scale factor will be assumed. The
edifval=Captureval argument allows a translation for Boolean or
enumerated types, e.g. true=1 false=0.

-s name name ...

Specifies symbols or symbol libraries to be translated. Use this option to


specify symbol names or symbol library files which should be translated
without referencing the schematic files. Name may be either a library file
ending in .olb, or may be the name of a symbol in a library specified as
library/cell[.view].

October 1999 5-9


DXL1701 Schematic Translator Manual Command References

-scale number

Specifies a scale factor applied to the Capture coordinates prior to


conversion. This option may be used to magnify or shrink the schematics
and symbols. For example, a -scale .5 option will cause the plotted output
from Capture to be half the size. By default, the coordinates are converted
to preserve the actual size in inches or centimeters, i.e. -scale 1.

-separator string

Specifies the string used to separate concatenated names. A unique name is


formed for cells with multiple views by concatenating the cell name, the
separator string, and the view name. The default is "_".

-sheetname1

Forces sheet names to be renamed to '1' for hierarchical symbols. This is


required for Viewlogic translators.

-subscrformat "[:],"

The characters in this option are used to format EDIF bus names. The first
character is the first character of the range suffix, the second character is
the separator between the beginning and ending range, and the third
character is the last character of the range suffix. The fourth character,
used for bus bundles, is not allowed in Capture; therefore it is not used
during translation.

-substr instr outstr

Specifies that if the characters instr are found anywhere in an identifier,


they will be mapped into outstr.

-suffix insuffix outsuffix

Specifies that if the characters insuffix are found at the end of an identifier,
they will be mapped into outsuffix.

-t name name ...

Similar to the -i option. Specifies trees of schematics to be translated. When


schematic file names are given in a schematic or sheet part, the hierarchy
will be traversed and the lower level schematics will also be included. Use
this option when the hierarchy should be traversed. If a library file is
specified, all symbols in the library will be included.

October 1999 5-10


DXL1701 Schematic Translator Manual Command References

-textscale number

Indicates that the EDIF text height is number times the system text height.
If number is less than 1.0, the text will be made smaller when writing to
EDIF. Consider this example. Suppose the text height is set to .10" in
Capture. If the target system interprets text height as the line-line spacing
(i.e. the point size of the font), then -textscale .6 converts the text height
to .06" in EDIF.

-tolower
-toupper

Normally, cap2edif considers all instance, net, etc. names to be case


sensitive. These options change the case conversion:

-tolower: converts all identifiers to lower case

-toupper: converts all identifiers to upper case

-trimprefix trimchars

If any of the characters in trimchars are found in an identifier, the character


and the preceding characters will be deleted. For example, -trimprefix "/\"
will change library names of the form /path/path/.../name so the path part
can be removed.

-trimsuffix trimchars

If any of the characters in trimchars are found in an identifier, the character


and all following characters will be deleted.

-units unitname value

Sets the scale factor for numeric units. A separate conversion applies to
each EDIF unit, unitname, one of the names in the “Special Considerations
for EDIF” section described earlier. The conversion defined by this option
provides a default per unitname which can be overridden by the
units=value argument on the -attrname command option. If no -units is
specified then the input numbers will not be scaled. See “Creating Numeric
Properties and Setting a Unit Scale Factor” in a previous section.

-viewlogic

Sets all the options necessary for producing EDIF output which can be read
by Viewlogic’s edif2vl2 schematic translator (reader).

October 1999 5-11


DXL1701 Schematic Translator Manual Command References

-vllibname

This switch causes all EDIF cells to include the form (userData libname. This
form is used by Viewlogic’s edif2vl2 schematic translator (reader) to put
parts in the correct libraries. Be sure to update the viewdraw.ini file with
the library alias names for each library before translating into Viewlogic.

October 1999 5-12


DXL1701 Schematic Translator Manual Errors and Messages

Section 6 - Errors and Messages


Status Messages
The cap2edif translator lists the files, which are being created in a message
of the form:

Translating schematic name


to library libname cell cellname view viewname page
schname.SCH

or

Translating <path>\<libname>.OLB symbol symname


to library libname cell symname view viewname

Error messages specific to the schematic or symbol file appear after these
lines.

The translator may be aborted after a specified number of errors have been
reached as in the example:

-maxerr 100

where execution will terminate after 100 error messages have been printed.

Error Messages
ERROR: Bad cell name name

There is a problem with the mapped EDIF name for a cell, which
should be of the form library/cell.view. Check the configuration file
options for an error in a -cellname.

ERROR: Duplicate definition for pin name in name

An attempt was made to define a port twice. A -cellname option


may have been used which mapped two pins to the same name.

October 1999 6-1


DXL1701 Schematic Translator Manual Errors and Messages

ERROR: Duplicate instance name name

Two instances on the same page have the same name name. The
second instance will be renamed to “nameX_number” where
number is 0 or greater.

ERROR: Improper -barcharformat string

The -barcharformat must be a valid C printf format string with a


single %c, indicating where the character is placed.

ERROR: Improper –barformat string

The -barformat, -begbarformat, -midbarformat, or -endbarformat


must be a valid C printf format string with a single %s, indicating
where the complemented string is placed.

ERROR: No symbols or schematics were translated

Something went wrong, and there was no data written to the EDIF
file. There was probably some error in the input specification.

ERROR: Page pageName has already been created

Two pages with the same name have been detected. The second
one will receive the name “A0”.

ERROR: Pin name mapped to rename cannot be found in cellname

A portImplementation can not be found for the specified pin. This


is an internal error. Please notify Engineering DataXpress if this
occurs.

ERROR: Symbol list overflow in library name

An internal cap2edif error has occurred. Contact Engineering


DataXpress.

ERROR: System Error: Figure group name is undefined

An internal cap2edif error has occurred. Contact Engineering


DataXpress.

October 1999 6-2


DXL1701 Schematic Translator Manual Errors and Messages

ERROR: Unable to find pin at x,y

The translator was unable to find a pin at the specified connect


location. This probably means that two parts were translated with
the same name and library name but different pin locations. Try
using -fulllibrarypath.

ERROR: Unable to find port symbol name


ERROR: Unable to find symbol view name

cap2edif was unable to find a symbol matching the name specified.

ERROR: Unable to get library libName

Cap2edif could not find library libName. If you are using the
-cellname option with a library/cell[.view] form, the library name
must specify a valid Capture library. Check the next line of the log
file for a Capture error message for more information.

ERROR: Unable to get package for part name

The package corresponding to a Capture part was not found. Check


the next line of the log file for a Capture error message for more
information.

ERROR: Unable to open file name

The translator was not able to find the specified input file.

ERROR: Unable to open output file name

The translator was not able to create the output file, usually either
because the user does not have write permission in the current
directory, or the file already exists and the user does not have
write permission.

WARNING: Input files name were not found

The specified input file was not found.

October 1999 6-3


DXL1701 Schematic Translator Manual Errors and Messages

WARNING: Instance name name duplicates schematic name

If the instance name of a hierarchical block with an attached


schematic duplicates the name of another schematic, a name
conflict will occur. This can be fixed by renaming either the
instance, or the schematic.

WARNING: Unable to find bus entry wire at x,y

WARNING: Unable to find bus end wire at x,y

WARNING: Bus entry not attached to bus

A bus entry was not properly attached either to a scalar wire or a


bus.

WARNING: Unable to find symbol pin for netsymbol name

The translator could not find a pin for the specified netsymbol.

WARNING: Unable to get package packageName for part partname in


library libraryName

The package corresponding to an EDIF instance was not found in


the specified library. Check the next line of the log file for a
Capture error message for more information.

October 1999 6-4

You might also like