Product Documentation
Cadence Integrators Toolkit Database Reference
Product Version IC23.1, June 2023

19


Multi-Patterning Technology Functions

Multi-patterning is a technique in which two or more mask processes are used to manufacture a design layer. Colors are used to represent the individual masks.

For more information about multi-patterning lithography and how to use Virtuoso® Multi-Patterning Technology (MPT) for designs that require two or more masks for a drawn layer, see Virtuoso Multi-Patterning Technology User Guide.

This chapter describes the following multi-patterning technology (MPT) functions:

All of the functions detailed in this section are for advanced nodes use only.

MPT Database Functions

This section describes the following MPT database functions:

dbCellViewAreLayerShiftsValid

Boolean
dbCellViewAreLayerShiftsValid(
dbCellViewId cellViewId
);

Description

Indicates whether the per-layer shift is valid on the instances for the specified cellview.

Arguments

cellViewId

Cellview ID.

Return Value

Boolean

Returns true if there is valid per-layer shift on the instances in the specified cellview.
Returns false if there is no valid per-layer shift on the instances in the specified cellview or there is an error.

dbCellViewClearLayerShifts

Boolean
dbCellViewClearLayerShifts(
dbCellViewId cellViewId
);

Description

Clears the per-layer shifting information from the specified cellview.

Arguments

cellViewId

Cellview ID.

Return Value

Boolean

Returns true if per-layer color shifting information is successfully removed from the specified cellview.
Returns false if per-layer color shifting information is not removed from the specified cellview.

dbCellViewHasLayerShifts

Boolean
dbCellViewHasLayerShifts(
dbCellViewId cellViewId
);

Description

Indicates whether any per-layer color shifts exist in the specified cellview.

Arguments

cellViewId

Cellview ID.

Return Value

Boolean

Returns true if per-layer color shifts exist in the specified cellview.
Returns false if per-layer color shifts do not exist in the specified cellview or there is an error.

dbCellViewUpdateLayerShifts

Boolean
dbCellViewUpdateLayerShifts(
dbCellViewId cellViewId
);

Description

Creates or rebuilds the layer shift specification cache with the layers that are in the tech bound to the specified cellview. As a result, all per-layer shift information on the instances in the cellview is removed.

You must set the layer shift information for a cellview before setting the layer shift information on instances in the cellview. To do this, use the following:
if (!dbCellViewHasLayerShifts(cv)) {
    dbCellViewUpdateLayerShifts(cv);
}

Arguments

cellViewId

Cellview ID.

Return Value

Boolean

Returns true if per-layer color specifications are successfully updated.
Returns false if per-layer color specifications are not updated or there is an error.

dbInstGetLayerShifts

Boolean
dbInstGetLayerShifts(
dbInstId     instId,
unsigned int *numLayerShifts,
dbLayerShift **layerShifts
);

Description

Returns a list of layer-shift pairs that are applied to the layers in the master of the specified instance. If no layer shifts are specified for the instance, the return value for numLayerShifts is 0 and the layerShifts pointer is NULL.

Memory for layerShifts is allocated automatically using the malloc function and this memory must be released by calling the free function.

Arguments

instId

Instance ID.

*numLayerShifts

Output argument. Returns the size of layerShifts array.

**layerShifts

Output argument. Returns an array of layer-shift pairs that is set on the specified instance. Each layer-shift pair is represented as {layer shift} where layer is the layer number and shift is one of the following enums:

  • dbcNoShift: There is no color shifting on this layer.
  • dbcShift1Shift: Shift colors by one (mask1Color to mask2Color, mask2Color to mask3Color, mask3Color to mask1Color).
  • dbcShift2Shift: Shift colors by two (mask1Color to mask3Color, mask2Color to mask1Color, mask3Color to mask2Color).
  • dbcFixedMask1Shift: Shapes with mask1Color are not changed; shift mask2Color to mask3Color, and mask3Color to mask2Color.
  • dbcFixedMask2Shift: Shapes with mask2Color are not changed; shift mask1Color to mask3Color, and mask3Color to mask1Color.

  • dbcFixedMask3Shift: Shapes with mask3Color are not changed; shift mask1Color to mask2Color, and mask2Color to mask1Color.

Return Value

Boolean

Returns true if the function runs successfully.
Returns false if there is an error.

Example

dbInstId      inst;                     // for example, ID from dbCreateInst();
unsigned int numLayers = 0; // initialize to 0
dbLayerShift *layerShiftPairs; = NULL;  // initialize to NULL pointer
dbInstGetLayerShifts(inst, &numLayers, &layerShiftPairs);

Returns the layer shifts that are set for instance inst as a list of numLayers layer-shift pairs.

dbInstHasLayerShifts

Boolean
dbInstHasLayerShifts(
dbInstId instId
);

Description

Indicates whether the per-layer color shifts are specified on the instance.

You must set the layer shift information for a cellview before setting the layer shift information on instances in the cellview. To do this, use the following:
if (!dbCellViewHasLayerShifts(cv)) {
    dbCellViewUpdateLayerShifts(cv);

}

Arguments

instId

Instance ID

Return Value

Boolean

Returns true if per-layer color shifts exist on the specified instance.
Returns false if per-layer color shifts do not exist on the specified instance.

dbInstSetLayerShifts

Boolean
dbInstSetLayerShifts(
dbInstId      instId,
unsigned int  numLayerShifts,
dbLayerShifts *layerShifts
);

Description

Sets the master layer shifting information specified in the given list of layer-shift pairs.

You must initialize the layer shift information for a cellview before setting the layer shift information on the instances in the cellview. To do this, use the following:
if (!dbCellViewHasLayerShifts(cv)) {
dbCellViewUpdateLayerShifts(cv);
}

Arguments

instId

Instance ID.

numLayerShifts

Specifies a size of the layerShifts array.

*layerShifts

Specifies a list of layer-shift pairs to be set on the specified instance. Each layer-shift pair is represented as {layer shift} where layer is the layer number and shift is one of the following enums:

  • dbcNoShift: There is no color shifting on this layer.
  • dbcShift1Shift: Shift colors by one (mask1Color to mask2Color, mask2Color to mask3Color, mask3Color to mask1Color).
  • dbcShift2Shift: Shift colors by two (mask1Color to mask3Color, mask2Color to mask1Color, mask3Color to mask2Color).
  • dbcFixedMask1Shift: Shapes with mask1Color are not changed; shift mask2Color to mask3Color, and mask3Color to mask2Color.

  • dbcFixedMask2Shift: Shapes with mask2Color are not changed; shift mask1Color to mask3Color, and mask3Color to mask1Color.
  • dbcFixedMask3Shift: Shapes with mask3Color are not changed; shift mask1Color to mask2Color, and mask2Color to mask1Color.

Return Value

Boolean

Returns true if the master layer shifting information is successfully set.
Returns false if there is an error.

Example

dbInstId inst;                     // for example, inst ID from dbCreateInst();
dbLayer  layers[3] = {20, 21, 22};
dbLayerShift shifts[3] = {{layers[0], dbcShift1Shift}, {layers[1], dbcFixedMask1Shift}, {layers[2], dbcNoShift}};
dbInstSetLayerShifts(inst, 3, shifts);

Sets layer shifts for instance inst to dbcShift1Shift, dbcFixedMask1Shift, and dbcNoShift on layers 20, 21, and 22, respectively.

dbInstClearLayerShifts

Boolean
dbInstClearLayerShifts(
dbInstId instId
);

Description

Removes all per-layer color shifting information from the specified instance.

Arguments

instId

Instance ID.

Return Value

Boolean

Returns true if the per-layer color shifting information is successfully removed from the specified instance.
Returns false if the per-layer color shifting information is not removed from the specified instance.

dbIsShapeColoringAllowed

Boolean
dbIsShapeColoringAllowed(
dbShapeId shapeId
);

Description

Indicates whether the specified shape can be colored. The following shapes can be colored—arcs, lines, donuts, ellipses, path segments, paths, rectangles, and polygons.

Arguments

shapeId

Shape ID.

Return Value

Boolean

Returns true if the shape can be colored.
Returns false if the shape cannot be colored or there is an error.

dbIsShapeColored

Boolean
dbIsShapeColored(
dbShapeId shapeId
);

Description

Indicates whether the specified shape is colored in color other than grayColor.

Arguments

shapeId

Shape ID.

Return Value

Boolean

Returns true if the shape is not colored in grayColor.
Returns false if the shape is colored in grayColor or there is an error.

dbGetShapeColor

dbMaskColorType 
dbGetShapeColor(
dbShapeId shapeId
);

Description

Returns the assigned color of the specified shape. By default, all newly created shapes have been assigned the color as grayColor. The assigned color of a shape can be different from the user color specification. The assigned color is based in the context of the cellview in which the shape is present and it is not the effective color of the shape in the context of the complete design.

Arguments

shapeId

ID of the shape whose color is to be returned.

Return Value

dbMaskColorType

Returns the color of the shape, which can be grayColor, mask1Color, mask2Color, or mask3Color.

dbIsShapeColorLocked

Boolean
dbIsShapeColorLocked(
dbShapeId shapeId
);

Description

Indicates whether the assigned color for the specified shape is locked.

Arguments

shapeId

Shape ID.

Return Value

Boolean

Returns true if the coloring of the specified shape is locked.
Returns false if the coloring of the specified shape is not locked or there is an error.

dbSetShapeColorLocked

Boolean
dbSetShapeColorLocked(
dbShapeId shapeId,
Boolean value
);

Description

Changes the state of the assigned coloring of the shape. This function results in an error if you try to change the lock state of a non-colorable shape. It also returns error if you try to change the lock state of a shape whose assigned color is grayColor.

Arguments

shapeId

Shape ID.

value

Indicates whether a lock state is to be set.

Return Value

Boolean

Returns true if the function runs successfully.
Returns false if there is an error.

dbIsBlockageColored

Boolean
dbIsBlockageColored(
dbBlockageId blockageId
);

Description

Indicates whether the specified blockage is colored in color other than grayColor.

Arguments

blockageId

Blockage ID.

Return Value

Boolean

Returns true if the blockage is not colored in grayColor.
Returns false if the blockage is colored in grayColor or there is an error.

dbIsBlockageColoringAllowed

Boolean
dbIsBlockageColoringAllowed(
dbBlockageId blockageId
);

Description

Indicates whether the specified blockage can be colored. Only layer blockages can be colored.

Arguments

blockageId

Blockage ID.

Return Value

Boolean

Returns true if the blockage can be colored.
Returns false if the blockage cannot be colored or there is an error.

dbGetBlockageColor

dbMaskColorType
dbGetBlockageColor(
dbBlockageId blockageId
);

Description

Returns the assigned color of the blockage. The default color type is grayColor.

Arguments

blockageId

Blockage ID.

Return Value

maskColorType

Returns the assigned color of the blockage, which can be grayColor, mask1Color, mask2Color, mask3Color, blackColor, or multiColor.

dbSetBlockageColor

Boolean
dbSetBlockageColor(
dbBlockageId    blockageId,
dbMaskColorType maskColorType
);

Description

Assigns color to the blockage. If you try to assign color to the blockage that cannot be colored, it results in an error.

Arguments

blockageId

Blockage ID.

maskColorType

Color to be assigned to the blockage.
Valid values: grayColor, mask1Color, mask2Color, mask3Color, blackColor, or multiColor.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbGetViaLayer1Control

dbColorControlType
dbGetViaLayer1Control(
dbViaId viaId
);

Description

Returns the color control assigned to the layer1 of the via. The default color control is noShifts.

Arguments

viaId

Via ID.

Return Value

dbColorControlType

Returns the color control assigned the layerv1 of the via.

Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, dbcShift2ColorControl, dbcShift3ColorControl, dbcShift4ColorControl, dbcShift5ColorControl, dbcShift6ColorControl, or dbcShift7ColorControl.

dbGetViaLayer2Control

dbColorControlType
dbGetViaLayer2Control(
dbViaId viaId
);

Description

Returns the color control assigned to the layer2 of the via. The default color control is noShifts.

Arguments

viaId

Via ID.

Return Value

dbColorControlType

Returns the color control assigned the layer2 of the via.

Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, dbcShift2ColorControl, dbcShift3ColorControl, dbcShift4ColorControl, dbcShift5ColorControl, dbcShift6ColorControl, or dbcShift7ColorControl.

dbGetViaCutLayerControl

dbColorControlType
dbGetViaCutLayerControl(
dbViaId viaId
);

Description

Returns the color control assigned to the cut layer of the via. Default color control is noShifts.

Arguments

viaId

Via ID.

Return Value

dbColorControlType

Returns the color control assigned to the cut layer of the via.

Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, dbcShift2ColorControl, dbcShift3ColorControl, dbcShift4ColorControl, dbcShift5ColorControl, dbcShift6ColorControl, or dbcShift7ColorControl.

dbGetViaLayerControl

dbColorControlType
dbGetViaLayerControl(
dbViaId        viaId,
dbViaLayerType layer
);

Description

Returns the color control type for the specified layer in a via.

Arguments

viaId

Database ID of a via.

layer

Name of a valid via layer type.

Valid values: dbcLayer1ViaLayer, dbcLayer2ViaLayer, dbcCutLayerViaLayer

Return Value

dbColorControlType

  

Returns the color control assigned for the specified layer in a via.

Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, dbcShift2ColorControl, dbcShift3ColorControl, dbcShift4ColorControl, dbcShift5ColorControl, dbcShift6ColorControl, or dbcShift7ColorControl

Example

bool    retVal = dbSetViaLayerControl(viaId, dbcLayer1ViaLayer, dbcShift4ColorControl);
dbColorControlType t1 = dbGetViaLayerControl(viaId, dbcLayer1ViaLayer);
bool    retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer, true);
bool    isLockedLayer1 = dbIsViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer);
retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer, true);
bool    isLockedLayer2 = dbIsViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer);

In this example, first the color control type dbcShift4ColorControl is set for the layer dbcLayer1ViaLayer in the via viaID.

Next, the color state for layers dbcLayer1ViaLayer and dbcLayer2ViaLayer in the via viaID is changed to locked. dbIsViaColorStateLayerLocked is used to ensure that the color state for the specified layers has been changed.

dbIsViaColorStateLocked

Boolean
dbIsViaColorStateLocked(
dbViaId viaId
);

Description

Indicates whether the coloring on the via is locked. The default value is nil.

Arguments

viaId

Via ID.

Return Value

Boolean

Returns true if via coloring is locked.
Returns false if via coloring is unlocked or there is an error.

dbIsViaColorStateLayerLocked

Boolean
dbIsViaColorStateLayerLocked(
dbViaId        viaId,
dbViaLayerType layer
);

Description

Indicates whether the coloring for the specified individual layer in a via is locked.

Arguments

viaId

Database ID of a via.

layer

Name of a valid via layer type.

Valid values: dbcLayer1ViaLayer, dbcLayer2ViaLayer, dbcCutLayerViaLayer

Return Value

Boolean

Returns TRUE if the coloring state for the specified individual layer in a via is locked.

Returns FALSE the coloring state for the specified individual layer in a via is not locked or if there is an error.

Example

bool    retVal = dbSetViaLayerControl(viaId, dbcLayer1ViaLayer, dbcShift4ColorControl);
dbColorControlType t1 = dbGetViaLayerControl(viaId, dbcLayer1ViaLayer);
bool    retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer, true);
bool    isLockedLayer1 = dbIsViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer);
retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer, true);
bool    isLockedLayer2 = dbIsViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer);

In this example, first the color control type dbcShift4ColorControl is set for the layer dbcLayer1ViaLayer in the via viaID.

Next, the color state for layers dbcLayer1ViaLayer and dbcLayer2ViaLayer in the via viaID is changed to locked. dbIsViaColorStateLayerLocked is used to ensure that the color state for the specified layers has been changed.

dbSetViaLayer1Control

Boolean
dbSetViaLayer1Control(
dbViaId            viaId,
dbColorControlType colorControlType
);

Description

Sets the color control for the layer1 shapes of the via master. If you try to assign color control to the layer without allowed colored masks or if via color state is locked, it results in an error.

Arguments

viaId

Via ID.

colorControlType

Color control to be assigned to the layer1 shapes of the via master.
Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and so on, up to dbcShiftxColorControl, where x is an integer equal to (number of masks for the via layer - 1). For example, the valid values for a 3-mask via layer are: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and dbcShift2ColorControl.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbSetViaLayer2Control

Boolean
dbSetViaLayer2Control(
dbViaId            viaId,
dbColorControlType colorControlType
);

Description

Sets the color control for the layer2 shapes of the via master. If you try to assign color control to the layer without allowed colored masks or if the via color state is locked, it results in an error.

Arguments

viaId

Via ID.

colorControlType

Color control to be assigned to the layer2 shapes of the via master.
Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and so on, up to dbcShiftxColorControl, where x is an integer equal to (number of masks for the via layer - 1). For example, the valid values for a 3-mask via layer are: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and dbcShift2ColorControl.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbSetViaCutLayerControl

Boolean
dbSetViaCutLayerControl(
dbViaId            viaId,
dbColorControlType colorControlType
);

Description

Sets the color control for the cut layer shapes of the via master. If you try to assign color control to the layer without allowed colored masks or if via color state is locked, it results in an error.

Arguments

viaId

Via ID.

colorControlType

Color control to be assigned to the cut layer shapes of the via master.
Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and so on, up to dbcShiftxColorControl, where x is an integer equal to (number of masks for the via layer - 1). For example, the valid values for a 3-mask via layer are: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and dbcShift2ColorControl.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbSetViaLayerControl

Boolean
dbSetViaLayerControl(
dbViaId            viaId,
dbViaLayerType     layer,
dbColorControlType control
);

Description

Sets the specified color control type for the specified layer in a via.

Arguments

viaId

Database ID of a via.

layer

Name of a valid via layer type.

Valid values: dbcLayer1ViaLayer, dbcLayer2ViaLayer, dbcCutLayerViaLayer

control

Color control to be assigned to the specified layer in a via.

Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and so on, up to dbcShiftxColorControl, where x is an integer equal to (number of masks for the via layer - 1). For example, the valid values for a 3-mask via layer are: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and dbcShift2ColorControl.

Return Value

Boolean

TRUE, if the specified color control type is set for the specified layer in the given via.

FALSE, if the specified color control type is not set for the specified layer in the given via, or if the operation failed.

Example

bool    retVal = dbSetViaLayerControl(viaId, dbcLayer1ViaLayer, dbcShift4ColorControl);
dbColorControlType t1 = dbGetViaLayerControl(viaId, dbcLayer1ViaLayer);
bool    retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer, true);
bool    isLockedLayer1 = dbIsViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer);
retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer, true);
bool    isLockedLayer2 = dbIsViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer);

In this example, first the color control type dbcShift4ColorControl is set for the layer dbcLayer1ViaLayer in the via viaID.

Next, the color state for layers dbcLayer1ViaLayer and dbcLayer2ViaLayer in the via viaID is changed to locked. dbIsViaColorStateLayerLocked is used to ensure that the color state for the specified layers has been changed.

dbSetViaColorStateLocked

Boolean
dbSetViaColorStateLocked(
dbViaId viaId
);

Description

Sets the color state for the specified via. If you try to set the color or color state of a via when the specified layer associated with the via is unbound or does not support coloring, it results in an error.

Arguments

viaId

Via ID.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbSetViaColorStateLayerLocked

Boolean
dbSetViaColorStateLayerLocked(
dbViaId        viaId,
dbViaLayerType layer,
Boolean        value
);

Description

Changes the color state for individual layers in a via.

Arguments

viaId

Database ID of a via.

layer

Value of a valid via layer type.

Valid values: dbcLayer1ViaLayer, dbcLayer2ViaLayer, dbcCutLayerViaLayer

value

Specifies one of the two Boolean values: TRUE or FALSE.

TRUE to change the color state to locked and FALSE to change the state to unlocked.

Return Value

Boolean

TRUE if the color state for a specific layer has been successfully set to the desired value.

FALSE in case of an error.

Example

bool    retVal = dbSetViaLayerControl(viaId, dbcLayer1ViaLayer, dbcShift4ColorControl);
dbColorControlType t1 = dbGetViaLayerControl(viaId, dbcLayer1ViaLayer);
bool    retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer, true);
bool    isLockedLayer1 = dbIsViaColorStateLayerLocked(viaId, dbcLayer1ViaLayer);
retValLocked = dbSetViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer, true);
bool    isLockedLayer2 = dbIsViaColorStateLayerLocked(viaId, dbcLayer2ViaLayer);

In this example, first the color control type dbcShift4ColorControl is set for the layer dbcLayer1ViaLayer in the via viaID.

Next, the color state for layers dbcLayer1ViaLayer and dbcLayer2ViaLayer in the via viaID is changed to locked. dbIsViaColorStateLayerLocked is used to ensure that the color state for the specified layers has been changed.

dbSetViaColorInfo

Boolean
dbSetViaColorInfo(
dbViaId             viaId,
dbViaLayerColorInfo *layer1ControlInfo, 
dbViaLayerColorInfo *layer2ControlInfo, 
dbViaLayerColorInfo *cutLayerControlInfo 
);

Description

Updates the color controls and states of the given via. The color information arguments correspond to the three via layers (via layer1, via layer2, and cut layer).

A warning message is displayed with a return value of FALSE for error conditions such as the following:

Arguments

viaId

Database ID of the via.

*layer1ColorInfo

Specifies the color information for via layer1 as a C struct with two fields:

  • control
    Color control to be assigned to the via layer of the given via.
    Valid values: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and so on, up to dbcShiftxColorControl, where x is an integer equal to the number of masks for the via layer - 1. For example, the valid values for a 3-mask via layer are: dbcNoColorColorControl, dbcNoShiftColorControl, dbcShift1ColorControl, and dbcShift2ColorControl.
  • lock
    Specifies one of two Boolean values: TRUE or FALSE, where TRUE changes the via layer state to locked, and FALSE changes the state to unlocked.

Use NULL for no change to the via layer.

*layer2ColorInfo

Specifies the color information for via layer2, in the same format as *layer1ColorInfo.

*cutLayerColorInfo

Specifies the color information for the via cut layer, in the same format as *layer1ColorInfo.

Return Value

Boolean

Returns TRUE if the function runs successfully.
Returns FALSE if there is an error.

dbIsTrackPatternColored

Boolean
dbIsTrackPatternColored(
dbTrackPatternId trackPatternId
);

Description

Indicates whether the specified first track of the specified track pattern is colored in color other than grayColor.

Arguments

trackPatternId

ID for the track pattern.

Return Value

Boolean

Returns true if the first track of the track pattern is not colored in grayColor.
Returns false if the first track of the track pattern is colored in grayColor or there is an error.

dbIsTrackPatternColorAlternating

Boolean
dbIsTrackPatternColorAlternating(
dbTrackPatternId trackPatternId
);

Description

Indicates whether coloring for the specified track pattern is alternating.

Arguments

trackPatternId

ID for the track pattern.

Return Value

Boolean

Returns true if the track pattern coloring is alternating.
Returns false if the track pattern coloring is not alternating or if there is an error.

dbIsTrackPatternColoringAllowed

Boolean
dbIsTrackPatternColoringAllowed(
dbTrackPatternId trackPatternId
);

Description

Indicates whether the specified track pattern can be colored. Only track patterns where a routing layer is specified can be colored.

Arguments

trackPatternId

ID for the track pattern.

Return Value

Boolean

Returns true if the track pattern can be colored.
Returns false if the track pattern cannot be colored or if there is an error.

dbGetTrackPatternFirstTrackColor

dbMaskColorType
dbGetTrackPatternFirstTrackColor(
dbTrackPatternId trackPatternId
);

Description

Returns the assigned color of the first track of the specified track pattern. The default color type is grayColor.

Arguments

trackPatternId

ID for the track pattern.

Return Value

maskColorType

Returns the assigned color of the first track of the specified track pattern, which can be grayColor, mask1Color, mask2Color, or mask3Color.

dbSetTrackPatternFirstTrackColor

Boolean
dbSetTrackPatternFirstTrackColor(
dbTrackPatternId trackPatternId,
dbMaskColor      maskColor
);

Description

Assigns the color to the first track of the specified track pattern. If you assign color to the first track of the track pattern that cannot be colored, it results in an error.

Arguments

trackPatternId

ID for the track pattern.

maskColor

Color to be assigned to the first track of the specified track pattern.
Valid values: grayColor, mask1Color, mask2Color, or mask3Color.

Return Value

Boolean

Returns true if the function runs successfully.
Returns false if there is an error.

dbSetTrackPatternColorAlternating

Boolean
dbSetTrackPatternColorAlternating(
dbTrackPatternId trackPatternId,
Boolean          setLocked
);

Description

Sets the coloring type of the specified track pattern. An error occurs if you try to set the color or color control of a track pattern when the track pattern has no routing layer or the routing layer is unbound and does not support coloring.

Arguments

trackPatternId

ID for the track pattern.

setLocked

Coloring type to be set.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbCreateSameMaskGroup

dbGroupId
dbCreateSameMaskGroup(
dbCellViewId cellViewId,
constString  groupName
);

Description

Creates same mask color group in the specified cellview.

Arguments

cellViewId

Cellview ID.

groupName

Name of the color group to be created.

Return Value

groupId

Returns the created same mask color group ID.

dbCreateDiffMaskGroup

dbGroupId
dbCreateDiffMaskGroup(
dbCellViewId cellViewId,
constString  groupName,
dbGroupId    sameMaskGroup1,
dbGroupId    sameMaskGroup2
);

Description

Creates diff mask color group in the specified cellview. This group defines a pair of groups of the shapes of different colors.

Arguments

cellViewId

Cellview ID.

groupName

Name of the color group to be created.

sameMaskGroup1

First group from the pair of groups of the shapes of different colors.

sameMaskGroup2

Second group from the pair of groups of the shapes of different colors.

Return Value

groupId

Returns the created diff mask color group ID.

dbColoredShapeQuery

void
dbColoredShapeQuery(
dbCellViewId         cellViewId,
dbLayer              layer,
dbPurpose            purpose,
dbBBox               *region,
dbTransform          transform,
unsigned int         filterSize,
unsigned int         startLevel,
unsigned int         stopLevel,
dbShapeQueryConsumer shapeConsumer,
void                 *clientData
);

Description

Returns a list of pairs of all the shapes and their colors in a cellview whose bounding boxes overlap the region specified by l_bBox.

The effective color of a shape is the color after applying any hierarchical shifting that may be specified at different levels of the design hierarchy. This effective color may not be the color assigned to the shape.

Arguments

cellViewId

Cellview ID.

layer

Layer number or layer ID.

purpose

Purpose of the layer.

*region

Specifies the region that should overlap bounding boxes of all returned shapes.

transform

Describes the initial transformation to be used during the region querying process, such as offset, rotation, and/or magnification. If no transform argument is specified, the initial formation defaults to offset (0,0),and orientation R0.

filterSize

Shapes filter size. The query produces only shapes with a size larger than the filter size. If no filterSize argument is specified, the blockage filter size defaults to 0.

startLevel

Level of the design hierarchy in which to start the querying process. If the startLevel argument is not specified, the start level defaults to 0.

stopLevel

Level of the design hierarchy in which to stop the querying process. If the stopLevel argument is not specified, the stop level defaults to maximum hierarchy depth.

shapeConsumer

Calls the dbShapeQueryConsumer function that returns the color of the shape using the corresponding dbQueryStateId.

Return Value

void

No return value.

dbGetIntegrationColorModel

Boolean
dbGetIntegrationColorModel(
dbCellViewId                cellViewId
dbIntegrationColorModelType *type
);
typedef enum dbIntegrationColorModelType {
dbcUnknownIntegrationColorModel=0,
dbcAnyIntegrationColorModel=1,
dbcLockedIntegrationColorModel=2
} dbIntegrationColorModelType;

Description

Returns the integration color model constraint value for the specified cell view. The valid values are any or locked.

Arguments

cellViewId

Cellview ID.

*type

Integration color model type.
Valid values: any or locked.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if the constraint value does not exist for the cellview. In this case, the type field is left blank.

dbGetColorModel

Boolean
dbGetColorModel(
dbCellViewId     cellViewId,
dbColorModelType *type
);

Description

Returns the value of color model constraint for the specified cell view. Possible values are any, layerBased, or locked. If the constraint value is not specified on the cellview, this function returns false.

Arguments

cellViewId

Cellview ID.

*type

Color model constraint type.
Valid values: any, layerBased, or locked.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if the constraint value does not exist for the specified cellview. In this case, the type field is left blank.

dbSetIntegrationColorModel

void
dbSetIntegrationColorModel(
dbCellViewId                cellViewId,
dbIntegrationColorModelType type
);

Description

Sets the value of integration color model constraint for the specified cellview. Possible values are any, or locked.

Arguments

cellViewId

Cellview ID.

type

Integration color model to be set.
Valid values: any, or locked.

Return Value

void

No return value.

dbSetColorModel

Boolean
dbSetColorModel(
dbCellViewId     cellViewId,
dbColorModelType type
);
typedef enum dbColorModelType {
dbcAnyColorModel=0,
dbcLayerBasedColorModel=1,
dbcLockedColorModel=2
} dbColorModelType;

Description

Sets the value of color model constraint for the specified cell view. Possible values are any, layerBased, or locked.

Arguments

cellViewId

Cellview ID.

type

Color model to be set.
Valid values: any, layerBased, or locked.

Return Value

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

dbGetShapeColorLockType

dbColorLockType
dbGetShapeColorLockType(
dbShapeId shapeId
);

Description

Returns the color lock type assigned to the specified shape. If the shape is not locked, unlocked is returned. By default, dbcUser lock type is assigned to locked shapes.

Arguments

shapeId

The database ID of a shape.

Return Value

dbColorLockType

Color lock type assigned to the specified shape.

Possible values are dbcUnlocked, dbcUser, and dbcSystem.

  • dbcUser: Coloring of the shape is locked.
  • dbcSystem: Coloring of the shape was locked by automated coloring tools.
  • dbcUnlocked: The shape is not locked.

Example

dbShapeId shape = dbCreateRect(...);
dbSetShapeColor(shape "mask1Color");
assert(dbGetShapeColorLockType(shape) == dbcUnlocked);
dbSetShapeColorLocked(shape TRUE);
assert(dbGetShapeColorLockType(shape) == dbcUser);
dbSetShapeColorLockType(shape dbcSystem);
assert(dbGetShapeColorLockType(shape) == dbcSystem);
dbSetShapeColorLockType(shape dbcUnlocked);
assert(dbGetShapeColorLockType(shape) == dbcUnlocked);
assert(!dbIsShapeColorLocked(shape));

dbSetShapeColorLockType

Boolean
dbSetShapeColorLockType(
dbShapeId       shapeId,
dbColorLockType lockType
);

Description

Sets the color lock type for the specified shape.

Arguments

shapeId

The database ID of a shape.

lockType

Color lock type to assign to the specified shape.

Valid input values are integer constants dbcUnlocked, dbcUser, dbcSystem, respectively.

  • dbcUser Sets coloring of the via layer to locked, with lock type dbcUser. All via layers locked in the older versions of Virtuoso have these lock type.
  • dbcSystem Sets coloring of the via layer to locked, with lock type dbcSystem. This lock type indicates that the via layer was locked by an automated coloring tool.
  • dbcUnlocked Unlocks coloring of the via layer and clears information about its lock type.
  • Default value for existing locked shapes: dbcUser

Default value for existing locked shapes: dbcUser

Return Value

Boolean

Returns true if the specified lock type is successfully set.

  

Returns false is the lock type is not set.

Example

dbShapeId shape = dbCreateRect(...);
dbSetShapeColor(shape "mask1Color");
assert(dbGetShapeColorLockType(shape) == dbcUnlocked);
dbSetShapeColorLocked(shape TRUE);
assert(dbGetShapeColorLockType(shape) == dbcUser);
dbSetShapeColorLockType(shape dbcSystem);
assert(dbGetShapeColorLockType(shape) == dbcSystem);
dbSetShapeColorLockType(shape dbcUnlocked);
assert(dbGetShapeColorLockType(shape) == dbcUnlocked);
assert(!dbIsShapeColorLocked(shape));

dbGetViaLayerColorLockType

dbColorLockType
dbGetViaLayerColorLockType(
dbViaId        viaId,
dbViaLayerType layer
);

Description

Returns the color lock type assigned to the specified via layer.

Arguments

viaId

The database ID of a via layer.

viaLayerType

Specifies the via layer type.

Valid values: layer1, layer2, cutLayer

Return Value

dbColorLockType

Color lock type assigned to the specified via layer.

Color lock type assigned to the specified shape.

Possible values are dbcUnlocked, dbcUser, and dbcSystem.

  • dbcUser: Coloring of the shape is locked.
  • dbcSystem: Coloring of the shape was locked by automated coloring tools.
  • dbcUnlocked: The shape is not locked.

Example

dbViaId via = dbCreateStdVia(...);
dbViaLayerColorInfo l1 = { dbcShift1ColorControl, FALSE };
dbSetViaColorInfo(via l1 NULL NULL);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUnlocked);
dbSetViaColorStateLayerLocked(via dbcLayer1ViaLayer TRUE);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUser);
dbSetViaLayerColorLockType(via dbcLayer1ViaLayer dbcSystem);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcSystem);
dbSetViaLayerColorLockType(via dbcLayer1ViaLayer dbcUnlocked);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUnlocked);
assert(!dbIsViaColorStateLayerLocked(via dbcLayer1ViaLayer));

dbSetViaLayerColorLockType

Boolean
dbSetViaLayerColorLockType(
dbViaId          viaId,
dbViaLayerType   layer,
dbColorLockType  value
);

Description

Sets the color lock type for the specified via layer.

Arguments

viaId

The database ID of a via layer.

layer

Specifies the via layer type.

Valid values: layer1, layer2, cutLayer

value

Color lock type to assign to the specified via layer.

Valid input values are integer constants dbcUnlocked, dbcUser, dbcSystem, respectively.

  • dbcUser Sets coloring of the via layer to locked, with lock type dbcUser. All via layers locked in the older versions of Virtuoso have these lock type.
  • dbcSystem Sets coloring of the via layer to locked, with lock type dbcSystem. This lock type indicates that the via layer was locked by an automated coloring tool.
  • dbcUnlocked Unlocks coloring of the via layer and clears information about its lock type.

Default value for existing locked shapes: dbcUser

Return Value

Boolean

If true the specified lock type is successfully set.

  

If false the lock type is not set.

Example

dbViaId via = dbCreateStdVia(...);
dbViaLayerColorInfo l1 = { dbcShift1ColorControl, FALSE };
dbSetViaColorInfo(via l1 NULL NULL);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUnlocked);
dbSetViaColorStateLayerLocked(via dbcLayer1ViaLayer TRUE);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUser);
dbSetViaLayerColorLockType(via dbcLayer1ViaLayer dbcSystem);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcSystem);
dbSetViaLayerColorLockType(via dbcLayer1ViaLayer dbcUnlocked);
assert(dbGetViaLayerLockType(via dbcLayer1ViaLayer) == dbcUnlocked);

assert(!dbIsViaColorStateLayerLocked(via dbcLayer1ViaLayer));

MPT Technology File Functions

This section describes the following MPT technology file functions:

techGetIntegrationColorModel

Boolean 
techGetIntegrationColorModel(
techFileId                    techfileId,
techIntegrationColorModelType *type
);
typedef enum techIntegrationColorModelType {
techcAnyIntegrationColorModel=0,
techcLockedIntegrationColorModel=1
} techIntegrationColorModelType;

Description

Returns the value of integration color model constraint for the specified technology file. Possible values are any or locked.

Arguments

techId

The identifier of the technology database.

*type

Integration color model type.
Valid values: any or locked.

Return Values

Boolean

Returns true if function runs successfully.
Returns false if the constraint value does not exist for the cellview. In this case, the type field is left blank.

techGetLayerNumColorMasks

unsigned int
techGetLayerNumColorMasks(
techFileId   techId,
techLayerNum layerNum
);

Description

Returns the number of allowed color masks on the specified layer. The return value 0 indicates coloring is not supported on the specified layer.

Arguments

techId

The identifier of the technology database.

layerNum

The layer name or layer number.

Return Values

unsigned int

Returns the number of allowed color masks on the layer (0, 2, or 3).

techGetStdViaDefCutColoring

techCutColoringType
techGetStdViaDefCutColoring(
techViaDefId viaDefId
);

Description

Returns the cut coloring pattern used for the cut patterns created for the specified StdVia.

Arguments

viaDefId

The database identifier of the via definition.

Return Values

techCutColoringType

Returns the cut coloring pattern on the specified StdViadef.

techGetTechCutColoring

techCutColoringType
techGetTechCutColoring(
techfileId techfile
);

Description

Returns the default cut coloring pattern used for the cut patterns created for all StdVias defined in the technology. This function returns the checkerboard pattern by default if the cut pattern coloring is not explicitly specified.

Arguments

techfile

The identifier of the technology database.

Return Values

techCutColoringType

Returns the default cut coloring model for stdViaDef cuts in the specified technology.

techIsStdViaDefCutColoringSet

Boolean
techIsStdViaDefCutColoringSet(
techViaDefId viaDefId
);

Description

Indicates whether the cut coloring pattern has been explicitly set on the specified StdViaDef.

Arguments

viaDefId

The database identifier of the via definition.

Return Values

Boolean

Returns true if the cut coloring pattern is explicitly set on the StdViaDef.
Returns false if the cut coloring pattern is not set of if there is an error.

techSetIntegrationColorModel

void
techSetIntegrationColorModel(
techFileId                    techfileId,
techIntegrationColorModelType type
);
typedef enum techIntegrationColorModelType {
techcAnyIntegrationColorModel=0,
techcLockedIntegrationColorModel=1
} techIntegrationColorModelType;

Description

Sets the value of the integration color model constraint for the specified technology file. Possible values are any or locked.

Arguments

techfileId

The identifier of the technology database.

type

Integration color model type.
Valid values: any or locked.

Return Values

void

No return value.

techSetLayerNumColorMasks

Boolean
techSetLayerNumColorMasks(
techFileId   techfileId,
techLayerNum layerNum,
unsigned int numColorMasks
);

Description

Assigns the number of allowed color masks on the specified layer. The valid color masks that can be set are 0, 2, and 3. If you try to set the color mask number to a value 1 or greater than 3, the function results in an error. This function does not set the attribute on the DFII system reserved layers.

Arguments

techfileId

The identifier of the technology database.

layerNum

Layer name or layer number.

numColorMasks

Number of color masks to be set
Valid Values: 0, 2, and 3.

Return Values

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

techSetStdViaDefCutColoring

Boolean
techSetStdViaDefCutColoring(
techViaDefId        viaDefId,
techCutColoringType type
);

Description

Sets the cut coloring pattern to be used for the cut patterns created for the specified StdVia.

Arguments

viaDefId

The database identifier of the via definition.

Return Values

Boolean

Returns true if function runs successfully.
Returns false if there is an error.

techSetTechCutColoring

Boolean
techSetTechCutColoring(
techfileId          techfile,
techCutColoringType type
);

Description

Sets the default cut coloring pattern to be used for the cut patterns created for all StdVias defined in the specified technology file.

Arguments

techfileId

The identifier of the technology database.

type

Cut coloring pattern to be set.
Valid Values: checkerboard or alternatingRows.

Return Values

Boolean

Returns true if function runs successfully.
Returns false if there is an error.


Return to top
 ⠀
X