home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Electronics for your PC
/
pcelectronics.bin
/
_archive
/
LASI515B.ZIP
/
CNVRTCIF.LHI
< prev
next >
Wrap
Text File
|
1996-05-20
|
22KB
|
491 lines
≡≡
Introduction
Introduction
TLC2CIF and CIF2TLC Conversion Utilities
----------------------------------------
Caltech Intermediate Form is a generalized way of transferring IC layout
information that was designed several years ago and has become a standard
used primarily by universities. It contains basic drawing items such as
boxes, polygons and cell (known as symbols). It is written in ASCII and
is therefore easy to read and is relatively forgiving in its file
structuring. CIF is particularly important because MOSIS cells are
distributed widely in the format. In fact, a small industry has grown up
around the format.
LASI's TLC can be converted with minor changes to and from CIF using the
two conversion programs CIF2TLC.EXE and TLC2CIF.EXE. Since originally
written, and with experience, the two programs have become more and more
clever in understanding the data structures used in CIF, and have become
more aware of the idiosyncrasies that CIF often contains due to its open
and general nature.
Converting TLC to CIF (TLC2CIF)
Conversion Files
You need to set the following file parameters:
■ Main TLC File Name. This is the name and path of the TLC file that you
want to convert. The extension ".TLC" will be added it is not included.
If the cell contains other cells, their TLC files must also be present
in the same directory.
■ Layer File Name. This is the name and path of a file that equates layer
numbers to layer names. It must contain CIF comment lines as follows:
<b0>(<b0>LAYER<b1>N<b1>[anychars<b1>]CIF="LNAME"[<b1>anychars]<b0>)<b0>;
N is the integer number of the layer LNAME (uppercase, 4 char. max.)
and square brackets "[]" indicate the item is optional.
If a CIF file contains layer comment lines, it can be used as the Layer
File. Include the extension in any Layer File Name.
■ CIF File Name. This is the name and path of the CIF file. The extension
".CIF" will be added. If left blank, the CIF file will take the name of
the TLC file.
Scale Conversion
You can control the grid of the CIF file with the following item:
■ CIF Grid in um. If you want to change the grid of the CIF file you can
enter a new CIF grid. If this entry is left blank, grid parameters for
the CIF file are calculated from the LASI scale.
A new CIF grid rescales the basic distance data and recalculates the
parameters of the CIF "DS" command. A CIF grid is always in microns.
When TLC2CIF runs, it displays a Scale Bar at the bottom of the screen.
This indicates the CIF grid that is being used, the LASI units that are
being used and the the Rescale Ratio, which is the ratio of CIF units
(1/grid) to LASI units.
To prevent roundoff errors, the Rescale Ratio should be an INTEGER.
Since CIF grids are by definition restricted to multiples of 0.01um,
TLC2CIF will snap the new grid to the nearest 0.01um before it changes
data or parameters.
If both the above requirements are not met, TLC2CIF will display a
warning, and will convert as accurately as it can.
For example, if LASI was drawn to 20 units/um, you can make the CIF grid
0.05um or 0.01um, anything else will convert but will not be exact. If
you convert with, for instance, a 0.02um grid, errors up to 0.005um will
be made.
Conversion Options
Set the following conversion options:
■ Cellname User Extension Digit. You can add User Extension Commands
(UEC) to the CIF file. A UEC starts with a digit 0-9. Cellnames will be
added after a "DS" command by putting a number in the Cellname UEC
Digit. This is usually "9".
■ Make Only Proper Poly. This permits checking for polygons that may not
produce shapes with area that are normally used in an IC or PC board.
If this switch is set to "Y":
∙ Boxes with any opposite sides superimposed (crushed boxes) will be
removed.
∙ Polygons with one vertex (single point) will be removed.
∙ Polygons with only two vertices (line segments) will be removed.
∙ Open polygons with more than two vertices will be closed.
∙ Acute angles in paths or poly (before and after closure) will be
reported.
Not Setting this will permit conversion of open line figures, such as
lines in a schematic. If set to "N":
∙ Crushed boxes will be reported but NOT removed.
∙ Single points will be removed.
∙ Line segments will be reported.
∙ Open Polygons with more than two vertices will NOT be closed, but
will be reported.
■ Include LASI Text. This automatically adds a UEC to the CIF file in a
standard LASI format. This is explained under Text User Extensions.
■ Change Paths to Poly. You can avoid using CIF wires completely by
changing paths to polygons that trace the path periphery. Paths
replaced by polygons will convert just as you see them on the screen,
without any dependence on whether the original path was inline or
extended. If you want to change paths to polygons, set Change Paths to
Poly to "Y". Note that once changed to a polygon, a path cannot be
translated back again from a CIF file.
■ Name of Report File or Printer. This allows you to print or save a
summary of any error flags that are found. The parameter must be one of
the printers "LPT1", "LPT2","LPT3","PRN" (=LPT1), the name of a file or
blank for no report. If left blank, the program pauses so that you can
read the error.
If a printer is named, and the printer is unavailable, the file name
"TLC2CIF.RPT" will be the default.
Path End Types
LASI paths will normally be converted to CIF wires. Paths that convert to
wires must be the EXTENDED type with ends that extend half the width
beyond the vertex point. In the TLC file records these are marked with a
negative width. TLC2CIF will check path width sign, and if positive it
will change the path type. If for some reason you want to prevent this
conversion add "/NOFIX" to the command line when you run TLC2CIF.
When a path type is changed, the end vertices are moved inward to the
nearest unit grid point that gives an end that extends GREATER THAN or
EQUAL TO the original distance. This insures that there will be a slight
overlap at the end of a path. However, it is recommended if you change
path types you should use CIF2TLC to reconstruct a layout to check
unusual or angled path ends.
Note: The LASI 5.1 drawing program now contains features that let you
easily change path end types. If you find that you have used the wrong
path types you can go back to the drawing and correct them.
Text User Extensions
If the TLC files contain text, the text can be converted if the following
are set:
■ Text Template No. and the Text Templates. If the TLC file contains
text, the text can be converted to CIF User Extension Commands using a
Text Template. You have a choice of 4 templates (1-4). These are
outlines for how data is to be written in the text UEC. You can edit
each one by entering the Text Template No. and modifying the Text
Template. A template begins with 1 or 2 UEC digits (0-9) and is
followed by data words in angle brackets "<>" separated by one or more
spaces. The data words expect a corresponding type of data in the UEC.
The data words are:
<text>= text string
<layer>= numerical layer (LASI text only)
<lname>= CIF layer name
<size>= text size (LASI text only)
<orien>= orientation (LASI text only)
<x>= x position
<y>= y position
The recommended templates for MOSIS and LASI text are:
MOSIS= 94 <text> <x> <y> <lname>
LASI= 99 <layer> <size> <orien> <x> <y> <text>
Notes:
1. An undefined template word writes literally to the text UEC.
2. The spaces are necessary and correspond to the spaces in the UEC.
3. If the text contains any spaces, this may cause reading problems
later.
4. <text> in the last position of LASI text can contain spaces.
5. Since LASI text carries more information, you might always want to
include it in the CIF file. Set the Include LASI Text switch to "Y".
Starting Conversion
When you are happy with the setup, press ALT-G or click "Go" to start
conversion. The main processes will be indicated as the program runs. A
count of the CIF command items will be displayed and will be written to
the report. It is a good idea to make a report for future reference.
If you have previously run TLC2CIF, there will be a setup file in the
drawing directory named TLC2CIF.SET. If this is found, the setup
parameters will be loaded when you first run TLC2CIF, and will be stored
again as you start the conversion. This saves a great deal of time when
running TLC2CIF since you only have to modify any parameters.
Important: It is not guaranteed that future versions of TLC2CIF or
CIF2TLC will have the same SET file format. If you see obvious errors
in the setup values, just erase the old SET file, run the program again
and modify the default values.
Errors and Warnings
Most errors are self-explaining. The warnings that TLC2CIF lists as it
converts are as follows:
"Resolution Lost ..." means that the CIF grid does not satisfy the
requirements for exact conversion from the LASI units that were used.
This is explained under Scale Conversion.
"Path End Extended at ..." means that a path did not have ends that
extend half the width beyond the end vertices, that is, it was not marked
with a negative width. The end vertices if the path were moved to give
the correct end types.
"Questionable Path End at ..." means that when changed to extended, two
vertices may be too close to make a correctly defined path. Note the
location and change it to an extended path on the layout.
"Possible Coincidence at ..." means that when changed to extended, two
vertices will coincide and the end extension direction will be ambiguous.
Note the location and change it to an extended path on the layout.
"Duplicate Vertex Removed at ..." means that two consecutive vertices in
a poly or path were found at the same location. One has been removed in
the final CIF file in the polygon or wire commands.
"Crushed Box (Removed) at ..." means that a box with opposite sides
superimposed was found (and not converted).
"Single Point Removed at ..." means that a poly or path with a single
vertex was found and not converted.
"Acute Poly/Path Angle at ..." means that a polygon or path was found
with an acute angle in it. Generally, acute angles indicate shapes that
may be hard to reproduce, or polygons or paths that have been folded back
on themselves.
"Poly Line Segment (Removed) at ..." means that a two vertex polygon was
found (and the line was not converted).
"Open Poly (Closed) at ..." means that the first and last points of a
polygon were not the same (and a new point was added to close the poly).
Note: The X=,Y= reported is always the first point of a poly or path or
the lower left corner of a box. L= is the layer
Converting CIF to TLC (CIF2TLC)
Conversion Files
You need to set the following file parameters:
■ CIF File Name. This is the name and path CIF file that you want to
convert. The extension ".CIF" will be added if it is omitted.
■ Cell File Name. This is the name and path of a file that relates CIF
symbol numbers to cellnames. Cell names can be related to CIF symbol
definitions numbers in two ways:
1. The Cell File can be used. It must contain CIF comment lines as
follows:
<b0>(<b0>#<b0>N<b1>CNAME<b0>)<b0>; (<bn>= n or more CIF blanks)
N is the symbol number of the cell CNAME in the CIF file. CNAME must
conform to DOS filename rules.
2. If the Cell File Name is left blank, CIF2TLC will search the CIF file
for a User Extension Command (UEC) containing a cellname that follows
a "DS" (symbol definition start) command. The UEC with the cellname
usually begins with the single digit "9". If a cellname exceeds 8
characters, it will be truncated to conform to DOS filename rules.
■ Layer File Name. This is the name and path of a file that equates layer
numbers to layer names. It must contain CIF comment lines as follows:
<b0>(<b0>LAYER<b1>N<b1>[anychars<b1>]CIF="LNAME"[<b1>anychars]<b0>)<b0>;
N is the integer number of the layer LNAME (uppercase, 4 char. max.)
and square brackets "[]" indicate the item is optional.
If the CIF file contains layer comment lines, it can be used as the
Layer File. Leave the Layer File Name blank to use the CIF file.
Include the extension in any Layer File Name.
■ Path of TLC Files. This is the path of the directory where you want the
TLC files to be placed. Leave this blank for the current directory.
Scale Conversion
You can control the scale of the TLC files with the following item:
■ LASI Scale Units/um. This is the number of LASI scale units that you
are using or want to use in your LASI drawing.
If the LASI Scale Units/um is left blank, the scale parameters for the
TLC files are calculated from the CIF grid. If you want to change the
scale of the TLC files you can set the LASI units.
As CIF2TLC converts each individual cell, it checks each dimension (CIF
"sinteger" data) for the least resolution (or coarsest grid) that will
fit that particular cell.
As it converts all cells, it determines the least resolution that will
convert ALL cells correctly, and displays it as the Minimum Feature size
along with the CIF grid and the LASI units in the Scaling Bar, at the
bottom or the display.
The minimum number of LASI units needed to convert ALL cells is the
reciprocal of the Minimum Feature.
For example, if the CIF file grid reads as .05 um/unit, but the Minimum
Feature size is read as 0.25um, you might want to downsize the basic data
so that each LASI unit will be 0.25um. You would set the LASI scale to 4
units in that case.
Any INTEGRAL multiple of the minimum LASI units will also be correct. In
the above example, you might want to set the LASI units to 20 (= 4x5).
This would allow for better drawing resolution in the future.
Note: Path widths (wires) in a CIF file should be drawn to HALF the
resolution to which position coordinates are drawn. If they are not,
you can have the situation where the path sides will be on half LASI
basic unit positions. LASI will tolerate this, but the sides will be
drawn on either higher or lower basic unit positions, or a path side
will be tilted between different basic units at either end. If this
happens you should DOUBLE your LASI Units.
Conversion Options
Set the following conversion options:
■ Cellname UEC Digit. The CIF file will usually contain a User Extension
Command (UEC) that gives symbol (or cell) names. The UEC starts with a
digit 0-9. This is usually "9" for cellnames, but can be changed in
rare cases.
■ Close Open Poly. Some CIF files may contain polygons that are implied
closed, that is, the first and last data points that do not coincide,
but it is expected that any software will fill in the last point to
close the polygon. LASI can have open or closed polygons because the
last point is always included. If you want CIF2TLC to close all
polygons, set this to "Y".
■ Make Inline Paths. CIF wires will normally be converted to EXTENDED
path types with ends that extend half the width beyond the vertex
point. These are marked with negative TLC path widths. If INLINE paths
that have ends inline with the end vertices and have positive widths
are wanted, set this to "Y".
When a path type is changed to inline, the end vertices are moved
outward to the nearest unit grid point that gives an end that extends
GREATER THAN or EQUAL TO the original distance. This insures that there
will be a slight overlap at the end of a path. However, it is
recommended that if you change path types you should inspect unusual or
angled path ends on the layout.
■ Make REF File. CIF2TLC lets you write a CELLS.REF file that contains a
list of all the cells created. This is the same as TLCOUT makes and is
very handy if you have a large number of cells and no main cell. The
file will be made in the directory where the TLC files are made. If you
want a CELLS.REF file set this to "Y".
■ Name of Report File or Printer. This allows you to print or save a
summary of any error flags that are found. The parameter must be one of
the printers "LPT1", "LPT2","LPT3","PRN" (=LPT1), the name of a file or
blank for no report. If left blank, the program pauses so that you can
read the error.
If a printer is named, and the printer is unavailable, the file name
"CIF2TLC.RPT" will be the default.
Text User Extensions
If the CIF file contains User Extension Commands for text, the text can
be converted if the following is set:
■ Default Text Size in um. If the CIF file contains text UEC, there may
be no text size attribute. This is the default size to use.
■ Text Template No. and the Text Templates. You have a choice of 4
templates (1-4). These are outlines for how data is arranged in the
text UEC. You can edit each one by entering the Text Template No. and
modifying the Text Template. The template begins with 1 or 2 UEC digits
(0-9) and is followed by data words in angle brackets "<>" separated by
one or more spaces. The data words expect a corresponding type of data
in the UEC command.
The data words are:
<text>= text string
<layer>= numerical layer (LASI text only)
<lname>= CIF layer name
<size>= text size (LASI text only)
<orien>= orientation (LASI text only)
<x>= x position
<y>= y position
The recommended templates for MOSIS and LASI text are:
MOSIS= 94 <text> <x> <y> <lname>
LASI= 99 <layer> <size> <orien> <x> <y> <text>
Text Notes:
1. An undefined word or an empty bracket causes data to be skipped.
2. The spaces are necessary and correspond to the spaces in the UEC.
3. If <text> is placed last in the UEC it will be read to a ";" and can
contain spaces.
Starting Conversion
When you are happy with the setup, press ALT-G or click "Go" to start
conversion. The main processes will be indicated as the program runs. A
count of the TLC objects will be displayed and will be written to the
report. It is a good idea to make a report for future reference.
Note: The counts show the actual number of TLC object records. The
(Vertex) count shows how many vertices will be needed when the TLC
objects are changed to internal LASI object records.
If you have previously run CIF2TLC, there will be a setup file in the
drawing directory named CIF2TLC.SET. If this is found, the setup
parameters will be loaded when you first run CIF2TLC, and will be stored
again as you start the conversion. This saves a great deal of time when
running CIF2TLC since you only have to modify any parameters.
Errors and Warnings
"Resolution Lost ..." means that the number of LASI Units per Phys Unit
was incorrect for the CIF grid. The number of LASI units may have been
too small, or the LASI grid may have been the wrong size to fit the CIF
grid exactly. The number given is the minimum number of LASI basic units
that are needed. This is explained under Scale Conversion.
"CIF File is Missing" indicates the CIF file is not in the path\directory
you have listed.
"Cell Info is Incorrect or Missing" indicates that the Cell information
could not be found in a separate file, or if you left the Cell File Name
blank the CIF file did not contain the correct User Extension Commands.
"Layer File is Missing or Incorrect" indicates that the file containing
layer names could not be located, or had incorrect format, and no layer
names were determined.
"CIF File has Too Many End Commands ..." indicates that more than one "E"
was found in the CIF file. This is considered illegal.
"Vertex Coincidence at ..." indicates that more than one vertex was found
on a path end and conversion to an inline path would be ambiguous. The
path was converted to inline but one or more ends may be short by half
the path width. Note the location and fix it on the converted layout.
Parameter Line Editor
Parameter Line Editor
Both programs now use a simple line editor that resembles the editor used
with Windows. The editor operates as follows:
■ To move from parameter to parameter, press the UP/DOWN ARROW keys,
(SHIFT)TAB, or click the mouse on a parameter.
■ Press PGUP/PGDN to move to the first or last parameter.
■ Press LEFT/RIGHT ARROW to move the text cursor left or right.
■ Press HOME/END to move the cursor to the beginning or end of a line.
■ Press BACKSPACE to erase a character to the left of the cursor.
■ Press DELETE to erase the character to the right of the cursor.
■ Press CTRL-BACKSPACE to completely erase a text line.
■ When you first select a parameter, typing DELETE or any printable
character other than SPACE or LEFT/RIGHT ARROW will replace the whole
text line.
■ If you make a mistake press ESC to restore the original text.