next up previous contents index
Next: Export Layout File Up: Layout File Input/Output Functions Previous: Import Flags   Contents   Index

layout File Format Conversion

(int) FromArchive(file_or_chd, destination)
This function will read an archive (GDSII, CIF, CGX, or OASIS) file and translate the contents to another format. The file_or_chd argument is a string giving a path to the source archive file, or the name of a Cell Hierarchy Digest (CHD) in memory.

The type of file written is implied by the destination. If the destination is null or empty, native cell files will be created in the current directory. If the destination is the name of an existing directory, native cell files will be created in that directory. Otherwise, the extension of the destination determines the file type:

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.

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

The value 1 is returned on success, 0 otherwise, with possibly an error message available from GetError.

(int) FromTxt(text_file, gds_file)
This function will translate a text file in the format produced by the ToTxt function into a GDSII format file. This is useful after text mode editing has been performed on the file, to repair corruption or incompatibilities. If gds_file is null or empty, the name is generated from the text_file and given a ``.gds'' suffix.

(int) FromNative(dir_path, archive_file)
This function will translate native cell files found in the directory given in dir_path into an archive file given in the second argument. The format of the archive file produced is determined by the file extension provided, as for the FromArchive function. All native cell files found in the directory, except those with a ``.bak'' extension or whose name is the same as a device library symbol, are translated and concatenated, independently of any hierarchical relationship between the cells.

See the table in 18.10 for the features that apply during a call to this function. The supported manipulations are cell name aliasing, layer filtering, and scaling. Windowing manipulations and flattening are not supported. If a file named ``aliases.alias'' exists in the dir_path, it will be used as an input alias list for conversion. Each line consists of a native cell name followed by an alias to be used in the archive file, separated by white space.

The value 1 is returned on success, 0 otherwise, with possibly an error message available from GetError.


next up previous contents index
Next: Export Layout File Up: Layout File Input/Output Functions Previous: Import Flags   Contents   Index
Stephen R. Whiteley 2017-03-22