The GDSII format provides a compact, binary representation of a design hierarchy. Though the standard format is intended for physical data, minor extensions are used by Xic to allow storage of the electrical information as well.
A GDSII file consists of a sequence of data blocks. The first four bytes of the block provide the block type and size. Integers and floating point numbers have defined representations in GDSII, so conversion is necessary from most machine representations. This section will describe the extensions only.
A GDSII file can be decomposed into an ASCII representation with the Format Conversion panel found in the Convert Menu. The resulting file prints out the characteristics of each block, plus the block offset within the file and messages indicating extensions and errors. A file in this format can be reconverted to GDSII. Generally, there is a one to one correspondence between items in the text representation and blocks in the GDSII file, thus one can learn much about the structure of the GDSII file by examining the text representation.
When the Strip For Export button in the Export Control panel is active, GDSII files produced from this panel adhere to the strict GDSII standard and contain only physical data. Otherwise the file produced will contain extensions. Such files are not guaranteed to be readable by other software (but they generally are).
The file with extensions contains two concatenated GDSII record sets. The first contains the physical data. The physical records are zero padded to the next 2Kb block boundary, at which point the electrical records begin. Beyond this arrangement the extensions are as follows:
Both of these extensions are necessary to accommodate to properties found in the electrical design data, and are used in the electrical part of the file only.