next up previous contents index
Next: Conversion Import Up: Operating System and Input/Output Previous: Conversion   Contents   Index

Conversion -- Export

(int) SaveCellAsNative(cellname, directory)
Save the cell named in the first (string) argument, which must exist in the current symbol table, to a native format file in the directory. If the directory string is null or empty (or 0 is passed for this argument), the cell is saved in the current directory. The function returns 1 if the save was successful, 0 otherwise.

(int) SetStripForExport(state)
This function sets the state of the Strip For Export flag. When set, output from the conversion functions will contain physical information only. This should be applied when generating output for mask fabrication. See the Conversion - Export panel description for more information. If the integer argument is nonzero, the state will be set active. The return value is the previous state of the flag.

(int) SetSkipInvisLayers(code)
This function sets the variable which controls how invisible layers are treated by the output conversion functions. Layer visibility is set by clicking in the layer table with mouse button 2, or through the SetLayerVisible script function. If code is 0 or negative, invisible layers will be converted. If code is 1, invisible physical layers will not be converted. If code is 2, invisible electrical layers will not be converted. if code is 3 or larger, both electrical and physical invisible layers will not be converted. The return value is the previous code, which represents the state of the SkipInvisible variable, and the check boxes in the Conversion - Export panel.

(int) ToXIC(destination_dir)
The ToXIC function will write the current cell hierarchy to disk files in native format, no questions asked. The argument is the directory where the Xic files will be created. If this argument is a null or empty string or zero, the Xic files will be created in the current directory. The files are written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function.

(int) ToCGX(cgx_name)
This function will write the current cell hierarchy to a CGX format file on disk. The argument is the name of the CGX file to create. If the cgx_name is null or an empty string, the name used will be the top level symbol name suffixed with ``.cgx''. The file is written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function.

(int) ToCIF(cif_name)
This function will write the current cell hierarchy to a CIF format file on disk. The argument is the name of the CIF file to create. If the cif_name is null or an empty string, the name used will be the top level symbol name suffixed with ``.cif''. The file is written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function. The scale factor used can be set with the SetConvertScale function.

(int) ToGDS(gds_name)
This function will write the current cell hierarchy to a GDSII format file on disk. The argument is the name of the GDSII file to create. If the gds_name is null or an empty string, the name used will be the top level symbol name suffixed with ``.gds''. The file is written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function.

(int) ToGdsLibrary(gds_name, symbol_list)
This function will create a GDSII file from a list of cells in memory. The first argument is the name of the GDSII file to create. The second argument is a string consisting of space-separated cell names. The cells must be in memory, in the current symbol table. Both arguments must provide values as there are no defaults. The GDSII file will contain the hierarchy under each symbol given, but any cell is added once only. The resulting file will in general contain multiple top-level symbols. The file is written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function.

(int) ToOASIS(oas_name)
This function will write the current cell hierarchy to an OASIS format file on disk. The argument is the name of the OASIS file to create. If the oas_name is null or an empty string, the name used will be the top level symbol name suffixed with ``.oas''. The file is written according to the settings of the controls in the Conversion - Export panel, and/or the related variables. The scale factor used can be set with the SetConvertScale function.

(int) ToTxt(archive_file, text_file)
This function will create an ASCII text file text_file from the contents of the archive file. The human-readable text file is useful for diagnostics. If text_file is null or empty, the name is derived from the archive_file and given a ``.txt'' extension. No output is produced for CIF, since these are already in readable format. The function returns 1 on success, 0 otherwise with an error message possibly available from GetError.

(int) ToSpice(filename)
This command will dump a SPICE file from the current cell to a file of the given name. If the argument is null or an empty string, the name will be that of the current cell with a ``.cir'' suffix. Any existing file of the same name will be moved, given a ``.bak'' extension. The return value is 1 on success, 0 otherwise.

(int) WriteGeomSplit(fname, cname, bname, l, b, r, t, x0, y0, w, h, bw)
This function will read the archive file fname, and split the geometry in cname into a collection of flat files covering a grid, in the manner of the SkelWriteGeomSplit function. If cname is 0, the top-level cell, if unique in the file, will be assumed. This function operates outside of skeleton mode, and should consume far less memory and may be faster than reading/writing in skeleton mode.

Each output file contains the geometry for a cell in a defined grid, including some possible overlap with neighboring grid cells. The l, b, r, t define a rectangle, in microns, which is the area over which the grid will be defined. This is typically the bounding box of the top-level cell. If all four entries are set to 0, the bounding box will be computed. The area can be smaller than the bounding box, which will truncate the grid, however objects are not clipped to this boundary.

The x0, and y0 (in microns) set the grid origin relative to the origin of the top level cell. The w and h (in microns) set the periodicity of the grid, i.e., the unit cell width and height. The bw, in microns, is the amount by which the grid cell is bloated before geometry is extracted and written. This must be positive or zero.

The bname is a cell path name, with an extension which gives the type of file to create. One of the following extensions must be provided:

.cgx CGX output
.cif CIF output
.gds GDSII output
.oas OASIS output
The files will be named in the form basename_X_Y.ext, where the .ext is the extension supplied, and X,Y are integer indices representing the grid cell. The 0,0 grid cell has its lower left corner at x0,y0 before bloating by the border width, and the indices increase with increasing x,y. If negative, the character `m' is used instead of a minus sign. Each file will consist of a single cell, whose name is tha name of the file with the extension stripped, containing the geometry for that grid cell.

In addition to the channel output files, an Xic cell file is written, using the basename without the extension, that references each of the channel files. Opening this cell will open all of the channel files, showing all geometry from the original file (memory limits permitting).

This function reads data directly from the source file to minimize memory use. All files are opened and written in parallel. The user may encounter system limitations on the number of file descriptors open simultaneously. The function returns 1 on success, 0 otherwise.


next up previous contents index
Next: Conversion Import Up: Operating System and Input/Output Previous: Conversion   Contents   Index
Stephen R. Whiteley 2006-10-23