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

17


CST Access C Functions

This chapter describes the CST Access C API’s.

For more information, see the following topics:

Constraint Functions

This section describes the following constraint functions.

cstCreateLayerConstraint

cstLayerConstraintId
cstCreateLayerConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstConstraintDescriptor  descriptor,
cstLayerNum              layerNum,
cstPurpose               purpose,
dbPropType               valueType,
dbPropValue              value,
dbPropType               paramListType,
dbPropValue              listParams,
cppConstString           constraintName
); 

Description

Creates a layer constraint in the constraint group (cstConstraintGroupId) with the specified constraint definition name (constraintDefName), layers, constraint value, constraint parameters, hard attribute (descriptor), the position of the constraint with the members of the constraint group (descriptor) and the name of the constraint.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

descriptor

The descriptor can be a cstcHardConstraintDescriptor, a cstcAppendConstraintDescriptor, or both (cstcHardConstraintDescriptor | cstcAppendConstraintDescriptor).
If cstcHardConstraintDescriptor is not specified then the constraint is a "soft" constraint.
If cstcAppendConstraintDescriptor is not specified then the constraint will be put to the front of the member list.

layerNum

The layer number of the constraint. If the layer number is unknown, an error results

purpose

The purpose number of the layer constraint.

valueType

The type of value for the layer constraint.

value

The value for the layer constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

constraintName

The name of the layer constraint.

Return Value

cstLayerConstraintId

Returns the cstLayerConstraintId of the created layer constraint.

cstCreateLayerPairConstraint

cstLayerPairConstaintId
cstCreateLayerPairConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstConstraintDescriptor  descriptor,
cstLayerNum              layerNum1,
cstPurpose               purpose1,
cstLayerNum              layerNum2,
cstPurpose               purpose2,
dbPropType               valueType,
dbPropValue              value,
dbPropType               paramListType,
dbPropValue              listParams,
cppConstString           constraintName
); 

Description

Creates a layer-purpose pair constraint in the constraint group (cstConstraintGroupId) with the specified constraint definition name (constraintDefName), layers, constraint value, constraint parameters, hard attribute (descriptor), the position of the constraint with the members of the constraint group (descriptor) and the name of the constraint.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

descriptor

The descriptor can be a cstcHardConstraintDescriptor, a cstcAppendConstraintDescriptor, or both (cstcHardConstraintDescriptor | cstcAppendConstraintDescriptor).
If cstcHardConstraintDescriptor is not specified then the constraint is a "soft" constraint.
If cstcAppendConstraintDescriptor is not specified then the constraint will be put to the front of the member list.

layerNum1

The layer number of the first layer-purpose pair constraint. If the layer number is unknown, an error results

purpose1

The purpose number of the first layer-purpose pair constraint.

layerNum2

The layer number of the second layer-purpose pair constraint, if a two-layer constraint is being updated.

purpose2

The purpose number of the second layer-purpose pair constraint.

valueType

The type of value for the layer-purpose pair constraint.

value

The value for the layer-purpose pair constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

constraintName

The name of the layer-purpose pair constraint.

Return Value

cstLayerPairConstraintId

Returns the constraint ID created with two layers or layer-purpose pairs.

cstCreateLayerArrayConstraint

cstLayerArrayConstraintId
cstCreateLayerArrayConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstConstraintDescriptor  descriptor,
unsigned int             numLayers,
cstLayerNum              layerNums,
cstPurpose               purposes,
dbPropType               valueType,
dbPropValue              value,
dbPropType               paramListType,
dbPropValue              listParams,
cppConstString           constraintName
); 

Description

Creates a layer array constraint in the constraint group (cstConstraintGroupId) with the specified constraint definition name (constraintDefName), layers, constraint value, constraint parameters, hard attribute(descriptor), the position of the constraint with the members of the constraint group (descriptor) and the name of the constraint.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

descriptor

The descriptor can be a cstcHardConstraintDescriptor, a cstcAppendConstraintDescriptor, or both (cstcHardConstraintDescriptor | cstcAppendConstraintDescriptor).
If cstcHardConstraintDescriptor is not specified then the constraint is a "soft" constraint.
If cstcAppendConstraintDescriptor is not specified then the constraint will be put to the front of the member list.

numLayers

The number of layers in the array of layerNums

layerNums

The layer number of the array constraint. An array contains layer numbers. If the layer number is unknown, an error results.

purposes

The purpose number of the layer array constraint. An array contains purpose numbers.

valueType

The type of value for the layer array constraint.

value

The value for the layer array constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

constraintName

The name of the layer array constraint.

Return Value

cstLayerArrayConstraintId

Returns the constraint ID created with the layer or layer-purpose pair array.

cstCreateSimpleConstraint

cstSimpleConstraintId
cstCreateSimpleConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstConstraintDescriptor  descriptor,
dbPropType               valueType,
dbPropValue              value,
dbPropType               paramListType,
dbPropValue              listParams,
cppConstString           constraintName
);

Description

Creates a simple constraint in the constraint group (cstConstraintGroupId) with the specified constraint definition name (constraintDefName), layers, constraint value, constraint parameters, hard attribute (descriptor), the position of the constraint with the members of the constraint group (descriptor) and the name of the constraint.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

descriptor

The descriptor can be a cstcHardConstraintDescriptor, a cstcAppendConstraintDescriptor, or both (cstcHardConstraintDescriptor | cstcAppendConstraintDescriptor).
If cstcHardConstraintDescriptor is not specified then the constraint is a "soft" constraint.
If cstcAppendConstraintDescriptor is not specified then the constraint will be put to the front of the member list.

valueType

The type of value for the simple constraint.

value

The value for the simple constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

constraintName

The name of the simple constraint.

Return Value

cstSimpleConstraintId

Returns the cstSimpleConstraintId of the created simple constraint.

cstAddToConstraintGroup

Boolean
cstAddToConstraintGroup(
cstConstraintGroupId  groupId,
cstConstraintGroupId  memberGroupId,
Boolean             append
);

Description

Adds a constraint group ID (cstMemberConstraintGroupId) to be a member constraint group of the containing constraint. You can position the constraint group at the beginning of the members or at the end of the members with append. The default value for append is nil, which means that add the constraint group to the beginning of the members. The member constraintGroup cannot be owned by other objects.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

memberGroupID

The ID of the member constraint group.

append

A boolean having a value as either ‘nil’ or ‘t’. Having the value as ‘nil’ puts this constraint to the first member in the constraint group. The present first constraint group member is moved to the second and subsequent members are also moved down in order. However, if the value is ‘t’, then the constraint is put to the end of the member in the constraint group.

Return Value

Boolean

Returns TRUE when cstAddtoConstraintGroup successfully adds a constraint to a constraint group.
Returns FALSE if member constraint cannot be added to a constraint group.

cstReplaceIdsInConstraintGroup

Boolean
cstReplaceIdsInConstraintGroup(
cstConstraintGroupId  groupId,
unsigned int          numObjects,
cstId                 *Ids 
); 

Description

You can set numObjects = 0 and Ids = NULL to remove the memberships of the constraints and member constraintGroups from the specified constraintGroup. If numObjects is the number of Ids(IDs), the Ids will become members of the constraintGroup.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

numObjects

The number of Ids (constraint IDs and/or constraintGroup IDs).

*Ids

The array contains constraint IDs and/or constraintGroup IDs.

Return Value

boolean

Returns TRUE when Ids are successfully replaced into the constraint group.
Returns FALSE if the Ids cannot be replaced into the constraint group .

cstDeleteConstraint

Boolean
cstDeleteConstraint(
cstConstraintId constraintId
); 

Description

Deletes the constraint ID (constraintId) from any of the constraint groups it is a part of. It’s value and constraint parameters are also deleted.

Arguments

constraintId

The ID of the constraint.

Return Value

boolean

Returns TRUE when cstDeleteConstraint successfully deletes the constraint.
Returns FALSE when the pass-in constraint cannot be deleted.

cstGetType

cstType
cstGetType(
cstId Id
); 

Description

This function returns the type of the constraint.

Arguments

Id

The ID of the constraint.

Return Value

cstType

The valid values for the cstType that can be returned are:
cstcUnknownType = 0,
cstcLayerConstraintType = 2,
cstcLayerPairConstraintType = 3,
cstcLayerArrayConstraintType = 4,
cstcSimpleConstraintType = 5,
cstcConstraintGroupType = 6

cstGetConstraintDatabase

dbId
cstGetConstraintDatabase(
cstConstraintId constraintId
); 

Description

This function returns the identification of the constraint database. The database can either be dbCellViewId or techFile.

Arguments

constraintId

The ID of the constraint.

Return Value

dbID

Returns the ID of the constraint database.

cstGetConstraintDefName

String
cstGetConstraintDefName(
cstConstraintId constraintId
); 

Description

This function returns the name of the mapped DFII constraint that is used to get a corresponding oaConstraintDef. For example, the defName can be "minSpacing", "validLayer", "validVias", etc.

Arguments

constraintId

The ID of the constraint.

Return Value

string

The name of the mapped dfII constraint.

cstGetConstraintName

String
cstGetConstraintName(
cstConstraintId constraintId
); 

Description

This function returns the name of the constraint. If a name was not specified while creation, it is automatically generated.

Arguments

constraintId

The ID of the constraint.

Return Value

string

The name of the constraint.

cstGetConstraintDescription

String
cstGetConstraintDescription(
cstConstraintId constraintId
); 

Description

This function returns the description of the constraint.

Arguments

constraintId

The ID of the constraint.

Return Value

string

The description of the constraint.

cstGetConstraintID

String
cstGetConstraintId(
cstConstraintId constraintId
); 

Description

This function returns the identification of the constraint.

Arguments

constraintId

The string ID of the constraint.

Return Value

string

The identification of the constraint.

cstGetLayerConstraintLayer

Boolean
cstGetLayerConstraintLayer(
cstLayerConstraintId  constraintId,
cstLayerNum           *layerNum,
cstPurpose            *purpose
); 

Description

This function gets the layer number of the layer associated with the specified constraint.

Arguments

constraintId

The ID of the layer constraint.

layerNum

The layer number of the constraint.

purpose

The purpose number of the constraint.

Return Value

boolean

Returns TRUE when the layer number and purpose number are valid.
Returns FALSE when the layer number and purpose number are invalid.

cstGetLayerPairConstraintLayers

Boolean
cstGetLayerPairConstraintLayers(
cstLayerPairConstraintId  constraintId,
cstLayerNum               *layer1Num,
cstPurpose                *purpose1,
cstLayerNum               *layer2Num,
cstPurpose                *purpose2
); 

Description

This function gets the layer number of the layer associated with the specified layer-purpose pair constraint.

Arguments

constraintId

The ID of the layer constraint.

*layer1Num

The layer number of the first layer-purpose pair constraint.

*purpose1

The purpose number of the first layer-purpose pair constraint.

*layer2Num

The layer number of the second layer-purpose pair constraint.

*purpose2

The purpose number of the second layer-purpose pair constraint.

Return Value

boolean

Returns TRUE when the layer number and purpose number are valid.
Returns FALSE when the layer number and purpose number are invalid.

cstGetLayerArrayConstraintLayers

Boolean
cstGetLayerArrayConstraintLayers(
cstLayerArrayConstraintId  constraintId,
unsigned int               *numOfLayers,
cstLayerNum                *layerNums,
cstPurpose                 *purposeNums
); 

Description

This function gets the layer number of the layer associated with the specified array constraint.

Arguments

constraintId

The ID of the layer constraint.

*numOfLayers

The number of array constraint layers.

*layerNums

The layer number of the array constraint.

*purposeNums

The purpose number of the array constraint.

Return Value

boolean

Returns TRUE when the layer number and purpose number are valid.
Returns FALSE when the layer number and purpose number are invalid.

cstGetConstraintValue

Boolean
cstGetConstraintValue(
cstConstraintId  constraintId,
dbPropType       valueType,
dbPropValue      value
); 

Description

This function returns the value of the specified constraint.

Arguments

constraintId

The ID of the constraint.

valueType

The type of the constraint value.

value

The value of the constraint.

Return Value

boolean

Returns TRUE when value and valueType are successfully returned.
Returns FALSE when the function is unsuccessful.

cstSetConstraintValue

Boolean
cstSetConstraintValue(
cstConstraintId  constraintId,
dbPropType       valueType,
dbPropValue      value
); 

Description

This function sets the value of the specified constraint. The old value is destroyed.

Arguments

constraintId

The ID of the constraint.

valueType

The type of the constraint value.

value

The value to be set for the constraint.

Return Value

boolean

Returns TRUE when value and valueType are successfully set.
Returns FALSE when the function is unsuccessful.

cstGetConstraintParams

Boolean
cstGetConstraintParams(
cstConstraintId  constraintId,
dbPropType       *paramListType,
dbPropValue      *listParams
); 

Description

This function returns the parameters associated with the specified constraint.

Arguments

constraintId

The ID of the constraint.

*paramListType

A database constant variable, which is dbcILListType.

*listParams

A SKILL list of constraint parameters. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

Return Value

boolean

Returns TRUE when list of constraint parameters and list of types of constraint parameters are successfully returned.
Returns FALSE when the function is unsuccessful.

cstSetConstraintParams

Boolean
cstSetConstraintParams(
cstConstraintId  constraintId,
dbPropType       paramListType,
dbPropValue      listParams
); 

Description

This function sets the parameters for the specified constraint. The old parameters are destroyed.

Arguments

constraintId

The ID of the constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

Return Value

boolean

Returns TRUE when list of constraint parameters and list of types of constraint parameters are successfully set.
Returns FALSE when the function is unsuccessful.

cstIsHardConstraint

Boolean
cstIsHardConstraint(
cstconstraintId constraint
); 

Description

Returns a boolean value indicating that the constraint must be met. If cstcHardConstraintDescriptor is not specified then the constraint is a "soft" constraint. However, if a cstcAppendConstraintDescriptor is not specified then the constraint will be put to the front of the member list.

Arguments

constraint

The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint .

Return Value

boolean

Returns TRUE when it is a hard constraint.
Returns FALSE when it is not a hard constraint.

cstSetHardConstraint

Boolean
cstSetHardConstraint(
cstConstraintId  constraint,
Boolean          hard
); 

Description

This function sets a boolean attribute on the constraint indicating whether or not it is a hard constraint.

Arguments

constraint

The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint .

hard

A boolean indicating whether the constraint must be met. If the value is ‘nil’, it means that it is a soft constraint. By default, the value is ‘t.

Return Value

boolean

Returns TRUE when hard constraint is successfully set.
Returns FALSE when the function is unsuccessful.

cstSetConstraintID

Boolean
cstSetConstraintId(
cstConstraintId  constraint,
cppConstString   ID
); 

Description

This function sets the identification of the constraint.

Arguments

constraint

The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint .

ID

The string id to be set on this constraint.

Return Value

boolean

Returns TRUE when the ID for the constraint is successfully set.
Returns FALSE when the function is unsuccessful.

cstSetConstraintDescription

Boolean
cstSetConstraintDescription(
cstConstraintId  constraint,
cppConstString   description
); 

Description

This function sets the description of the constraint.

Arguments

constraint

The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint .

description

The string description to be set on the constraint.

Return Value

boolean

Returns TRUE when the description for the constraint is successfully set.
Returns FALSE when the function is unsuccessful.

Constraint Group Functions

This section describes the following constraint group functions.

cstCreateConstraintGroupOn

cstConstraintGroupId
cstCreateConstraintGroupOn(
dbId                  objectId, 
cppConstString        groupDefName, 
cstConstraintGroupOp  op
);

Description

Creates a constraint group ID on an object(e.g. net, term, etc) with arguments of the object ID, constraint group definition name, and operator symbol.

Arguments

objectID

The cellview object IDs applied with corresponding constraint group definition name.

groupDefName

The DFII constraint group definition name. For more information, refer to the CST SKILL API documentation.

op

The valid values of constraint group operator are:
cstcUnknownConstraintGroupOp = 0,
cstcPrecedenceConstraintGroupOp = 1,
cstcAndConstraintGroupOp = 2,
cstcOrConstraintGroupOp   = 3

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstFindConstraintGroupOn

cstConstraintGroupId
cstFindConstraintGroupOn(
dbId            objectId, 
cppConstString  groupDefName
);

Description

Returns a constraint group ID (constraintGroupId) from an object (object) with constraint group definition name. The constraint value is required while constraintParams are optional for this function.

Arguments

objectID

The cellview object IDs applied with corresponding constraint group definition name.

groupDefName

The DFII constraint group definition name. For more information, refer to the CST SKILL API documentation.

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstCreateConstraintGroupInTech

cstConstraintGroupId
cstCreateConstraintGroupInTech(
cstTechFileId         techfileId,
cppConstString        groupName,
cppConstString        groupDefName,
cstConstraintGroupOp  op
);

Description

Creates a constraint group in the technology database (i.e techDb) with arguments of the database ID, constraint group name, constraint group definition name and operator symbol.

Arguments

techfileId

The database identifier of the technology file.

groupName

The name of the constraint group that needs to be specified by the user.

groupDefName

The DFII constraint group definition name can be “userDefined”, “foundry”, “implicit”, “default”, “cutClass”.

op

The valid values of constraint group operator are:
cstcUnknownConstraintGroupOp = 0,
cstcPrecedenceConstraintGroupOp = 1,
cstcAndConstraintGroupOp = 2,
cstcOrConstraintGroupOp   = 3

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstCreateConstraintGroupInCellview

cstConstraintGroupId
cstCreateConstraintGroupInCellview(
dbCellViewId          cellViewId,
cppConstString        groupName,
cppConstString        groupDefName,
cstConstraintGroupOp  op
);

Description

This function creates a constraint group attached to a specified cellview of dbCellViewId.

Arguments

CellViewId

The database identifier of the cellview.

groupName

The name of the constraint group that needs to be specified by the user.

groupDefName

The DFII constraint group definition name can be “userDefined”, “implicit”, and “default”.

op

The valid values of constraint group operator are:
cstcUnknownConstraintGroupOp = 0,
cstcPrecedenceConstraintGroupOp = 1,
cstcAndConstraintGroupOp = 2,
cstcOrConstraintGroupOp   = 3

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstFindConstraintGroupInTech

cstConstraintGroupId
cstFindConstraintGroupInTech(
cstTechFileId   techfileId,
cppConstString  groupName,
Boolean         localOnly
);

Description

This function returns a constraint group ID (constraintGroupId) from a database ID (database) with constraint group name and a boolean flag (localOnly).

Arguments

techfileId

The database identifier of the technology file.

groupName

The name of the constraint group that needs to be specified by the user.

localOnly

Looks for a constraint group in an ITDB graph if the database ID is a technology database.

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstFindConstraintGroupInCellview

cstConstraintGroupId
cstFindConstraintGroupInCellview(
dbCellViewId    cellViewId,
cppConstString  groupName
);

Description

This function returns a constraint group attached to a specified cellview of dbCellViewId.

Arguments

CellViewId

The database identifier of the cellview.

groupName

The name of the constraint group that needs to be specified by the user.

Return Value

cstConstraintGroupID

The ID of the constraint group, which is created in the technology database or a cellview.

cstGetConstraintGroupOwner

dbId
cstGetConstraintGroupOwner(
cstConstraintGroupId group
);

Description

For a constraint group associated with a particular owning object, this function returns a pointer to that owning object.

Arguments

group

The ID of the constraint group, which is created in the technology database or a cellview.

Return Value

dbId

The database dbId for any database object.

cstGetConstraintGroupDatabase

dbId
cstGetConstraintGroupDatabase(
cstConstraintGroupId group
);

Description

This function returns database identifier (either techFileId or cellViewId) of the specified constraint group.

Arguments

group

The ID of the constraint group, which is created in the technology database or a cellview.

Return Value

dbId

The database dbId for any database object.

cstDeleteConstraintGroup

Boolean
cstDeleteConstraintGroup(
cstConstraintGroupId groupId
);

Description

Deletes the constraint group (constraintGroupId). The contained constraints in the constraint group are not automatically deleted when the constraintGroup is deleted. You can delete constraints which are only owned by the specified constraintGroup.

Arguments

groupId

The ID of the constraint group that is to be deleted.

Return Value

Boolean

Returns TRUE when the constraint group is successfully deleted.
Returns FALSE when unable to find a constraint group that is to be deleted.

cstAccessGetConstraintGroupName

String
cstAccessGetConstraintGroupName(
cstConstraintGroupId groupId
);

Description

This function returns the name of the constraint group.

Arguments

groupId

The ID of the constraint group.

Return Value

String

Returns the name of the constraint group.

cstGetConstraintGroupDefName

String
cstGetConstraintGroupDefName(
cstConstraintGroupId groupId
);

Description

This function gets the definition name of the DFII constraint group that is used to get a corresponding oaConstraintGroupDef. The DFII constraint group definition names can be “userDefined”, “foundry”, “implicit”, “default”, “taper”, “inputTaper”, “outputTaper”, “shielding”, transReflexive”, “reflexive”, “interChild”, “cutClass”.

Arguments

groupId

The ID of the constraint group.

Return Value

String

Returns the definition name of the DFII constraint group.

cstGetConstraintGroupOperator

cstConstraintGroupOp
cstGetConstraintGroupOperator(
cstConstraintGroupId groupId
);

Description

This function returns the constraint group operator associated with the constraint group.

Arguments

groupId

The ID of the constraint group.

Return Value

cstConstraintGroupOp

Returns the following valid values:
cstcUnknownConstraintGroupOp = 0,
cstcPrecedenceConstraintGroupOp = 1,
cstcAndConstraintGroupOp = 2,
cstcOrConstraintGroupOp = 3

Generator Functions

This section describes the following functions for generating constraints.

cstStartGenConstraintGroupToId

cstGenStateId
cstStartGenConstraintGroupToId(
cstConstraintGroupId groupId
); 

Description

This functions starts the generator for the member constraints and constraint groups of the specified constraint group.

Arguments

groupId

The ID of the constraintGroup, which is to own this constraint.

Return Value

cstGenStateID

Returns the generator state identifier to be used when generating constraint groups which contains the specified constraint.

cstGenConstraintGroupToId

Boolean
cstGenConstraintGroupToId(
cstGenStateId  stateId,
cstId          *Id
); 

Description

Generates all defined constraints in the constraint group.

Arguments

stateId

The generator state ID to be used in generating the specified constraints.

*Id

The ID of the constraint or constraint group.

Return Value

boolean

Returns TRUE if all the constraint values returned are valid and can be used.
Returns FALSE when the generator is finished.

cstStartGenTechConstraintGroup

cstGenStateId
cstStartGenTechConstraintGroup(
cstTechFileId  techfileId,
Boolean        localOnly
);

Description

This function starts generating the constraint groups in the specified technology file.

Arguments

techfileId

The database identifier of the technology file.

localOnly

Looks for a constraint group in an ITDB graph if the database ID is a technology database.

Return Value

cstGenStateId

Returns the generator state identifier to be used when generating constraint groups in the technology file.

cstGenTechConstraintGroup

Boolean
cstGenTechConstraintGroup(
cstGenStateId         stateId,
cstConstraintGroupId  *groupId
);

Description

This function generates a constraint group in the specified technology file.

Arguments

stateId

The generator state identifier to be used when generating constraint groups.

*groupId

The ID of the constraint group.

Return Value

Boolean

Returns TRUE when the groupId is valid.
Returns FALSE when the groupId is invalid.

cstStartGenCellViewConstraintGroup

cstGenStateId
cstStartGenCellViewConstraintGroup(
dbCellViewId cellViewId
);

Description

This function starts generating the constraint groups in the specified cellview.

Arguments

cellViewId

The database identifier of the cellview.

Return Value

cstGenStateId

Returns the generator state identifier to be used when generating constraint groups in the specified cellview.

cstGenCellViewConstraintGroup

Boolean
cstGenCellViewConstarintGroup(
cstGenStateId         stateId,
cstConstraintGroupId  *groupId
);

Description

This function generates a constraint group in the specified cellview.

Arguments

stateId

The generator state identifier to be used when generating constraint groups.

*groupId

The ID of the constraint group.

Return Value

Boolean

Returns TRUE when the groupId is valid.
Returns FALSE when the groupId is invalid.

cstStartGenConstraintConstraintGroup

cstGenStateId
cstStartGenConstraintConstraintGroup(
cstConstraintId constraintId
);

Description

This function starts generating the constraint groups which contains the specified constraint.

Arguments

constraintId

The ID of the constraint.

Return Value

cstGenStateId

Returns the generator state identifier to be used when generating constraint groups in a constraint.

cstGenConstraintConstraintGroup

Boolean
cstGenConstraintConstarintGroup(
cstGenStateId         stateId,
cstConstraintGroupId  *groupId
);

Description

This function generates a constraint group which contains the specified constraint.

Arguments

stateId

The generator state identifier to be used when generating constraint groups.

*groupId

The ID of the constraint group.

Return Value

Boolean

Returns TRUE when the groupId is valid.
Returns FALSE when the groupId is invalid.

cstStartGenTechUnreferencedConstraint

cstGenStateId
cstStartGenTechUnreferencedConstraint(
cstTechFileId techfileId
);

Description

This function starts generating all the unreferrenced constraints not belonging to any constraint group in the specified technology file.

Arguments

techfileId

The database identifier of the technology file.

Return Value

cstGenStateId

Returns the generator state identifier to be used when generating unreferenced constraints in the technology file.

cstGenTechUnreferencedConstraint

Boolean
cstGenTechUnreferencedConstraint(
cstGenStateId    stateId,
cstConstraintId  *constraintId
);

Description

This function generates all the unreferrenced constraints not belonging to any constraint group in the specified technology file.

Arguments

stateId

The generator state identifier to be used when generating unreferenced constraints.

*constraintId

The identification of the constraint.

Return Value

Boolean

Returns TRUE when the groupId is valid.
Returns FALSE when the groupId is invalid.

cstStartGenCellViewUnreferencedConstraint

cstGenStateId
cstStartGenCellViewUnreferencedConstraint(
dbCellViewId cellViewId
);

Description

This function starts generating all the unreferrenced constraints not belonging to any constraint group in the specified cellview.

Arguments

cellViewId

The database id of the cellview.

Return Value

cstGenStateId

Returns the generator state identifier to be used when generating unreferenced constraints in the cellview.

cstGenCellViewUnreferencedConstraint

Boolean
cstGenCellViewUnreferencedConstraint(
cstGenStateId    stateId,
cstConstraintId  *constraintId
);

Description

This function generates all the unreferrenced constraints not belonging to any constraint group in the specified cellview.

Arguments

stateId

The generator state identifier to be used when generating unreferenced constraints.

*constraintId

The identification of the constraint.

Return Value

Boolean

Returns TRUE when the groupId is valid.
Returns FALSE when the groupId is invalid.

cstStopGen

void
cstStopGen(
cstGenStateId stateId
);

Description

This function releases the space occupied by the generator pointed to the stateId.

Arguments

stateId

The generator state identifier for which the generation is to be stopped.

Return Value

void

NONE

20nm CST APIs

The new CST C APIs are used to traverse the hierarchy of the given constraint group. The traversal includes all constraint groups nested within the specified constraint group and all constraint groups reached through nested constraintGroupHeaders. The first constraint that matches the lookup criteria is returned. If no match is found, then a nullId is returned.

The following CST C APIs have been added for 20nm.

cstFindFirstLayerConstraint

cstConstraintID
cstFindFirstLayerConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstLayerNum              layerNum,
cstPurpose               purpose,
dbPropType               paramListType,
dbPropValue              listParams,
Boolean     onlyHard
); 

Description

Returns the first layer constraint in the given constraint group which matches the given criteria.

Arguments

groupId

The ID of the constraintGroup in which the constraint is searched.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

layerNum

The layer number of the constraint. If the layer number is unknown, an error results

purpose

The purpose number of the layer constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

onlyHard

If this is true, then the first matching hard constraint is found, else the first matching constraint is found.

Return Value

cstConstraintID

Returns the ID of the matching constraint found in the group. If no matching constraint is found, a null ID is returned.

cstFindFirstLayerPairConstraint

cstConstaintId
cstFindFirstLayerPairConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
cstLayerNum              layerNum1,
cstPurpose               purpose1,
cstLayerNum              layerNum2,
cstPurpose               purpose2,
dbPropType               paramListType,
dbPropValue              listParams,
Boolean                  onlyHard
); 

Description

Returns the first layerPair constraint in the given constraint group which matches the given criteria.

Arguments

groupId

The ID of the constraintGroup in which the constraint is searched.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

layerNum1

The layer number of the first layer-purpose pair constraint. If the layer number is unknown, an error results

purpose1

The purpose number of the first layer-purpose pair constraint.

layerNum2

The layer number of the second layer-purpose pair constraint, if a two-layer constraint is being updated.

purpose2

The purpose number of the second layer-purpose pair constraint.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

onlyHard

If this is true, then the first matching hard constraint is found, else the first matching constraint is found.

Return Value

cstConstraintId

Returns the ID of the matching constraint found in the group. If no matching constraint is found, a null ID is returned.

cstFindFirstLayerArrayConstraint

cstConstraintId
cstFindFirstLayerArrayConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
unsigned int             numLayers,
cstLayerNum              layerNums,
cstPurpose               purposes,
dbPropType               paramListType,
dbPropValue              listParams,
Boolean                  onlyHard
); 

Description

Returns the first layerArray constraint in the given constraint group which matches the given criteria.

Arguments

groupId

The ID of the constraintGroup in which the constraint is searched.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

numLayers

The number of layers in the array of layerNums

layerNums

The layer number of the array constraint. An array contains layer numbers. If the layer number is unknown, an error results.

purposes

The purpose number of the layer array constraint. An array contains purpose numbers.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

onlyHard

If this is true, then the first matching hard constraint is found, else the first matching constraint is found.

Return Value

cstConstraintId

Returns the ID of the matching constraint found in the group. If no matching constraint is found, a null ID is returned.

cstFindFirstSimpleConstraint

cstConstraintId
cstFindFirstSimpleConstraint(
cstConstraintGroupId     groupId,
cppConstString           constraintDefName,
dbPropType               paramListType,
dbPropValue              listParams,
Boolean                  onlyHard
);

Description

Returns the first simple constraint in the given constraint group which matches the given criteria.

Arguments

groupId

The ID of the constraintGroup in which the constraint is searched.

constraintDefName

The mapped DFII constraint name used to get a corresponding oaConstraintDef.

paramListType

A database constant variable, which is dbcILListType.

listParams

A SKILL list of constraint parameters. The default value is ilcNil. The input constraintParams is in a format of list(list(‘paramKeyWord{int | float | string | list})...)
For example, list(list(‘ConnectivityType “sameNet”)
list(‘PGNet t))

onlyHard

If this is true, then the first matching hard constraint is found, else the first matching constraint is found.

Return Value

cstConstraintId

Returns the ID of the matching constraint found in the group. If no matching constraint is found, a null ID is returned.

cstGet1DTableValue

Boolean
cstGet1DTableValue(
cstConstraintId  constraintId,
dbPropType               indexType,
dbPropValue              indexValue,
dbPropType               &valueType,
dbPropValue              &value,
);

Description

Returns the value of the 1DTable at the given index. The type of value and the value are set in the valueType and value arguments of the function.

Arguments

constraintId

This is the constraint ID.

indexType

The type of number, such as integer, float, etc.

indexValue

This is the value of the index.

valueType

The type of the value found.

value

This is the found value.

Return Value

Boolean

Returns true if successful.

cstGet2DTableValue

Boolean
cstGet2DTableValue(
cstConstraintId  constraintId,
dbPropType               index1Type,
dbPropValue              index1Value,
dbPropType               index2Type,
dbPropValue              index2Value,
dbPropType               &valueType,
dbPropValue              &value,
);

Description

Returns the value of the 2DTable at the given indexes. The type of value and the value are set in the valueType and value arguments of the function.

Arguments

constraintId

This is the constraint ID.

index1Type

The type of number, such as integer, float, etc.

index1Value

This is the value of the index.

index2Type

The type of number, such as integer, float, etc.

index2Value

This is the value of the index.

valueType

The type of the value found.

value

This is the found value.

Return Value

Boolean

Returns true if successful.

cstGetTwoWidthTableValue

Boolean
cstGetTwoWidthTableValue(
cstConstraintId  constraintId,
dbPropType               index1Type,
dbPropValue              index1Value,
dbPropType               index2Type,
dbPropValue              index2Value,
dbPropType               index3Type,
dbPropValue              index3Value,
dbPropType               &valueType,
dbPropValue              &value,
);

Description

Returns the value of the two widths table at the given indexes. The type of value and the value are set in the valueType and value arguments of the function.

Arguments

constraintId

This is the constraint ID.

index1Type

The type of number, such as integer, float, etc.

index1Value

This is the value of the index.

index2Type

The type of number, such as integer, float, etc.

index2Value

This is the value of the index.

index3Type

The type of number, such as integer, float, etc.

index3Value

This is the value of the index.

valueType

The type of the value found.

value

This is the found value.

Return Value

Boolean

Returns true if successful.


Return to top
 ⠀
X