next up previous contents index
Next: Cell Hierarchy Digest Up: Layout File Input/Output Functions Previous: layout File Format Conversion   Contents   Index

Export Layout File

(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.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(int) Export(filepath, allcells)
This function exports design data to a disk file (or files). It can perform the same operations as the ToXXX functions also described in this section. The type of file produced is set by the extension found on the filepath string. Recognized extensions are

native .xic
CGX .cgx
CIF .cif
GDSII .gds, .str, .strm, .stream
OASIS .oas

Only these extensions are recognized, however CGX and GDSII allow an additional ``.gz'' which will imply compression. For native cell file output, the filepath must provide a path to an existing directory. If none of the other formats is matched, and the filepath exists as a directory, then native cell files will be written to that directory. Alternatively, if the filepath has a ``.xic'' extension, and the filepath with the .xic stripped is an existing directory, or the filepath including the .xic is an existing directory (checked in this order), again native cell files will be written to that directory.

The second argument is a boolean. If false, then the current cell hierarchy is written to output. If true, all cells found in the current symbol table will be written to output. In either case, by default cells that are sub-masters or library cells are not written unless the controlling variables are set, as from the Export Control panel. The other controls for windowing, flattening, scaling, and cell name mapping found in this panel apply as well, as do their underlying variables. These flags and values can also be set with the SetConvertFlags, SetConvertArea, and SetConvertScale functions, and others that apply to output generation. When writing all files, any windowing or flattening in force is ignored.

See the table in 14.1 for the features that apply during a call to this function.

The function return 1 on success, 0 otherwise with an error message available from GetError.

(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.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(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 cell name suffixed with ``.cgx''.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(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 cell name suffixed with ``.cif''.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(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 cell name suffixed with ``.gds''.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(int) ToGdsLibrary(gds_name, cellname_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 cell given, but any cell is added once only. The resulting file will in general contain multiple top-level cells.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(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 cell name suffixed with ``.oas''.

See the table in 14.1 for the features that apply during a call to this function.

This functions returns 1 on success, 0 otherwise, with an error message likely available from GetError.

(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 third argument is a string, which can be passed to specify the range of the conversion. If this argument is passed 0, or the string is null or empty, the entire archive file will be converted. The string is in the form

[start_offs[-end_offs]] [-r rec_count] [-c cell_count]

The square brackets indicate optional terms. The meanings are

start_offs
An integer, in decimal or ``0x'' hex format (a hex integer preceded by ``0x''). The printing will begin at the first record with offset greater than or equal to this value.

end_offs
An integer in decimal or ``0x'' hex format. If this value is greater than start_offs, the last record printed is at most the one containing this offset. If given, this should appear after a `-' character following the start_offs, with no space.

rec_count
A positive integer, at most this many records will be printed.

cell_count
A non-negative integer, at most the records for this many cell definitions will be printed. If given as 0, the records from the start_offs to the next cell definition will be printed.

See the table in 14.1 for the features that apply during a call to this function.

The function returns 1 on success, 0 otherwise with an error message possibly available from GetError.


next up previous contents index
Next: Cell Hierarchy Digest Up: Layout File Input/Output Functions Previous: layout File Format Conversion   Contents   Index
Stephen R. Whiteley 2024-09-29