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
- cstCreateLayerPairConstraint
- cstCreateLayerArrayConstraint
- cstCreateSimpleConstraint
- cstAddToConstraintGroup
- cstReplaceIdsInConstraintGroup
- cstDeleteConstraint
- cstGetType
- cstGetConstraintDatabase
- cstGetConstraintDefName
- cstGetConstraintName
- cstGetConstraintDescription
- cstGetConstraintID
- cstGetLayerConstraintLayer
- cstGetLayerPairConstraintLayers
- cstGetLayerArrayConstraintLayers
- cstGetConstraintValue
- cstSetConstraintValue
- cstGetConstraintParams
- cstSetConstraintParams
- cstIsHardConstraint
- cstSetHardConstraint
- cstSetConstraintID
- cstSetConstraintDescription
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
Return Value
|
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
Return Value
|
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
Return Value
|
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
Return Value
|
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
Return Value
|
Returns TRUE when cstAddtoConstraintGroup successfully adds a constraint 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
|
The ID of the constraintGroup, which is to own this constraint. |
|
|
The number of Ids (constraint IDs and/or constraintGroup IDs). |
|
|
The array contains constraint IDs and/or constraintGroup IDs. |
Return Value
|
Returns TRUE when Ids are successfully 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
Return Value
|
Returns TRUE when cstDeleteConstraint successfully deletes the constraint. |
cstGetType
cstType
cstGetType( cstId Id );
Description
This function returns the type of the constraint.
Arguments
Return Value
cstGetConstraintDatabase
dbId
cstGetConstraintDatabase( cstConstraintId constraintId );
Description
This function returns the identification of the constraint database. The database can either be dbCellViewId or techFile.
Arguments
Return Value
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
Return Value
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
Return Value
cstGetConstraintDescription
String
cstGetConstraintDescription( cstConstraintId constraintId );
Description
This function returns the description of the constraint.
Arguments
Return Value
cstGetConstraintID
String
cstGetConstraintId( cstConstraintId constraintId );
Description
This function returns the identification of the constraint.
Arguments
Return Value
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
Return Value
|
Returns TRUE when the layer number and purpose number are valid. |
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
Return Value
|
Returns TRUE when the layer number and purpose number are valid. |
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
Return Value
|
Returns TRUE when the layer number and purpose number are valid. |
cstGetConstraintValue
Boolean
cstGetConstraintValue( cstConstraintId constraintId, dbPropType valueType, dbPropValue value );
Description
This function returns the value of the specified constraint.
Arguments
Return Value
|
Returns TRUE when value and valueType are successfully returned. |
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
Return Value
|
Returns TRUE when value and valueType are successfully set. |
cstGetConstraintParams
Boolean
cstGetConstraintParams( cstConstraintId constraintId, dbPropType *paramListType, dbPropValue *listParams );
Description
This function returns the parameters associated with the specified constraint.
Arguments
Return Value
|
Returns TRUE when list of constraint parameters and list of types of constraint parameters are successfully returned. |
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
Return Value
|
Returns TRUE when list of constraint parameters and list of types of constraint parameters are successfully set. |
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
|
The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint . |
Return Value
|
Returns TRUE when it is 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
Return Value
|
Returns TRUE when hard constraint is successfully set. |
cstSetConstraintID
Boolean
cstSetConstraintId( cstConstraintId constraint, cppConstString ID );
Description
This function sets the identification of the constraint.
Arguments
|
The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint . |
|
Return Value
|
Returns TRUE when the ID for the constraint is successfully set. |
cstSetConstraintDescription
Boolean
cstSetConstraintDescription( cstConstraintId constraint, cppConstString description );
Description
This function sets the description of the constraint.
Arguments
|
The ID for layerConstraint, layerPairCostraint, layerArrayConstraint, and simple costraint . |
|
Return Value
|
Returns TRUE when the description for the constraint is successfully set. |
Constraint Group Functions
This section describes the following constraint group functions.
- cstCreateConstraintGroupOn
- cstFindConstraintGroupOn
- cstCreateConstraintGroupInTech
- cstCreateConstraintGroupInCellview
- cstFindConstraintGroupInTech
- cstFindConstraintGroupInCellview
- cstGetConstraintGroupOwner
- cstGetConstraintGroupDatabase
- cstDeleteConstraintGroup
- cstAccessGetConstraintGroupName
- cstGetConstraintGroupDefName
- cstGetConstraintGroupOperator
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
|
The cellview object IDs applied with corresponding constraint group definition name. |
|
|
The DFII constraint group definition name. For more information, refer to the |
|
|
The valid values of constraint group operator are: |
Return Value
|
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
|
The cellview object IDs applied with corresponding constraint group definition name. |
|
|
The DFII constraint group definition name. For more information, refer to the |
Return Value
|
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
Return Value
|
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
Return Value
|
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
|
The name of the constraint group that needs to be specified by the user. |
|
|
Looks for a constraint group in an ITDB graph if the database ID is a technology database. |
Return Value
|
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
|
The name of the constraint group that needs to be specified by the user. |
Return Value
|
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
|
The ID of the constraint group, which is created in the technology database or a cellview. |
Return Value
cstGetConstraintGroupDatabase
dbId
cstGetConstraintGroupDatabase( cstConstraintGroupId group );
Description
This function returns database identifier (either techFileId or cellViewId) of the specified constraint group.
Arguments
|
The ID of the constraint group, which is created in the technology database or a cellview. |
Return Value
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
Return Value
|
Returns TRUE when the constraint group is successfully deleted. |
cstAccessGetConstraintGroupName
String
cstAccessGetConstraintGroupName( cstConstraintGroupId groupId );
Description
This function returns the name of the constraint group.
Arguments
Return Value
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
Return Value
cstGetConstraintGroupOperator
cstConstraintGroupOp
cstGetConstraintGroupOperator( cstConstraintGroupId groupId );
Description
This function returns the constraint group operator associated with the constraint group.
Arguments
Return Value
|
Returns the following valid values: |
Generator Functions
This section describes the following functions for generating constraints.
- cstStartGenConstraintGroupToId
- cstGenConstraintGroupToId
- cstStartGenTechConstraintGroup
- cstGenTechConstraintGroup
- cstStartGenCellViewConstraintGroup
- cstGenCellViewConstraintGroup
- cstStartGenConstraintConstraintGroup
- cstGenConstraintConstraintGroup
- cstStartGenTechUnreferencedConstraint
- cstGenTechUnreferencedConstraint
- cstStartGenCellViewUnreferencedConstraint
- cstGenCellViewUnreferencedConstraint
- cstStopGen
cstStartGenConstraintGroupToId
cstGenStateId
cstStartGenConstraintGroupToId( cstConstraintGroupId groupId );
Description
This functions starts the generator for the member constraints and constraint groups of the specified constraint group.
Arguments
|
The ID of the constraintGroup, which is to own this constraint. |
Return Value
|
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
|
The generator state ID to be used in generating the specified constraints. |
|
Return Value
|
Returns TRUE if all the constraint values returned are valid and can be used. |
cstStartGenTechConstraintGroup
cstGenStateId
cstStartGenTechConstraintGroup( cstTechFileId techfileId, Boolean localOnly );
Description
This function starts generating the constraint groups in the specified technology file.
Arguments
|
Looks for a constraint group in an ITDB graph if the database ID is a technology database. |
Return Value
|
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
|
The generator state identifier to be used when generating constraint groups. |
|
Return Value
|
Returns TRUE when the groupId is valid. |
cstStartGenCellViewConstraintGroup
cstGenStateId
cstStartGenCellViewConstraintGroup( dbCellViewId cellViewId );
Description
This function starts generating the constraint groups in the specified cellview.
Arguments
Return Value
|
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
|
The generator state identifier to be used when generating constraint groups. |
|
Return Value
|
Returns TRUE when the groupId is valid. |
cstStartGenConstraintConstraintGroup
cstGenStateId
cstStartGenConstraintConstraintGroup( cstConstraintId constraintId );
Description
This function starts generating the constraint groups which contains the specified constraint.
Arguments
Return Value
|
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
|
The generator state identifier to be used when generating constraint groups. |
|
Return Value
|
Returns TRUE when the groupId is valid. |
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
Return Value
|
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
|
The generator state identifier to be used when generating unreferenced constraints. |
|
Return Value
|
Returns TRUE when the groupId is valid. |
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
Return Value
|
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
|
The generator state identifier to be used when generating unreferenced constraints. |
|
Return Value
|
Returns TRUE when the groupId is valid. |
cstStopGen
void
cstStopGen( cstGenStateId stateId );
Description
This function releases the space occupied by the generator pointed to the stateId.
Arguments
|
The generator state identifier for which the generation is to be stopped. |
Return Value
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
- cstFindFirstLayerPairConstraint
- cstFindFirstLayerArrayConstraint
- cstFindFirstSimpleConstraint
- cstGet1DTableValue
- cstGet2DTableValue
- cstGetTwoWidthTableValue
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
Return Value
|
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
Return Value
|
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
Return Value
|
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
Return Value
|
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
Return Value
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
Return Value
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
Return Value
Return to top