next up previous contents index
Next: The Export Control Button: Up: The Convert Menu: Data Previous: Layer Filtering and Aliasing   Contents   Index


GDSII Layer Mapping

The GDSII file format does not use layer names. Instead, geometry can exist on a numbered layer and data type. Typically, the layer number and data type can be in the range 0-256, or 0-64 for some older versions of the GDSII specification. Here, the combination of a GDSII layer number and data type is referred to as a ``specification''.

When reading a GDSII file, Xic will attempt to map specifications encountered into existing Xic layers. If that fails, a new Xic layer will be created. The GDSII mapping for Xic layers is generally assigned in the technology file using the StreamIn keyword (for reading) and StreamOut (for writing), or can be specified with the GDSII parameter editor. This is the primary means by which GDSII specifications are interpreted as Xic layers, but this requires a-priori knowledge of the content of the GDSII file.

This section describes the process Xic uses to map an unknown specification encountered when reading GDSII input, where ``unknown'' means that no suitable mapping exists in the StreamIn lines of the present Xic layers.

Xic will first try to identify an existing Xic layer to map to the unknown specification. The first test is to look for an output mapping that matches. If a match is found, an input mapping will be created. The behavior depends on the setting of the NoMapDatatypes variable, which reflects the state of the GDSII: Map all unmapped datatypes... button in the Conversion - Import panel produced by the Import Control button in the Convert Menu. When this variable is set (directly with the !set command, or by the button), the data type will be ignored. The following pseudo-code illustrates the logic:

loop through existing Xic layers {
  if Xic layer has no GDSII input mapping {
    if Xic layer output mapping = GDSII layer {
      if NoMapDatatypes set
        (use this layer)
      else if output mapping data type = GDSII data type
        (use this layer)
    }
  }
}

If no suitable output mapping is found, Xic will look for special layer names. These names are four-character hexadecimal encoding of the layer number (first two characters) and data type (next two characters). Each field is 0-padded. In the situation where the data type is ignored (NoMapDatatypes is set), the data type characters are instead ``XX''. If a layer is found with a name matching (case-insensitive) the description just given for the unknown specification, and that layer has no input mapping, an input mapping will be created. The following pseudo-code illustrates the logic:

print layer_name  # NoMapDatatypes set: hhXX, otherwise hhhh
loop through existing Xic layers {
  if Xic layer name matches layer_name
    (use this layer)
}

If no existing layer is found that can be mapped to, a new layer will be created. The name of the new layer is as described above, which is:

NoMapDatatypes set
The format is ``hhXX'' where hh is the hexadecimal value of the GDSII layer number, and XX is literal.
NoMapDatatypes not set
The format is ``hhhh'' where the left two h's represent the hexadecimal value of the GDSII layer number, and the right two h's represent the hexadecimal value of the GDSII data type number.

The hex values are produced in upper case.

After the GDSII file has been read, newly created layers will appear in the layer menu (they are added above existing layers). The user can modify colors, fill patterns, and other attributes for these layers, and dump a new technology file with the Save Tech command.


next up previous contents index
Next: The Export Control Button: Up: The Convert Menu: Data Previous: Layer Filtering and Aliasing   Contents   Index
Stephen R. Whiteley 2006-10-23