home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Electronics for your PC
/
pcelectronics.bin
/
_archive
/
LASI515B.ZIP
/
CNVRTGDS.LHI
< prev
next >
Wrap
Text File
|
1996-05-20
|
30KB
|
638 lines
≡≡
Introduction
Introduction
TLC2GDS and GDS2TLC Conversion Utilities
----------------------------------------
LASI drawings are not very useful if they cannot be converted to a
commonly used CAD format, for mask generation or for transfer to another
CAD system. The most common is formally called Calma Stream Format, which
is also know as GDSII (Graphic Design System II), or just GDS. Although
Calma drawing systems for ICs have become pretty obsolete, the data
format survives, and most pattern generators accept it, and newer CAD
systems such as CADENCE or MENTOR can usually convert it. LASI can be
converted to GDS Format exactly, and from GDS with some limitations.
LASI has a drawing structure that is very similar to the Calma drawing
system, with the exception that LASI has box objects and is more limited
in its data capacity and cell nesting depth. With LASI, cells are similar
to Calma structures, except that a certain rank is given to a cell. With
LASI there are no Calma boundary items, instead there are zero width
paths usually called poly. LASI drawings transform easily into GDS
because a box can be made into a boundary, a poly can become a boundary
also, a path can transform directly into a path, and cells can easily
become structures.
Since there can be more or less an infinite number of TLC files, a GDS
file with almost any number of structures can be converted to TLC files.
The TLC files can then be selectively converted into LASI drawings.
Likewise, a large collection of TLC files can be selectively converted
into a GDS file.
TLC2GDS.EXE is a program that converts a LASI drawing in TLC file format
into Calma Stream Format. The file generated by TLC2GDS may be put on
magtape, or more likely, be put on a floppy disk (in MS-DOS file format)
for reading by pattern generators or work stations that have MS-DOS
floppy reading capability.
The GDS2TLC.EXE program will read back a GDS file and will construct a
LASI drawing in TLC form as best as possible. A drawing first done on
LASI will reconstruct exactly if returned from another drawing system
without having been modified in some non-compatible way. Drawings made
originally on other systems may occasionally convert differently, since
LASI presently doesn't have such things as datatypes, texttypes, arrays
or layer 0.
Converting TLC to GDS (TLC2GDS)
Page 1 - Conversion Setup
Normally run TLC2GDS.EXE in the drawing directory of the drawing to be
converted.
TLC2GDS will start with the Conversion Setup page. It requires the
following entries:
■ Main TLC file to be Converted. This is the TLC file that contains the
main cell and references to any other lesser cells that may be used in
that cell. It will automatically have the extension ".TLC".
■ Name of the GDS File to Make. This is the name that you want for the
stream format file. You can add an extension other than ".GDS", but if
you don't add an extension, ".GDS" will be added. If you leave this
entry blank, it will be given the name of the main TLC file with the
extension ".GDS".
■ GDS Drawing Library Name. This is the name to be included in the
converted GDS file. This is usually for reference, since many
applications don't require this name.
■ Physical Units (um or mil). This is name of the units in which the
drawing has been done. This can only be "um" or "mil", and will default
to "um".
■ LASI Units per Phys Units. This is the scale you used in your LASI
drawing. It is what was set by the SCALE command, and was written into
the TLC header record when you made your TLC files.
If either Physical Units or LASI Units are left blank, TLC2GDS assumes
that you want it to read these from header of the Main TLC File. It
will disregard both of these items from the setup and substitute what
it reads in the TLC file.
■ GDS Units per Phys Unit. This is the number of basic units that you
want to be written into the UNITS record of the GDS file. This number
should be an INTEGRAL multiple of the LASI units. It is typically 1000
units per micron, but can vary with applications.
When TLC2GDS runs, it displays a Scale Bar at the bottom of the screen.
This indicates the GDS units that is being used, the LASI units that
are being used and the the Rescale Ratio, which is the ratio of GDS
units to LASI units.
To prevent roundoff errors, the Rescale Ratio should be an INTEGER.
If the Rescale Ratio is not an integer TLC2GDS will display a warning,
and will convert as accurately as it can.
■ The Scale Unit LSB Correction. This needs some explanation. This allows
you to modify the Least Significant Bit of the scale numbers placed in
the GDS file. This is about 10e-16 of the actual scale, but some
conversion software (early Cadence for instance) is fussy and requires
the exact bits. This will normally be 0. If you have trouble, try +1 or
-1 and see if it fixes the problem.
Note: This correction is applied to all 8-byte real numbers in the stream
format records. Currently this only affects the UNITS, MAGNITUDE and
ANGLE records.
■ Datatype to Use. This is the GDS Datatype attribute for boundaries,
etc. This is a parameter that LASI doesn't use. It can be 0-63; usually
0 is used.
■ Default Line Width. This is in physical units and is the width that
open polygons or lines will be given if converted to paths. It works
only if you convert with the Make Only Proper Poly switch set to "N"
(see below). This width might have to be set to something greater than
zero for some other drawing systems to accept the figure. This value
can be set to zero, but the minimum value greater than zero will be
limited to two GDS basic units. This may be less than the minimum LASI
path width, and therefore may not convert back (using GDS2TLC)
correctly. Set this to zero if you want polygons to unchanged.
■ Sort in Ascending Rank Order. The structures in the GDS file can be
sorted by ascending or descending LASI rank. Some programs that use
stream format may require that the main structure (highest ranking
cell) come first in the data. Enter "N" if you want structures to be
sorted so that the main structure comes first in the GDS file, or "Y"
if you want it to come last.
■ Convert Text. If you want to convert LASI text, set the switch to "Y".
Otherwise, text will not be converted. Text conversion is somewhat
confusing because GDS has several attributes for its text. This is
explained below under Text Setup.
■ Convert Names to Lowercase. Some systems into which LASI can be
converted use lowercase names for the Calma structure names. You can
have TLC2GDS convert any cell names to lowercase by setting this
parameter to "Y". Normally this will be "N".
■ 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 more than 200 vertices (Calma limit) will be reported.
∙ 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.
Setting this to "N" will permit conversion of open poly figures. If the
Default Line Width is set to something greater than zero:
∙ Crushed boxes will be reported but NOT removed.
∙ Single points will be removed.
∙ Line segments will be changed to paths with the default width.
∙ Polygons with more than two vertices will NOT be closed, but will be
changed to paths with the default width.
∙ Acute angles will NOT be checked.
If the Default Line Width is zero, only crushed boxes will be reported.
■ Relocate Layer 64 to Layer. LASI uses layers 1-64, but Calma uses 0-63.
you can move anything on layer 64 to any Calma layer 0-63. Usually 0 is
convenient, but you must be sure that it is an unused layer in your
LASI drawing.
■ Filter Single Layer. If the GDS file is going to a pattern generator,
you might want to make files that contain only one layer. You can set
this number to any layer from 1 to 64. Boundaries, paths and text ONLY
ON THAT LAYER will be passed. If you want to pass all layers leave this
entry blank.
Warning: If you intend to transfer complete drawings in GDS format, be
sure that the Filter Single Layer entry is blank.
■ 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
"TLC2GDS.RPT" will be the default.
Page 2 - Text Setup
Press ALT-T or click "Text" to go to Page 2, the Text Setup Page.
GDS uses several attributes to construct text. TLC2GDS can relate these
to each of four LASI Text Sizes. Normally, you would assign the Font
attribute to different text sizes. Notice that there are 4 fonts and 4
sizes.
The attributes that you use depend on just how you want to distinguish
different texts. Different applications or conversions to other CAD
systems will use different attributes. Some experimentation will probably
be necessary to convert text reasonably correctly.
Note: If your drawing contains text with a size not defined, the text
will be converted with the attributes of the next SMALLER size.
For the four text sizes, first enter the text size in physical units.
Then set the following parameters:
■ Font, which can be 0 to 3. This is written into the PRESENTATION
record.
■ Texttype, which can be 0 to 63. This is written to the TEXTTYPE record.
■ Magnification, which can be used to change text size if the other
parameters produce text of the same size. This is written to the MAG
record.
■ Text Width, which is usually 0, but may have to be set greater than
zero so that certain CAD systems will accept the text. This is in
physical units and is limited from 0 to the size of the text. This is
written to the WIDTH record.
■ Vertical Justification, which may be set to top, center and bottom (T,C
or B). LASI text is always left-bottom justified so normally you will
set this to bottom or "B". This is written to the GDS PRESENTATION
record.
LASI text will pass its orientation to the GDS text. The orientation is
written into the ANGLE and STRANS records.
Starting Conversion
When you are happy with the setup, press ALT-G or click "Go" to start
conversion.
If you have previously run TLC2GDS, there will be a setup file in the
drawing directory named TLC2GDS.SET. If this is found, the setup
parameters will be loaded when you first run TLC2GDS, and will be stored
again as you start the conversion. This saves a great deal of time when
running TLC2GDS since you only have to modify any parameters.
Important: It is not guaranteed that future versions of TLC2GDS or
GDS2TLC 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 ar self-explaining. The warnings that TLC2GDS lists as it
converts are as follows:
"TLC and Setup LASI Units do not Agree" means you are changing the LASI
units to something different than what is written in the header of the
TLC files you are converting. This may or may not be a useful thing to
do, and will generally result in an oddly sized GDS drawing. To use the
TLC header units, leave Physical Unit or LASI Units per Phys Unit blank.
"Resolution Lost ..." means that the Rescale Ratio was not an integer.
It is possible that a LASI coordinate will not fall exactly on a GDS
coordinate. Usually this is not a serious problem, because the GDS units
are usually much larger than the LASI units, so only a error that is a
small fraction of a LASI unit will be made.
"Duplicate Vertex Removed at ..." means that more than one consecutive
vertex was found at the same location in a poly or path. The extra vertex
was removed in the stream file.
"More that 200 Vertices at ..." means that the limit of 200 vertices in
the stream format for a single boundary or path was exceeded. The
boundary or path WILL NOT be truncated but will be converted to stream
anyway. This may not be acceptable to other stream reading programs, but
will convert back using GDS2TLC. To correct this problem, go to your
layout and break up the poly into smaller closed polygons or break the
path into smaller segments.
"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).
"Coincident Vertices at ..." means that two or more vertices in a single
poly or path were at the same location. These vertices need not be
sequential. This is just a warning that the boundary or path might not be
a legal figure.
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 GDS to TLC (GDS2TLC)
Page 1 - Conversion Setup
Nornally run GDS2TLC.EXE in the drawing directory of the drawing to be
reconstructed from stream format.
GDS2TLC will start with the Conversion Setup page. It requires the
following entries:
■ Name of the GDS File to Convert. The extension of the file name is
arbitrary, but is usually ".GDS" or ".CSF". The name may also include a
path.
■ Path (or destination) of the TLC Files to be Made. If you want the
files in the current directory leave this blank.
■ Physical Unit (um or mil). This is the physical unit in which the GDS
drawing has been done. This can only be "um" or "mil", and will default
to "um".
■ LASI Units per Phys Unit. This is scale you intend to use in your
converted LASI layout drawing. It is the same scale you set using the
SCALE command when you begin a LASI drawing.
■ Accept GDS Layers. If you don't want some of the GDS layers you can
filter them out. List the layers the same way that you list layers in
the LASI VIEW and OPEN commands, that is, using numbers and dashes
separated by spaces. For all layers just enter "-". Note that GDS
layers are 0-63.
■ Accept GDS Datatypes. For all datatypes enter "-". Note that datatypes
are 0-63.
■ Convert GDS Text. If you want to convert any text in the GDS file set
this to "Y".
■ Check for Open Poly. GDS2TLC will compares the first and last vertices
of GDS boundaries. If they are different, GDS2TLC does not close the
converted polygon, but leaves it open and displays a warning message.
Set this to "N" if you want to bypass this check.
■ Replace Old TLC Files. GDS2TLC checks if a TLC file is already present
the destination directory. If the TLC file is present, this switch will
prevent it from being rewritten. If the TLC file for a cell is missing
it will always be written.
■ Clear Optional Records. This needs a little explanation. GDS elements
(boundaries, paths, etc.) can have optional records in their
construction (width for paths, for example). An optional record that
sets a parameter may or may not appear in the stream before an element
is to be made. The value of the parameter needs to default to
something, which could be the parameter set by a previous record (in
another element) or the parameter can default to "no effect". Most of
the time set this switch to "Y", and only try "N" if there is an
obvious error in the conversion.
■ Manually Rename Structures. The names of GDS structure may have come
from a UNIX system that can have non-DOS names, that is, they may be
longer than 8 characters and may contain characters that are illegal in
MS-DOS filenames. If this is set to "N" then GDS2TLC will try to modify
any illegal names by truncating from the left and removing any illegal
characters. If this fails, it will ask for you to enter a new name for
a structure. If you set this to "Y", GDS2TLC will immediately ask for a
new name without trying to modify the name.
■ Convert Boundaries to Boxes. If the GDS file contains boundaries that
have exactly 5 vertices and form a rectangle, you can convert these to
LASI boxes, otherwise they will convert to 4-sided polygons.
■ Recognize CR or LF as NL. Different CAD systems may use either CR
(carriage return) or LF (line feed) as indicators of a new line in
their text. LASI has single line text, but GDS2TLC can break multi-line
text into individual LASI text lines.
■ Relocate Layer 0 to Layer. Since LASI does not use layer 0, you must
move anything on that layer to some LASI layer. Normally, this will
default to 64, but you can set the layer 1 to 64.
■ Make CELLS.REF File. You can generate a list of the converted cells in
a CELLS.REF file. This is the same as TLCOUT.EXE generates, and is
useful if you are converting a large number of unrelated cells. This
file will be made in the same directory as the TLC files.
■ 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
"GDS2TLC.RPT" will be the default.
Page 2 - Text Setup
Press ALT-T or click "Text" to go to Page 2, the Text Setup Page.
To convert text, first set the four LASI Text Sizes in physical units.
The text sizes that you set will be in multiples of smallest LASI
physical scale unit. These sizes will be rounded automatically by the
LASI drawing program to the actual discrete text sizes used in LASI
drawings, but you may enter any size that is "close" to the size that you
want.
Several attributes can be used to construct text. The attributes that
GDS2TLC can use are:
■ Font, which can be 0 to 3.
■ Texttype, which can be 0 to 63.
■ Magnification, which can be used to change text size if the other
parameters produce text of the same size.
■ Orientation, which allows text to be rotated in 90 deg increments and
be flipped.
■ Vertical Justification, which can be top, center or bottom (T,C or B).
LASI text is always left-bottom justified, but if center or top
justification is found in the GDS file, a displacement will be added to
the position of the LASI text.
■ Horizontal Justification is always changed to left.
You can relate the four LASI Text Sizes to either Font or Texttype. Font
is given first priority. Setting Font or Texttype to "-" causes that
attribute to be ignored. Setting both to "-" defaults to minimum size,
but still converts text.
If you use Magnification, the text size will be further magnified by the
MAG records found in the GDS file. If not set, magnification will be 1.0.
If you use Orientation, the text will be rotated and flipped by the the
ANGLE and STRANS records. If not set, text will be angle 0 and unflipped.
If you use Justification, the text will be moved vertically as if the
text's reference point was at the top, center or bottom of the text using
the information in the PRESENTATION records.
Some experimentation will probably be necessary to convert text
reasonably correctly.
Page 3 - Structures Setup
Press ALT-S or click "Struct" to go to Page 3, the Structures Setup Page.
■ Structures to Omit. Enter the GDS names of any structures in the GDS
file that you don't want to be converted. GDS2TLC will simply read over
these structures and not produce any TLC files.
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 GDS2TLC, there will be a setup file in the
drawing directory named GDS2TLC.SET. If this is found, the setup
parameters will be loaded when you first run GDS2TLC, and will be stored
again as you start the conversion. This saves a great deal of time when
running GDS2TLC since you only have to modify any parameters.
Scale Conversion
As GDS2TLC converts each individual structure, it checks each dimension
(4-byte signed integer) for the least resolution (or coarsest grid) that
will fit that particular structure. As it converts structures, it
determines the least resolution that will convert ALL structures
correctly, and displays it as the Minimum Feature size in the Scale Bar
at the bottom of the screen. The number of LASI units needed to convert
ALL structures is the reciprocal of the Minimum Feature.
If you don't need the resolution of the original GDS drawing, you can set
the LASI units to less than the GDS units. An example of this is when the
original GDS contains arcs that were made with a resolution of a single
grid unit. Usually you can use a much coarser grid, since when made into
photomasks, the resolution will be no better than the mask making
equipment.
If you get a "Resolution Lost" warning, the LASI Units that were set
caused some original GDS coordinate position to be misplaced. The new
coordinate will be rounded to the LASI grid. Read Errors and Warnings.
Note: Path widths in a GDS file (WIDTH records) should be drawn to HALF
the resolution of position coordinates (XY records). 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 Process
To convert from Stream Format, GDS2TLC goes through several processes to
determine the criterion it will use to convert.
GDS2TLC first scans the GDS file several times to determine a hierarchy
of cells. It also tries to convert structure names to names that are
MS-DOS acceptable. If a name is found that is a reserved word such as
"PRN", or the name contains characters that are illegal in MS-DOS such as
"*", depending on the setup switch (above), you will be asked for a
substitute name. You will be continuously asked until you give an
acceptable name.
GDS2TLC will search the current directory for the TLC cell file of a cell
that might not exist as a structure in the GDS file, but still be used in
other structures in the GDS file. This allows the TLC file of a cell to
be reconstructed without the lesser cells being present as structures in
the GDS file. The only requirement is that the TLC files of its lesser
cells exist already in the drawing directory.
After the scanning has been done to establish hierarchy and the presence
of TLC files, a list of the cellnames, their rank, the presence of the
structure in the GDS file, the presence of a TLC file in the directory
and the structure name is printed. Different colors are used to indicate
the presence of GDS and TLC. Red indicates that a cell is missing.
As explained above, if a TLC file is already present, it is retained even
though the structure may exist in the GDS file. To have a new TLC file
generated, the old TLC file must be deleted from the current directory,
or the option of replacing all TLC files must be used when running
GDS2TLC.
If a LESSER cell does not exist as a structure in the GDS file, and the
lesser's TLC file does not exist in the destination directory, then the
name of the expected cell is inserted as TEXT into the TLC file being
made and a warning message is given.
Errors and Warnings
Most errors ar self-explaining. The warnings that GDS2TLC lists as it
converts are as follows:
"Open Poly at ..." means that the first and last points of a boundary
converted to a polygon were not the same.
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.
"Resolution Lost ..." means that the number of LASI Units per Phys Unit
was incorrect for the GDS dimensions. The number of LASI units may have
been too small, or the LASI grid may have been the wrong size to fit the
GDS dimensions exactly. The number given is the minimum number of LASI
basic units that are needed. LASI units that are an INTEGRAL multiple of
the number will also be correct.
"(Object) Limit Reached". A GDS structure converted to more boxes, paths,
vertices or cells than LASI has been designed. If you exceed the poly or
vertex limit, and if you have not already done it, try converting 4-sided
boundaries to boxes instead of polygons.
"Structure is Missing ... Token Cell Made". GDS2TLC was unable to find
the definition of a structure used as an SREF in other structures.
GDS2TLC made a TLC file of a cell consisting of the text: "<<name>>".
"Stream (Record Length, Record Type, Data Type) is Wrong". Your GDS file
has an error in its basic format - you need a new GDS file.
"Fatal Error ... Unrecognized Record Type". The GDS file had a coding
error or a record type that GDS2TLC didn't know about. Send the GDS file
to the author if possible.
"Fatal Error ... Data Type Error". A type of data was read that was not
0-6 as expected in the GDS format. File is probably corrupted.
"String Data Length Exceeds Allocation". ASCII string data was found that
was longer than 32 characters for names and 512 characters for general
strings. The string was truncated.
"Too Many Structures in GDS File". The internal limit of 1600 different
structures in the GDS file was exceeded. Try breaking the GDS file into
smaller files with fewer unrelated structures, if possible.
Possible Problems
Converting from Stream Format is a little tricky because there are data
forms in GDS that are unique and hard to carry over into LASI. These are
some of the known problems:
1. When converting from GDS to LASI, if any structures are missing and a
TLC file is not present, there is no way to tell if the missing
structures or TLC files contain other missing structures or cells.
2. Presently, arrays of objects do not exist in LASI. Therefore, when
converting from GDS, GDS2TLC makes arrays by copying cells. This can
fill the LASI cell capacity if you don't watch out.
3. When GDS2TLC encounters text in a GDS file, it ignores justification
and breaks down any multi-line text into single line LASI text
objects. This means that your translated text may not be located
exactly in the same place. You should also use only single line
left-justified text on the other drawing system if you intend to bring
it into LASI.
4. Some features of GDS are presently simply ignored, such as stretched
components, and nodes.
5. If you abort while GDS2TLC is making a TLC file you will probably get
an incomplete file. Erase it.
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.
■ Press ENTER to return to the main page.
■ If you make a mistake press ESC to restore the original text.