Deriving Layers and Performing Layer Operations


Custom design requires design rule checking (DRC) that involves using layer operations to derive new layers from one or two existing layers. OpenAccess includes numerous types of layer operations that support the DRC requirements.

Layer Operations

Layers are derived by specifying the type of operation required to produce the new layer. An operation can be one of the OpenAccess built-in types or a custom type defined by the application.

Important: The application is responsible for performing the actual shape manipulation and associating the results with the appropriate derived layer. OpenAccess only stores the information about which layer operations are mandated—it does not provide built-in layer operation functionality.  

Built-In Layer Operation Types

OpenAccess built-in layer operation types consist of:

oaSizedLayer is deprecated and superceded by the oaDerivedLayer class.

Using Derived Layer Parameters

Some layer operations can use parameters to determine how a layer is derived. The optional derived layer parameters are supported through the oaDerivedLayerParam and oaDerivedLayerParamArray objects, which modify how a derived layer is created. The types of layer parameters are:

Using the Exclusive Parameter

You can associate the exclusive parameter with many of the layer operations. This parameter determines how a layer operation selects and interacts with shapes on the specified layers.

The relationship that is checked for a shape includes both the relationship defined by the layer operation and the connect parameter. Consider the example where the exclusive parameter is set to true and the connect parameter is set to sameNet using an oacCoincidentLayerOp for layers A and B with the following conditions:

The shape on layer A is not selected because the second shape on layer B violates the exclusive requirement, since it is on a different net.

The exclusive concept can be confusing when dealing with relationships that appear to be inherently exclusive, such as oacButtOnlyLayerOp. There is a significant difference between oacButtOnlyLayerOp with the exclusive option versus without:

Using the Range Parameter

Some layer operations can use range parameters to modify how shapes are selected for the derived layer. Range parameters include an enumeration to specify the range type. The oaRangeType class is an enum wrapper class for the oaRangeTypeEnum object, which provides eight range types:

In addition, the oaBooleanValue selectShapesInRange determines whether the selected shapes are those inside or outside the range specified.


AND (oacAndLayerOp)
The AND layer operation requires that two layers are specified. This operation creates shapes on the derived layer that correspond to the areas on layer1 and layer2 that intersect. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacAndLayerOp Figure

OR (oacOrLayerOp)
The OR layer operation requires that two layers are specified. This operation creates shapes on the derived layer that correspond to a union of the shapes on layer1 and layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacOrLayerOp Figure

NOT (oacNotLayerOp)
The NOT layer operation requires that two layers are specified. This operation creates shapes on the derived layer that correspond to the inversion of layer1 shapes and layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacNotLayerOp Figure

XOR (oacXorLayerOp)
The XOR layer operation requires that two layers are specified. This operation selects the areas of shapes on layer1 and the areas of shapes on layer2 that do not overlap. The operation excludes the portions of shapes on the layers that overlap. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacXorLayerOp Figure

TOUCHING (oacTouchingLayerOp)
The touching layer operation requires that two layers are specified. This operation selects shapes on layer1 that are completely inside, partially inside, or abutting a shape on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacTouchingLayerOp Figure

BUTTONLY (oacButtOnlyLayerOp)
The buttonly layer operation requires that two layers are specified. This operation selects shapes on layer1 that abut but do not overlap shapes on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacButtOnlyLayerOp Figure

inside (oacInsideLayerOp)
The inside layer operation requires that two layers are specified. This operation selects shapes on layer1 that are completely inside a shape on layer2. Coincident edges are allowed, but layer1 shapes that are not completely inside layer2 shapes are not selected. The difference between this and the touching layer operation is that this operation does not include abutting shapes outside the second layer and does not include overlapping shapes that are only partially inside the second layer shapes. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacInsideLayerOp Figure

A single parameter can be used to further qualify when shapes are selected. The parameter is:


outside (oacOutsideLayerOp)
The outside layer operation requires that two layers are specified. This operation selects shapes on layer1 that are completely outside a shape on the layer2. Coincident edges are allowed. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacOutsideLayerOp Figure

overlapping (oacOverlappingLayerOp)
The overlapping layer operation requires that two layers are specified. This operation selects shapes on layer1 that overlap shapes on layer2. Overlap is defined as any area common to shapes on both layers. A layer1 shape overlaps if it has any area in common with a shape on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacOverlappingLayerOp Figure

Three parameters are used to further qualify when the operation applies. The parameters are:


straddling (oacStraddlingLayerOp)
The straddling layer operation requires that two layers are specified. This operation selects shapes on layer1 that are only partially inside shapes on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacStraddlingLayerOp Figure

Three parameters are used to further qualify when the operation applies. The parameters are:


avoiding (oacAvoidingLayerOp)
The avoiding layer operation requires that two layers are specified. This operation selects shapes on layer1 that are completely outside of, and have no abutting edges with, shapes on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacAvoidingLayerOp Figure

butting (oacButtingLayerOp)
The butting layer operation requires that two layers are specified. This operation selects shapes on layer1 that abut with shapes on layer2. Unlike oacButtOnlyLayerOp, which selects shapes with coincident edges that have no common area, the butting operator selects shapes with coincident edges and some common area (but not all area in common). The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacButtingLayerOp Figure

Three parameters are used to further qualify when the operation applies. The parameters are:


coincident (oacCoincidentLayerOp)
The coincident layer operation requires that two layers are specified. This operation selects shapes on layer1 that have coincident edges with shapes on layer2. The shape on layer1 is coincident if any of its edges are coincident with the edges of a shape on layer2, and the area of the shapes at those edges overlap. Other parts of the shape on layer1 can also overlap the shape on layer2. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacCoincidentLayerOp Figure

Three parameters further qualify when this operation applies. The parameters are:


coincidentOnly (oacCoincidentOnlyLayerOp)
The coincidentOnly layer operation requires that two layers are specified. This operation selects shapes on layer1 that have at least one coincident edge with a shape on layer2, and the area of the layer2 shapes are completely covered by the layer1 shape. This is different from the coincident layer operation in that no portion of the layer1 shape can lie outside of the layer2 shape. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacCoincidentOnlyLayerOp Figure

Three parameters further qualify when this operation applies. The parameters are:


enclosing (oacEnclosingLayerOp)
The enclosing layer operation requires that two layers are specified. This operation selects shapes on layer1 that completely cover at least one shape on layer2. In addition, a count can be specified that governs how many layer2 shapes must be enclosed by a layer1 shape in order for a layer1 shape to be selected. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacEnclosingLayerOp Figure

Three parameters further qualify when this operation applies. The parameters are:


buttingOrCoincident (oacButtingOrCoincidentLayerOp
The buttingOrCoincident layer operation requires that two layers are specified. This operation selects shapes on layer1 that either abut or are coincident with shapes on layer2. Abutting and coincidence are defined as any edge-to-edge coincidence regardless of whether the shapes overlap at the point of coincidence. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacButtingOrCoincidentLayerOp Figure

Three parameters further qualify when this operation applies. The parameters are:


buttingOrOverlapping (oacButtingOrOverlappingLayerOp
The buttingOrOverlapping layer operation requires that two layers are specified. This operation selects shapes on layer1 that abut or overlap shapes on layer2. Overlap is defined as a common area between shapes. This operation is the same as the touching operation, but the latter does not support the parameters described below. The following figure is an example showing which shapes are selected and included in a derived layer when this type of layer operation is used.

oacButtingOrOverlappingLayerOp Figure

Three parameters further qualify when this operation applies. The parameters are:


area (oacAreaLayerOp)
The area layer operation requires that only a single layer is specified. This operation selects shapes on layer1 based on a parameter that controls whether the area of selected shapes must be equal to, less than, or greater than a specified value.

oacAreaLayerOp Figure

One parameter is required for this layer operation:


oaSelect (oacSelectLayerOp)
This layer operation selects all shapes on a layer that have the purpose specified by the oaSelectShapesWithPurpose parameter. The oaSelect layer operation requires that one layer is specified and a single parameter of type oaSelectShapesWithPurpose is specified. The following figure shows which shapes are selected and included in a derived layer when this type of layer operation is used.

oacSelectLayerOp Figure

The single parameter required for this derived layer operation is:


Sizing Layers

Six sizing operations permit growing or shrinking a derived layer in the vertical direction, in the horizontal direction, or in both the vertical and horizontal directions. The horizontal and vertical directions are defined with respect to the X and Y coordinates of the top level cell, which means the horizontal and vertical directions are always defined in the same way regardless of the orientation of the instance containing the shape. All sizing layer operations use a single parent layer.

One parameter is required for all sizing layer operations: