Syntax: !layer [join|split|splitv] layer_name [=] [expression]This command produces new geometry on a new or existing layer, by applying a layer expression which takes as input geometry from the same or other layers, from the current cell or from other cells in memory. This new geometry can appear as an assemblage of trapezoids if either of the split or splitv keywords is given, or alternatively as a minimal number of complex polygons if the join keyword is given instead. If splitv is given, a vertical orientation is favored for the decomposition, whereas similarly split will produce a decomposition favoring a horizontal orientation. The default is the joined form if none of these optional keywords is given.
The !layer command, when using boolean operations, uses gridding to improve efficiency for large data sets. Internally, a square grid with origin at the lower-left corner of the cell bounding box is logically defined. The calculations are performed for each grid square that overlaps the cell area, and the results are combined. This can be more efficient that calculating the whole cell in one shot.
The default grid size is 100 microns square, which can be changed with the LayerPartSize variable. This can be set to an alternate grid size in microns, as a floating-point number. The cell lower left corner is on the grid boundary. The operations are performed piecewise in each grid area that intersects the cell.
If this variable is set to ``0'', no grid is used, and operations will be performed over the entire cell at once.
When joining objects, there are several variables which fine-tune the operation. See the description of the !join command (14.14.6) for information.
If layer_name does not exist in the physical layer table, it will be created. Otherwise, the layer_name is the short or long name of an existing layer. If a new layer is created, its name is generated from the given name in the same way as in the technology file layer definitions.
The expression, if given, involves layer names and operators as in the DRC layer expressions (see 10.1). The result of the expression is created on layer_name. Thus, this command provides a means of creating a new layer from geometry on existing layers. It operates on the physical part of the current cell. Labels are ignored. The same layer_name can exist on both sides of the expression, in which case the contents of the layer_name is replaced with the result of expression. The equal sign between layer_name and expression is optional.
The assigned-to layer, if it exists, is cleared before the operation. The command is optionally undoable. An additional prompt asks the user if the operation is to be undoable. If yes, memory usage will be larger and processing time longer. The !layer command prompts for a hierarchy depth. If the depth given is greater than 0, there is a second prompt: ``Recursively create layer in subcells?''. If the response is `y', the new layer is created in subcells to the given depth. If the response is `n', the layer is created only in the current cell, but uses geometry from the subcells up to the given depth, in effect producing a flattened layer.
Examples: