|
Whiteley Research Inc., 456 Flora Vista Avenue, Sunnyvale CA 94086 wrcad.com |
The Computer Graphics eXchange (CGX) format is a simple binary data
format somewhat similar to GDSII, but designed to be more compact and
efficient. This format, developed by Whiteley Research, is hereby
placed in the public domain without restriction.
Like GDSII, files consist of a sequential list of variable-length
records. It has simplified record structure, but extensions in data
flexibility. If is more compact than GDSII and is more efficient to
read and write. The advantages of CGX are smaller files and
potentially faster read/write than GDSII.
A date is stored as 8 bytes, as shown in the following table. These
are the same numerical fields as used in GDSII, though the format is
different (bytes are used where possible, rather than shorts). The
third column gives the value in terms of the members of the
tm structure from the C library.
As in GDSII, string data are terminated with a null byte, with an
additional null byte added if necessary to make the total length even.
The recsize field is a short integer giving the total record
size, including the header. Thus, as in GDSII, records are limited to
64K bytes in length. The record size will always be an even number.
The rectype byte is set to a small integer to define the type
of record. The flags byte is used in some of the record types,
otherwise it is ignored.
The defined record types are given in the table below.
It is allowable to define additional record types for local or
proprietary purposes. If a parser encounters an unknown record type,
it may skip over the record, ignoring it.
The flags byte of the record header can be used for a version
number, which identifies in some way the remaining data in the file.
The LIBRARY record contains the following fields:
The first two fields are double-precision numbers that define the
scale factors for the data in the file. These are interpreted in the
same way as the similar fields in the header of a GDSII file.
The second two fields represent creation and modification dates for
the file content.
A name string for the library follows. Strings are null-byte
terminated, and an additional null byte is added if necessary so that
the total length is even.
The header flags byte is not used.
The STRUCT record contains the following fields:
The first two fields provide creation and modification dates for the
structure. These are followed by a string giving a name for the
structure. This name should be unique in the file.
The header flags byte is not used.
The CPRPTY record contains the following fields:
Any number or string is allowed.
The header flags byte is not used.
The PROPERTY record contains the following fields:
Any number or string is allowed.
The header flags byte is not used.
The LAYER record contains the following fields:
The layer number and data type are sufficient, and have the same
interpretation as in GDSII. Alternatively or in addition, a string
giving a layer name can be supplied.
The header flags byte is not used.
The BOX record contains the following fields:
The first four integers define a box, and a record can contain
multiple box definitions (four integers per box). Each box is given
the properties currently in effect, and is assigned to the layer
currently in effect.
The header flags byte is not used.
The POLY record contains the following fields:
Coordinates use four-byte integers. The first and last coordinate
pair (x-y values) must be the same. There must be at least four
coordinate pairs.
The header flags field contains a value in the range 0-2 which
sets the end style of the wire:
This is the same as the pathtype in GDSII.
The WIRE record contains the following fields:
The header flags byte is an orientation code:
The TEXT record contains the following fields:
The width gives the physical equivalent width of the text.
The height is determined by the font used for rendering.
The header flags byte can have any of the following bits
set.
The SREF record contains the following fields:
If the ANGLE flag is set, the cell is to be rotated by an
angle, in degrees, found in the record. If the MAGN bit is
set, the cell is scaled by a value found in the record. If the
REFLECT bit is set, the instance will be reflected about the
x-axis, as in GDSII. If the ARRAY bit is set, the instance is
arrayed, as in GDSII, where x, y, and xy give the three orientation
points, as in a GDSII AREF record. Unless the corresponding bit is
set, the corresponding data is not in the record.
|