Magic-7.3 Command Reference

#

## gds, calma

Read GDSII input or generate GDSII output.

### Usage:

> gds [option]
> calma [option]

> > where option is one of the following:
> > help
> >   Print usage information
> > arrays [yes|no]
> >   Output arrays as individual subuses (like in CIF). Default is "no". Normally there is no reason to do this.
> > contacts [yes|no]
> >   Causes contacts to be written to the GDS file as subcell arrays (experimental, introduced in version 7.3.55). This method can produce very efficient output compared to writing each contact cut square separately.
> > flatten [yes|no]
> >   Flatten simple cells (e.g., contacts) on input. This helps magic to use its contact-area representation of contacts, and can also avoid situations where contacts are lost or translated to "generic" types because the arrayed part of the contacts is missing one or more residue layers.
> > ordering [yes|no]
> >   Forces post-ordering of subcells read from a GDS file; that is, if a cell use is encountered before it is defined, magic will read through the remainder of the file until it finds the definition, read it, and then return to the original file position to continue reading. This option is always enabled when using gds flatten. Otherwise, the default behavior is ordering no to avoid lengthy searches through the GDS stream file.
> > labels [yes|no]
> >   Cause labels to be output when writing GDSII. Default is "yes". Normally there is no reason not to do this.
> > lower [yes|no]
> >   Allow both upper and lower case in labels. Default is "yes".
> > read file
> >   Read GDSII format from file file into the edit cell. If file does not have a file extension, then magic searches for a file named file, file.gds, file.gds2, or file.strm.
> > readonly [yes|no]
> >   Set cell as "read-only". This has the effect of marking each cell definition (using the property method) with the start and end positions of the cell definition in the input file. In subsequent output, the cell definition will be transferred verbatim from the input to the output file. This is useful for 3rd-party standard cells or pad cells where the original GDS is trusted and it is desirable to bypass the boolean operators of magic's GDS reader and writer to prevent the layout from being altered. Note that "read-only" layout can be written to a `.mag` file, but the contents of this file are representational only. It can be useful to keep a simplified respresentation in the case of pad cells or digital standard cells, for example, by reading them using a GDS input style that defines only metal layers.
> > rescale [yes|no]
> >   Allow or disallow internal grid subdivision while reading GDS input. Default is "yes". Normally, one wants to allow rescaling to ensure that the GDS is displayed exactly as it is in the input file. Occasionally, however, the GDS input is on a very fine scale, such as nanometers, and it is preferable to snap the input to lambda boundaries rather than to subsplit the internal grid to such a fine value. The "cif limit" function may also be used to limit grid subdivision to a minimum value.
> > warning [option]
> >   Set warning information level. "option" may be one of the following:
> >   default
> >     The default setting is equivalent to all the other options (align, limit, redirect, and none) being disabled.
> >   align
> >     Generate warnings during a "cif see" command if the alignment of geometry is on fractional lambda. Normally, magic allows contacts to be drawn at half-lambda positions. If this violates DRC requirements for the minimum output grid, this warning setting can be used to detect such violations.
> >   limit
> >     Limit warnings to the first 100 warnings or errors only.
> >   redirect [file]
> >     Redirect all warnings to an output file named file. If file is not given, then redirection is disabled.
> >   none
> >     Do not produce any warning messages on GDS input.
> > write file
> >   Output GDSII format to "file" for the window's root cell.
> > polygon subcells [yes|no]
> >   Put non-Manhattan polygons into subcells. Default is "no". Normally this option is not needed. However, input layout that defines a number of angled wires, particularly those that are closely spaced, can cause magic to generate literally millions of internal tiles. This tends to be true in particular for corner cells in padframes for deep submicron feature sizes, where the angled corners are required to meet the DRC specification. When set to "yes", each polygon encountered in the GDS input is placed in its own uniquely-named subcell. This prevents interations with other polygons on the same plane and so reduces tile splitting.

### Summary:

> The gds command reads or produces GDSII output (also known as "stream" output, or "calma" output after the name of the company that invented the format), or sets various parameters affecting the GDS input and output. In magic, the GDS read and write routines are a subset of the CIF read and write routines, and so it is important to note that certain cif command options (q.v.) also affect GDS input and output. In particular, cif istyle and cif ostyle set the input and output styles from the technology file, respectively.

> If no option is given, a CALMA GDS-II stream file is produced for the root cell, with the default name of the root cell definition and the filename extension ".gds".

### Implementation Notes:

> gds is implemented as a built-in function in magic. The calma command is an alias for gds and is exactly equivalent.

### Bugs:

> - The cif command options that affect GDS input and output should really be duplicates as options of the GDS command.
> - GDS input is "interpreted" through boolean operations in the technology file definition, and so it is not guaranteed that all input will be read correctly.
> - Not all non-Manhattan geometry is read correctly.
> - The input can be fouled up if the magic grid is rescaled during input. This error can be avoided by scaling the grid prior to GDS read-in.
> - "polygon subcells" in GDS creates a duplicate image of the layout read into the subcells; this needs to be fixed.

### See Also:

> cif

Return to command index

Last updated: December 4, 2005 at 3:17pm