7
CDBA Figure Functions
A figure is a class of database objects that includes instances, geometric shapes, and mosaics. Figures are accessible from nets or pins and are the geometries or instances that implement a net or pin. A net without figures is invisible when viewed with the graphics editor. A pin cannot exist without a figure.
This chapter discusses the following:
- Figure Class Hierarchy
- Blockages
- Area Halos
- Layer Halos
- Boundaries
- Clusters
- LayerHeaders
- Markers
- RowHeaders
- EEQ Masters
- EEQ Masters
- Track Patterns
- Shape Figure Functions
- Shape Route Status
- Instance and Hierarchy Functions
- FigGroup Functions
- Region Queries
- Parameterized Cells
- Abutment Attributes
- Mosaic Functions
- Guides
- pathSegs
- Vias
- Routes
- CDBA Connectivity Functions
- Nets
- Signals
- Terminals
- Instance Terminals
- Pins
- Access Directions of a Pin
- BusDef and BitOrder
- Cellview Information
- Equivalent Connectivity Time Functions
- Net and Terminal Name Syntax
- Name and Vector Expression Expansion
- Automatic Database Deletions
Figure Class Hierarchy
The class hierarchy for figures is shown in the following table.
Operations on Figures
The functions described in this chapter perform the following operations on figures:
Retrieval and Traversal Operations
The following functions traverse the hierarchy to retrieve or change information about a figure.
dbIsFigId
Boolean
dbIsFigId( dbFigId figId );
Returns TRUE if the ID passed in as figId is a figure. Otherwise, it returns FALSE.
dbGetFigPurpose
dbPurpose
dbGetFigPurpose( dbFigId figId );
Retrieves the purpose of the figure specified by figId. The purpose can be either a reserved purpose (for example, dbcCellPurpose, dbcNetPurpose) or a user-defined purpose.
dbSetFigPurpose
Boolean
dbSetFigPurpose( dbFigId figId, dbPurpose purpose );
Sets the purpose of the figure specified by figId. The purpose can be either a reserved purpose (for example, dbcCellPurpose, dbcNetPurpose) or a user-defined purpose.
dbAddFigToNet
Boolean
dbAddFigToNet( dbFigId figId, dbNetId netId );
Adds (or attaches) a figure to a net.
dbSubFigFromNet
Boolean
dbSubFigFromNet(dbFigId figId );
Subtracts (or detaches) a figure from a net.
Because pins must have only one figure attached to them, use dbCreatePin and dbDeletePin to add the figure corresponding to a net or to subtract the figure. A figure already attached to another net or pin must be detached before being added to this net. A figure’s purpose remains the same after it is added or subtracted from a net.
dbSubFigFromPin
Boolean
dbSubFigFromPin( dbFigId figId );
Subtracts (or detaches) a figure from a pin. A figure already attached to another net or pin must be detached before being added to this pin.
The pin that the figure implements is automatically deleted. The terminal that contains the pin is not deleted. A figure’s purpose remains the same after it is subtracted from a pin.
dbGetFigNet
dbNetId
dbGetFigNet( dbFigId figId );
Returns the net that contains the figure specified by figId. If the figure doesn’t belong to a net, it returns dbcNullId.
dbGetFigPin
dbPinId
dbGetFigPin( dbFigId figId );
Returns the pin that contains the figure specified by figId. If the figure doesn’t belong to a pin, it returns dbcNullId.
dbGetFigBBoxf
dbBBox *
dbGetFigBBox( dbFigId figId );
Returns the bounding box of the figure specified by figId.
dbStartGenFig and dbGenFig
dbGenStateId
dbStartGenFig( dbCellViewId cellViewId );
Boolean
dbGenFig( dbGenStateId stateId, dbFigId pFigId) /* modifies FigId */
These functions generate all figures (that is, instances, mosaics, and shapes) contained in the cellview specified by cellViewId. These functions generate parent as well as child figures.
dbStartGenNonChildFig and dbGenNonChildFig
dbGenStateId
dbStartGenNonChildFig( dbCellViewId cellViewId );
Boolean
dbGenNonChildFig( dbGenStateId stateId, dbFigId pFigId );
These functions generate all figures contained in the cellview specified by cellViewId except child figures.
The following retrieval and traversal functions for figures are documented in CDBA Connectivity Functions:
Creation and Deletion Operations
There is currently only a function to delete a figure:
dbDeleteFig
Boolean
dbDeleteFig( dbFigId figId );
Deletes the figure specified by figId. If the figure is a parent, the descendants are deleted as well. (See Chapter 9, “CDBA Parent-Child Relationship Functions,” for more information on deleting a figure.) After dbDeleteFig is called, figId is invalid and must not be used. Any identifiers to child figures are likewise invalid.
Move and Copy Operations
dbMoveFig
dbFigId
dbMoveFig( dbFigId figId, dbCellViewId destCellViewId, dbTransform transform );
Moves the figure specified by figId. The figure is magnified, rotated, and reflected about the origin as specified by the transformation’s orientation. It is then translated by the transformation’s offset. If the figure, cellview, or transformation is invalid, it gives a fatal error message and returns dbcNullFigId. Otherwise, it returns the ID of the transformed figure.
If destCellViewId is dbcNullCellViewId or if destCellViewId is the cellview that contains the figure, the figure moves within the same cellview and the figure’s ID remains the same. The figure’s purpose and properties remain the same.
If the destCellViewId is not the original figure’s cellview, the figure is deleted, and a new figure is created in the cellview specified by destCellViewId. The newly created figure has a different ID and retains the purpose and properties of the original figure. The new figure is not associated with any net, pin, or terminal of the original figure.
If figId refers to a parent, then all of the figure’s descendants are moved by the same transformation. This transformation also applies when moving between cellviews.
See Chapter 9, “CDBA Parent-Child Relationship Functions,” for more information on moving a figure.
dbCopyFig
dbFigId
dbCopyFig( dbFigId figId, dbCellViewId destCellViewId, dbTransform transform );
Copies the figure specified by figId. The copied figure is rotated and reflected about the origin as specified by the transformation’s orientation. Then it is translated by the transformation’s offset. If the figure, cellview, or transformation is invalid, it gives a fatal error message and returns dbcNullFigId. Otherwise, it returns the ID of the copied figure.
If destCellViewId is dbcNullCellViewId or if destCellViewId is the cellview that contains the figure, the figure is copied in the same cellview. If destCellViewId is not dbcNullCellViewId or the original figure’s cellview, the figure is copied into the cellview specified by destCellViewId.
The new figure retains the purpose and properties of the original figure. The figure is not associated with any net, pin, or terminal of the original figure.
If figId refers to a parent, then all of the figure’s descendants are copied by the same transformation and placed into the appropriate cellview. Copied children retain their purpose and properties. See CDBA Parent-Child Relationship Functions for more information on copying a figure.
Blockages
This section describes functions that affect blockage objects.
About Blockages
A blockage is a figure object that indicates an area on which other objects may not be placed. The blockage area is specified by its point array.
Each blockage has a type that indicates the type of object the blockage blocks.
typedef enum dbBlockageType {
dbcUnknownBlockageType = 0,
dbcRoutingBlockage = 1,
dbcViaRoutingBlockage = 2,
dbcPlacementBlockage = 3,
dbcWiringBlockage = 4,
dbcFillBlockage = 5,
dbcSlotBlockage = 6,
dbcPinBlockage = 7,
dbcFeedthruBlockage = 8,
dbcScreenBlockage = 9
} dbBlockageType;
const String dbvBlockageTypeString [] = {
“unknown”,
“routing”,
“viaRouting”,
“placement”,
“wiring”,
“fill”,
“slot”,
“pin”,
“feedthru”,
“screen”
};
dbIsBlockageId
Boolean
dbIsBlockageId( dbBlockageId blockageId );
Description
Checks that the blockageId refers to a blockage object.
Arguments
Return Values
|
Returns TRUE if the blockageId |
dbDeleteBlockage
Boolean
dbDeleteBlockage( dbBlockageId blockageId );
Description
Deletes the blockage object specified by blockageId.
Arguments
Return Values
|
Returns TRUE if the blockage object was successfully deleted. Returns FALSE otherwise. |
dbIsBlockageOrthogonal
Boolean
dbIsBlockageOrthogonal( dbBlockageId blockageId );
Description
Checks that the blockage specified by the database blockageId is orthogonal.
Arguments
Return Values
|
Returns TRUE if the blockage specified by blockageId is orthogonal. Returns FALSE otherwise. |
dbIsBlockageRectangle
Boolean
dbIsBlockageRectangle( dbBlockageId blockageId );
Description
Checks that the blockage specified by the database blockageId is a rectangle.
Arguments
Return Values
|
Returns TRUE if the blockage specified by |
dbIsBlockagePushedDown
Boolean
dbIsBlockagePushedDown( dbBlockageId blockageId );
Description
Checks that the blockage specified by the database blockageId is pushed down from a higher cellview.
Arguments
Return Values
|
Returns TRUE if the blockage specified by blockageId was pushed down from a higher cellview. Returns FALSE otherwise. |
dbSetBlockagePushedDown
Boolean
dbSetBlockagePushedDown( dbBlockageId blockageId, Boolean pushedDown );
Description
Sets the pushed down attribute for the blockage specified by the database blockageId.
Arguments
Return Values
|
Returns TRUE if the |
dbGetBlockageType
dbBlockageType
dbGetBlockageType( dbBlockageId blockageId );
Description
Gets the blockage type specified by the database blockageId.
Arguments
Return Values
dbLayerBlockageHasEffectiveWidth
Boolean
dbLayerBlockageHasEffectiveWidth( dbLayerBlockageId layerBlockageId );
Description
Checks that the effective width is set for the layer blockage.
Arguments
Return Values
|
Returns TRUE if the effective width is set for the blockage specified by |
dbGetLayerBlockageEffectiveWidth
dbDistance
dbGetLayerBlockageEffectiveWidth( dbBlockageId blockageId );
Description
Gets the effective width in database units (DBU) of the layer blockage specified by the database blockageId.
Arguments
Return Values
dbGetBlockageDensity
float
dbGetBlockageDensity( dbBlockageId blockageId );
Description
Gets the density of the blockage specified by the database blockageId.
Arguments
Return Values
|
Returns the density of the blockage. If blockage density is not specified, returns 100.0. |
dbSetBlockageDensity
Boolean
dbSetBlockageDensity( dbBlockageId blockageId, float density );
Description
Sets the density of the blockage specified by the database blockageId.
Arguments
|
The density of the blockage. The density value must be in [0, 100.0]. |
Return Values
|
Returns TRUE if the blockage density is set successfully. |
dbGetBlockageOwner
dbId
dbGetBlockageOwner( dbBlockageId blockageId );
Description
Gets the owner for the blockage specified by the database blockageId.
Arguments
Return Values
dbSetBlockageOwner
Boolean
dbSetBlockageOwner( dbBlockageId blockageId, dbId ownerId );
Description
Sets the owner for the blockage specified by the database blockageId.
Arguments
|
The owner to be set for the blockage specified by |
Return Values
|
Returns TRUE if the owner is successfully set for the blockage specified by |
dbGetBlockage
Boolean
dbGetBlockage( dbBlockageId blockageId, unsigned int *nPoints, dbPoint **pointArray );
Description
Gets the points for the blockage specified by the database blockageId.
Arguments
|
The pointer to integer to be filled with the number of points for the blockage. |
|
|
The pointer to dbPoint array to be filled with the points for the blockage. |
Return Values
|
Returns TRUE if the points are successfully retrieved for the blockage specified by blockageId. Returns FALSE otherwise. |
dbGetBlockageArea
double
dbGetBlockageArea( dbBlockageId blockageId );
Description
Gets the area in database units (DBU) squared for the blockage specified by the database blockageId.
Arguments
|
Returns the area in DBU squared of the blockage specified by |
dbIsAreaBlockageId
Boolean
dbIsAreaBlockageId( dbId objId );
Description
Verifies that the objId refers to a valid area blockage object.
Arguments
Return Values
|
Returns TRUE if the objId is a valid area blockage object. |
dbCreateAreaBlockage
dbAreaBlockageId
dbCreateAreaBlockage( dbCellviewId cvId, dbId ownerId, unsigned int nPoints, const dbPoint *pointArray );
Description
Creates an area blockage object in the cellview. The area blockage created is of type placement.
Arguments
|
The owner of the area blockage. The owner can be NULL, or it can be an instance or a cluster. Any other object type as owner causes area blockage creation to fail with a warning message. |
|
Return Values
|
Returns the dbAreaBlockageId of the created area blockage object. |
dbSetAreaBlockagePoint
Boolean
dbSetAreaBlockagePoint( dbAreaBlockageId areaBlockageId, unsigned int npoints, const dbPoint *pointArray );
Description
Sets the points of the area blockage.
Arguments
Return Values
|
Returns TRUE if the points are set successfully. |
dbTransformAreaBlockage
Boolean
dbTransformAreaBlockage( dbAreaBlockageId areaBlockageId, double scale, double angle );
Description
Transforms the area blockage by the scale and angle.
Arguments
Return Values
|
Returns TRUE if the area blockage is transformed successfully. |
dbIsLayerBlockageId
Boolean
dbIsLayerBlockageId( dbId objId );
Description
Verifies that the objId refers to a valid layer blockage object.
Arguments
Return Values
|
Returns TRUE if the objId refers to a valid layer blockage object. |
dbCreateLayerBlockage
dbLayerBlockageId
dbCreateLayerBlockage( dbCellViewId cvId, dbLayer layerNum, dbBlockageType type, dbId ownerId, unsigned int nPoints, const dbPoint *pointArray );
Description
Creates a layer blockage object in the cellview.
Arguments
Return Values
|
Returns the dbLayerBlockageId of the created layer blockage object. |
dbGetLayerBlockageLayerNum
dbLayer
dbGetLayerBlockageLayerNum( dbLayerBlockageId layerBlockageId );
Description
Gets the layer number of the layer blockage.
Arguments
Return Values
dbSetLayerBlockageLayerNum
Boolean
dbSetLayerBlockageLayerNum( dbLayerBlockageId layerBlockageId, dbLayer layerNum );
Description
Sets the layer number of the layer blockage.
Arguments
Return Values
|
Returns TRUE if the layer number is set successfully. |
dbGetLayerBlockageLayerHeader
dbLayerHeaderId
dbGetLayerBlockageLayerHeader( dbLayerBlockageId layerBlockageId );
Description
Gets the layerHeader for the layer of the layerBlockageId.
Arguments
Return Values
|
Returns the layerHeader for the layer of the layer blockage. |
dbSetLayerBlockagePoint
Boolean
dbSetLayerBlockagePoint( dbLayerBlockageId layerBlockageId, unsigned int nPoints, const dbPoint *pointArray );
Description
Sets the points of the layerBlockageId.
Arguments
Return Values
|
Returns TRUE if the points are set successfully. |
dbTransformLayerBlockage
Boolean
dbTransformLayerBlockage( dbLayerBlockageId layerBlockageId, double scale, double angle );
Description
Transforms the layer blockage by the scale and angle.
Arguments
Return Values
|
Returns TRUE if the layer blockage is transformed successfully. |
dbStartGenBlockage
dbGenStateId
dbStartGenBlockage( dbCellViewId cvId );
Description
Starts generating all the blockages for a cellview.
Arguments
Return Values
|
Returns the generator |
dbGenBlockage
Boolean
dbGenBlockage( dbGenStateId pState, dbBlockageId *blockageId );
Description
Generates the next blockage in the cellview.
Arguments
|
The generator |
|
|
A pointer to the blockage ID. Returned if a blockage is generated. |
Return Values
|
Returns TRUE if a blockage is generated. Returns FALSE otherwise. |
dbStartGenBlockageToPoint
dbGenStateId
dbStartGenBlockageToPoint( dbBlockageId blockageId );
Description
Starts generating all the points for the given blockage.
Arguments
Return Values
|
Returns the generator |
dbGenBlockageToPoint
Boolean
dbGenBlockageToPoint( dbGenStateId pState, dbPoint *point );
Description
Generates the next point in the blockage.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if a point is generated. Returns FALSE otherwise. |
Area Halos
An area halo is a blockage. It is an extended area around an instance or a PR boundary in 4 orthogonal directions. The most common use is placement. The area halo keeps other instances from being placed within the halo.
The area halo has all the attributes of a blockage. In addition, an area halo has 4 offsets, one for each orthogonal direction.
A PR boundary halo is also known as a master halo. You can define an instance halo that is independent of the master halo. When both a PR boundary halo and an instance halo exist, use the instance halo. To determine whether a PR boundary has a master halo, query the PR boundary. An instance with no halo returns a NULL when queried even if a master halo exists.
Because an area halo is a blockage, any function that takes a dbBlockageId also applies to a dbAreaHaloId. The below blockage functions may apply when working with area halos.
The following generators generate area halos along with other types of blockages.
- dbStartGenBlockage
- dbStartGenBlockageToPoint
- dbStartGenClusterToBlockage
- dbGenClusterToBlockage
- dbStartGenInstToBlockage
- dbGenInstToBlockage
- dbStartGenPRBoundaryToBlockage
- dbGenPRBoundaryToBlockage
The AreaHalo Id is the following.
typedef dbId dbAreaHaloId;
The validation function verifies that the dbAreaHaloId is a valid oaAreaHalo object.
inline oaAreaHalo *
dbiValidateAreaHalo (dbAreaHaloId areaHaloId);
dbIsAreaHaloId
Boolean
dbIsAreaHaloId( dbId id );
Description
Verifies that the id refers to a valid area halo object.
Arguments
Return Values
|
Returns TRUE if the id refers to an area halo object. Returns FALSE otherwise. |
dbCreateAreaHalo
dbAreaHaloId
dbCreateAreaHalo( dbId ownerId, dbDistance topOffset, dbDistance bottomOffset, dbDistance leftOffset, dbDistance rightOffset );
Description
Creates an area halo with the specified attributes. The function validates the owner and checks the arguments.
The function first discovers if an area halo already exists on the owner. If a halo exists, the function issues a warning and returns a NULL ID. If no halo exists, the function creates an oaAreaHalo object on the owner and returns its database identifier.
Area halo is placement type blockage.
Arguments
|
The owner of the area halo. Value must be either instance or PR boundary. |
|
Return Values
|
Returns the area halo database identifier if no halo already exists on the owner. Returns a NULL ID and issues a warning if a halo does already exist on the owner. |
dbDeleteAreaHalo
Boolean
dbDeleteAreaHalo( dbAreaHaloId areaHaloId );
Description
Arguments
Return Values
|
Returns TRUE if the area halo is deleted. |
dbFindAreaHalo
dbAreaHaloId
dbFindAreaHalo( dbId ownerId );
Description
Finds the placement area halo on the owner.
Arguments
Return Values
|
Returns the database identifier of the area halo. |
dbGetAreaHaloOffsets
Boolean
dbGetAreaHaloOffsets( dbAreaHaloId areaHaloId, dbDistance *topOffset, dbDistance *bottomOffset, dbDistance *leftOffset, dbDistance *rightOffset );
Description
Gets the offsets of the area halo. The function validates the area halo and fills the 4 offset pointers.
Arguments
Return Values
|
Returns TRUE if the area halo offset pointers are filled successfully. |
dbSetAreaHaloOffsets
Boolean
dbSetAreaHaloOffsets( dbAreaHaloId areaHaloId, dbDistance topOffset, dbDistance bottomOffset, dbDistance leftOffset, dbDistance rightOffset );
Description
Sets the offsets of the area halo. The function validates the area halo and sets the 4 offsets.
Arguments
Return Values
|
Returns TRUE if the area halo offsets are set successfully. |
dbStartGenClusterToBlockage
dbGenStateId
dbStartGenClusterToBlockage( dbClusterId clusterId );
Description
Starts generating all the blockage objects owned by the cluster.
Arguments
Return Values
|
Returns the generator |
dbGenClusterToBlockage
Boolean
dbGenClusterToBlockage( dbGenStateId pState, dbBlockageId *blockageId );
Description
Generates the next blockage from the cluster.
Arguments
|
The generator |
|
|
A pointer to the blockage ID. Returned if a blockage is generated. |
Return Values
|
Returns TRUE if a blockage is generated. Returns FALSE otherwise. |
dbStartGenInstToBlockage
dbGenStateId
dbStartGenInstToBlockage( dbClusterId clusterId );
Description
Starts generating all the blockage objects owned by the instance.
Arguments
Return Values
|
Returns the generator |
dbGenInstToBlockage
Boolean
dbGenInstToBlockage( dbGenStateId pState, dbBlockageId *blockageId );
Description
Generates the next blockage from the instance.
Arguments
|
The generator |
|
|
A pointer to the |
Return Values
|
Returns TRUE if a blockage is generated. Returns FALSE otherwise. |
dbStartGenPRBoundaryToBlockage
dbGenStateId
dbStartGenPRBoundaryToBlockage( dbClusterId clusterId );
Description
Starts generating all the blockage objects owned by the PR boundary.
Arguments
Return Values
|
Returns the generator |
dbGenPRBoundaryToBlockage
Boolean
dbGenPRBoundaryToBlockage( dbGenStateId pState, dbBlockageId *blockageId );
Description
Generates the next blockage from the PR boundary.
Arguments
|
The generator |
|
|
A pointer to the |
Return Values
|
Returns TRUE if a blockage is generated. Returns FALSE otherwise. |
dbCoverObstructionId
dbCreateCoverObstruction(dbPRBoundaryId boundaryId,
dbIntRange *maskRange,
Boolean allowPGNet);
Description
Creates a new cover obstruction object with the given maskRange and allowPGNet attributes. The cover obstruction is associated with the specified PR boundary object in a dependent way; this means if the PR boundary is deleted, its associated cover obstruction is also deleted.
dbDeleteCoverObstruction
Boolean dbDeleteCoverObstruction(dbCoverObstructionId coverId);
Description
Deletes the cover obstruction object specified by coverId.
dbPRBoundaryId
dbGetCoverObstructionPRBoundary(dbCoverObstructionId coverId);
Description
Gets the PR boundary object associated with this cover obstruction object.
dbGetCoverObstructionPoints
Boolean
dbGetCoverObstructionPoints(dbCoverObstructionId coverId,
unsigned int *nPoints,
dbPoint **pointArray);
Description
Gets the points in the point array that defines this cover obstruction object.
dbGetCoverObstructionMaskRange
Boolean
dbGetCoverObstructionMaskRange(dbCoverObstructionId coverId,
dbIntRange
maskRange);
Description
Gets the mask range of cover obstruction object.
dbStartGenCoverObstructionToLayerHeader
dbGenStateId
dbStartGenCoverObstructionToLayerHeader(dbCoverObstructionId coverId);
Description
Starts the generator for all layer header objects whose corresponding mask number intersect the mask range of this cover obstruction object.
dbGenCoverObstructionToLayerHeader
Boolean
dbGenCoverObstructionToLayerHeader(dbGenStateId pState,
dbLayerHeaderId *layerHeaderId);
Description
Generates all layer header objects whose corresponding mask number intersect the mask range of this cover obstruction object.
dbGetCoverObstructionLayers
Boolean
dbGetCoverObstructionLayers(dbCoverObstructionId coverId,
int *nLayers,
String **layerNames);
Description
Gets all layer objects whose corresponding mask number intersect the mask range of this cover obstruction object.
dbGetCoverObstructionAllowPGNet
Boolean
dbGetCoverObstructionAllowPGNet(dbCoverObstructionId coverId);
Description
Returns a boolean indicating whether power and ground nets can be routed over the areas defined by this cover obstruction object.
dbSetCoverObstructionAllowPGNet
Boolean
dbSetCoverObstructionAllowPGNet(dbCoverObstructionId coverId,
Boolean allowPGNet);
Description
Sets whether power and ground nets can be routed over the areas defined by this cover obstruction object.
dbIsCoverObstructionId
Boolean
dbIsCoverObstructionId(dbId objId);
Description
Return TRUE if the objId indicates a cover obstruction object.
dbPRBoundaryHasCoverObstruction
Boolean
dbPRBoundaryHasCoverObstruction(dbPRBoundaryId boundaryId);
Description
Return TRUE if the specified PR boundary object has a cover obstruction object associated with it.
dbGetPRBoundaryCoverObstruction
dbCoverObstructionId
dbGetPRBoundaryCoverObstruction(dbPRBoundaryId boundaryId);
Description
Gets the cover obstruction object associated with the specified PR boundary object. NULL is returned if the PR boundary has no cover obstruction.
Layer Halos
This section describes functions that affect layer halo objects.
About Layer Halo Objects
A layer halo is a blockage. It represents an extended area surrounding an instance or a PR boundary, which prevents objects on a specific layer from being allowed in the layer halo area. A layer halo extends the area surrounding the instance or PR boundary by specifying offset in 4 orthogonal directions.
There are two major difference between a layer halo and an area halo:
- An area halo is always of “placement” type. A layer halo is never of type “placement”.
- A layer halo blocks objects on a specific layer
Functions that are common to blockages also apply to a layer halo. These function include:
The following generators generate area halos along with other types of blockages.
- dbStartGenBlockage
- dbStartGenBlockageToPoint
- dbStartGenClusterToBlockage
- dbGenClusterToBlockage
- dbStartGenInstToBlockage
- dbGenInstToBlockage
- dbStartGenPRBoundaryToBlockage
- dbGenPRBoundaryToBlockage
typedef dbId dbLayerHaloId;
The following list the types of layer halos.
typedef enum dbBlockageType {
dbcUnknownBlockageType = 0,
dbcRoutingBlockage = 1,
dbcViaRoutingBlockage = 2,
dbcPlacementBlockage = 3,
dbcWiringBlockage = 4,
dbcFillBlockage = 5,
dbcSlotBlockage = 6,
dbcPinBlockage = 7,
dbcFeedthruBlockage = 8,
dbcScreenBlockage = 9,
} dbBlockageType;
#define dbcMaxBlockageType 9
const String dbvBlockageTypeString[] = {
"unknown",
"routing",
"viaRouting",
"placement",
"wiring",
"fill",
"slot",
"pin",
"feedthru",
"screen"
};
dbIsLayerHaloId
dbLayerHaloId
dbIsLayerHaloId( dbId objectId );
Description
This functions checks if the given Id is a valid dbLayerHaloId.
Arguments
dbCreateLayerHalo
dbLayerHaloId
dbCreateLayerHalo( dbId ownerId, dbLayer layerNum, dbBlockageType type, dbDistance topOffset, dbDistance bottomOffset, dbDistance leftOffset, dbDistance rightOffset );
Description
This function creates a layerHalo with the given attributes. The owner is validated and arguments are checked:
Arguments
dbGetLayerHaloLayerNum
dbLayer
dbGetLayerHaloLayerNum( dbLayerHaloId layerHaloId );
Description
This function returns the layer number of the given layerHalo.
Arguments
dbSetLayerHaloLayerNum
dbSetLayerHaloLayerNum( dbLayerHaloId layerHaloId, dbLayer layerNum );
Description
This function moves the layerHalo to the specified layer.
Arguments
dbGetLayerHaloLayerHeader
dbLayerHeaderId
dbGetLayerHaloLayerHeader( dbLayerHaloId layerHaloId );
Description
This function returns the layer header for the layer of the given layerHalo.
Arguments
dbGetLayerHaloOffsets
Boolean
dbGetLayerHaloOffsets( dbLayerHaloId layerHaloId, dbDistance *topOffset, dbDistance *bottomOffset, dbDistance *leftOffset, dbDistance *rightOffset );
Description
This function returns the offsets of the given layerHalo. The layerHalo is validated and the 4 offsets pointers are filled.
Arguments
dbSetLayerHaloOffsets
Boolean
dbSetLayerHaloOffsets( dbLayerHaloId layerHaloId, dbDistance topOffset, dbDistance bottomOffset, dbDistance leftOffset, dbDistance rightOffset );
Description
This function sets the offsets of the given layerHalo. The layerHalo is validated and the offsets are set.
Arguments
Boundaries
This section describes functions that affect boundary objects.
About Boundaries
A boundary object is used to define an enclosed area with a polygonal outline. Each segment of a boundary can have a name associated with it. A boundary is a figure, but not a shape.
There are 4 types of boundaries, area boundary, PR (place and route) boundary, snap boundary, and cluster boundary.
An area boundary defines an area in a cellview for a specific purpose. Area boundaries are named. A cellview can have multiple area boundaries, each boundary is identified by its name.
A PR boundary can have a coreBoxSpec and an IO box. CoreBoxSpec and IO box are special attributes. A coreBoxSpec defines a rectangular grid of sites (a row of rows) within a PR boundary that are available for cell placement. An IO box, together with the outline of the core box, defines the area for IO cell placement.
A PR boundary can own blockages. Area halos are the most common blockages owned by a PR boundary.
The Boundary Id is the following.
typedef dbId dbAreaBoundaryId;
The validation function verifies that the dbAreaBoundaryId is a valid oaAreaBoundary object.
inline oaAreaBoundary *
dbiValidateAreaBoundary (dbAreaBoundaryId areaBoundaryId);
dbIsBoundaryId
Boolean
dbIsBoundaryId( dbId boundaryId );
Description
Verifies that the given boundaryId refers to a boundary object.
Arguments
|
The database |
Return Values
|
Returns TRUE if the boundaryId refers to a boundary object. Returns FALSE if it is not a boundary object. |
dbIsAreaBoundaryId
Boolean
dbIsAreaBoundaryId( dbId objId );
Description
Verifies that the given objId refers to an area boundary object.
Arguments
Return Values
|
Returns TRUE if the ID refers to an area boundary object. Returns FALSE otherwise. |
dbIsClusterBoundaryId
Boolean
dbIsClusterBoundaryId( dbId boundaryId );
Description
Verifies that the given boundaryId refers to a cluster boundary object.
Arguments
|
The database |
Return Values
|
Returns TRUE if the boundaryId refers to a cluster boundary object. Returns FALSE if it is not a cluster boundary object. |
dbIsPRBoundaryId
Boolean
dbIsPRBoundaryId( dbId boundaryId );
Description
Verifies that the given boundaryId refers to a PR boundary object.
Arguments
|
The database |
Return Values
|
Returns TRUE if the boundaryId refers to a PR boundary object. Returns FALSE if it is not a PR boundary object. |
dbIsSnapBoundaryId
Boolean
dbIsSnapBoundaryId( dbId boundaryId );
Description
Verifies that the given boundaryId refers to a snap boundary object.
Arguments
|
The database |
Return Values
|
Returns TRUE if the boundaryId refers to a snap boundary object. Returns FALSE if it is not a snap boundary object. |
dbCreateAreaBoundary
dbAreaBoundaryId
dbCreateAreaBoundary( dbCellViewId cvId, const char *name, unsigned int nPoints, const dbPoint *pointArray, const char **edgeNames );
Description
Creates a new area boundary object in the cellview.
Arguments
Return Values
|
Returns the database ID of the area boundary created. |
dbCreateClusterBoundary
dbClusterBoundaryId
dbCreateClusterBoundary( dbClusterId clusterId, const char *name, unsigned int nPoints, dbPoint *pointArray, const char **edgeNames );
Description
Creates a new cluster boundary in the specified cluster with the specified attributes.
Arguments
Return Values
|
Returns the database |
dbCreatePRBoundary
dbPRBoundaryId
dbCreatePRBoundary( dbCellViewId cvId, unsigned int nPoints, dbPoint *pointArray, const char **edgeNames );
Description
Creates a new PR boundary in the specified cell view with the specified attributes.
Arguments
Return Values
|
Returns the database |
dbCreateSnapBoundary
dbSnapBoundaryId
dbCreateSnapBoundary( dbCellViewId cvId, unsigned int nPoints, dbPoint *pointArray, const char **edgeNames );
Description
Creates a new snap boundary in the specified cell view with the specified attributes.
Arguments
Return Values
|
Returns the database |
dbDeleteBoundary
Boolean
dbDeleteBoundary( dbBoundaryId boundaryId );
Description
Deletes the boundary object specified by boundaryId.
Arguments
|
The database |
Return Values
|
Returns TRUE if the boundary object was successfully deleted. Returns FALSE otherwise. |
dbFindAreaBoundaryByName
dbAreaBoundaryId
dbFindAreaBoundaryByName( dbCellViewId cvId, const char *name );
Description
Finds the area boundary with the given name in the cellview.
Arguments
Return Values
dbFindClusterBoundaryByName
dbClusterBoundaryId
dbFindClusterBoundaryByName( dbClusterId clusterId, const char *name );
Description
Finds the cluster boundary with the given name in the cellview of the given cluster.
Arguments
Return Values
|
Returns a |
dbGetAreaBoundary
String
dbGetAreaBoundaryName( dbAreaBoundaryId boundaryId );
Description
Gets the name of the area boundary.
Arguments
Return Values
dbSetAreaBoundary
Boolean
dbSetAreaBoundaryName( dbAreaBoundaryId boundaryId, const char *name );
Description
Sets the name of the area boundary.
Arguments
Return Values
|
Returns TRUE if the area boundary name is set. |
dbGetPRBoundary
dbPRBoundaryId
dbGetPRBoundary( dbCellViewId cvId );
Description
Gets the place and route (PR) boundary in the given cellview.
Arguments
|
The database |
Return Values
|
Returns the |
dbGetPRBoundaryCoreBoxSpec
Boolean
dbGetPRBoundaryCoreBoxSpec( dbPRBoundaryId prBoundaryId, dbCoreBoxSpec *coreBoxSpec );
Description
Gets the coreBoxSpec of the PR boundary.
Arguments
Return Values
|
Returns TRUE if the function successfully gets the coreBoxSpec. |
dbSetPRBoundaryCoreBoxSpec
Boolean
dbGetPRBoundaryCoreBoxSpec( dbPRBoundaryId prBoundaryId, const dbCoreBoxSpec *coreBoxSpec );
Description
Sets the coreBoxSpec of the PR boundary.
Arguments
Return Values
|
Returns TRUE if the function successfully sets the coreBoxSpec. |
dbRemovePRBoundaryCoreBoxSpec
Boolean
dbRemovePRBoundaryCoreBoxSpec( dbPRBoundaryId prBoundaryId );
Description
Removes the coreBoxSpec of the PR boundary.
Arguments
Return Values
|
Returns TRUE if the function successfully removes the coreBoxSpec. |
dbGetPRBoundaryIOBox
dbBBox *
dbGetPRBoundaryIOBoxSpec( dbPRBoundaryId prBoundaryId );
Description
Gets the IO box of the PR boundary.
Arguments
Return Values
dbSetPRBoundaryIOBox
Boolean
dbSetPRBoundaryIOBox( dbPRBoundaryId prBoundaryId, const dbBBox *bBox );
Description
Sets the IO box of the PR boundary.
Arguments
Return Values
|
Returns TRUE if the function successfully sets the IO box. |
dbRemovePRBoundaryIOBox
Boolean
dbRemovePRBoundaryIOBox( dbPRBoundaryId prBoundaryId );
Description
Removes the IO box of the PR boundary.
Arguments
Return Values
|
Returns TRUE if the function successfully removes the IO box. |
dbStartGenPRBoundaryToBlockage
dbGenStateId
dbStartGenPRBoundaryToBlockage( dbPRBoundaryId prBoundaryId );
Description
Starts generating all blockages owned by the PR boundary.
Arguments
Return Values
|
Returns the generator |
dbGetCoreBoxSpecNumRows
int
dbGetCoreBoxSpecNumRows( const dbCoreBoxSpec *coreBoxSpec );
Description
Gets the number of rows in the PR boundary coreBoxSpec.
Arguments
Return Values
dbGetCoreBoxSpecRowBBox
dbBBox *
dbGetCoreBoxSpecNumRows( const dbCoreBoxSpec *coreBoxSpec, int rowNum );
Description
Gets the bounding box of the row indexed by the specified number in the PR boundary coreBoxSpec.
Arguments
Return Values
dbGetSnapBoundary
dbSnapBoundaryId
dbGetSnapBoundary( dbCellViewId cvId );
Description
Gets the snap boundary in the given cellview.
Arguments
|
The database |
Return Values
|
Returns the |
dbTransformBoundary
Boolean
dbTransformBoundary( dbBoundaryId boundaryId, float scale, float angle );
Description
Transforms the boundary object specified by boundaryId according to the specified scale factor and rotation angle.
Arguments
|
The database |
|
Return Values
|
Returns TRUE if the boundary object was successfully transformed. Returns FALSE otherwise. |
dbGetClusterBoundaryName
String
dbGetClusterBoundaryName( dbClusterBoundaryId boundaryId, );
Description
Returns the name for the given cluster boundary.
Arguments
|
The database |
Return Values
|
Returns a text string containing the name of the specified cluster boundary. |
dbSetClusterBoundaryName
Boolean
dbSetClusterBoundaryName( dbClusterBoundaryId boundaryId, const char *name );
Description
Sets the name of the given cluster boundary to the specified name.
Arguments
Return Values
|
Returns TRUE if the name for the cluster boundary was successfully set. Returns FALSE otherwise. |
dbGetClusterBoundaryCluster
dbClusterId
dbGetClusterBoundaryCluster( dbClusterBoundaryId boundaryId, );
Description
Gets the cluster for the given cluster boundary.
Arguments
Return Values
dbIsBoundaryOrthogonal
Boolean
dbIsBoundaryOrthogonal( dbBoundaryId boundaryId );
Description
Checks that the point array for a boundary is orthogonal.
Arguments
Return Values
|
Returns TRUE if the point array for the boundary is orthogonal. Returns FALSE otherwise. |
dbIsBoundaryRectangle
Boolean
dbIsBoundaryRectangle( dbBoundaryId boundaryId );
Description
Checks that a boundary is a rectangle.
Arguments
Return Values
|
Returns TRUE if the boundary is a Rectangle. Returns FALSE otherwise. |
dbGetBoundaryArea
double
dbGetBoundaryArea( dbBoundaryId boundaryId );
Description
Gets the area in database units (DBU) squared the boundary specified by the database BoundaryId.
Arguments
Return Values
|
Returns the area in DBU squared for the boundary specified by |
dbGetBoundaryEdge
Boolean
dbGetBoundaryEdge( dbBoundaryId boundaryId, unsigned int nPoints, dbPoint *pointArray, string **edgeNames );
Description
Gets the number, the pointArray, and the name for each edge of the boundary given in boundaryIdl.
Arguments
Return Values
|
Returns TRUE if the edges for boundaryId were successfully retrieved. Returns FALSE otherwise. |
dbSetBoundaryEdge
Boolean
dbSetBoundaryEdge( dbBoundaryId boundaryId, unsigned int nPoints, dbPoint *pointArray, string **edgeNames );
Description
Sets the edges of the boundary given in boundaryId to the given edges. The edgeNames attribute is optional.
Arguments
Return Values
|
Returns TRUE if the edges for boundaryId were successfully set. Returns FALSE otherwise. |
dbStartGenAreaBoundary
dbGenStateId
dbStartGenAreaBoundary( dbCellViewId cvId );
Description
Starts generating all the area boundaries in the cellview.
The function returns only area boundaries, no other boundary types.
Arguments
Return Values
|
Returns the generator |
dbGenAreaBoundary
Boolean
dbGenAreaBoundary( dbGenStateId pState, dbAreaBoundaryId *areaBoundaryId );
Description
Generates all the area boundaries in the cellview.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if an area boundary is generated. |
dbStartGenClusterToBoundary
dbGenStateId
dbStartGenClusterToBoundary( dbClusterId clusterId );
Description
Starts generating all the boundaries in a cluster.
Arguments
Return Values
|
Returns the generator |
dbGenClusterToBoundary
Boolean
dbGenClusterToBoundary( dbGenStateId pState, dbClusterBoundaryId *boundaryId );
Description
Generates the next boundary in the cluster.
Arguments
|
The generator |
|
|
The pointer to the |
Return Values
|
Returns TRUE if a boundary is generated. Returns FALSE otherwise. |
dbStartGenBoundaryToPoint
dbGenStateId
dbStartGenBoundaryToPoint( dbBoundaryId BoundaryId );
Description
Starts generating all the points for the given boundary.
Arguments
Return Values
|
Returns the generator |
dbGenBoundaryToPoint
Boolean
dbGenBoundayToPoint( dbGenStateId pState, dbPoint *point );
Description
Generates the next point in the boundary.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if a point is generated. Returns FALSE otherwise. |
Clusters
The following functions generate clusters within cellViews.
dbStartGenCluster
dbGenStateId
dbStartGenCluster( dbCellViewId cvId );
Description
Starts generating all the cluster objects in the specified cellview.
Arguments
Return Values
|
Returns the generator |
dbGenCluster
Boolean
dbGenCluster( dbGenStateId pState, dbCluster* clusterId );
Description
Generates the next cluster in the cellview.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a cluster is generated. Returns FALSE otherwise. |
LayerHeaders
A layerHeader indicates whether specific objects are using a layer in the design hierarchy. The objects can be steiners, guides, blockages, or lppHeaders. The layerHeader provides direct access to the objects grouped by layer.
The OpenAccess database automatically manages layerHeaders.
The LayerHeader Id is the following.
typedef dbId dbLayerHeadid;
The validation function verifies that the specified dbLayerHeaderId maps to a valid oaLayerHeader object.
inline oaLayerHeader *
dbiValidateLayerHeader (dbLayerHeaderId layerHeaderId);
dbIsLayerHeaderId
Boolean
dbIsLayerHeaderId( dbId id );
Description
Checks that the id refers to a valid dbLayerHeaderId.
Arguments
Return Values
|
Returns TRUE if the id refers to a layer header. Returns FALSE otherwise. |
dbFindLayerHeader
dbLayerHeaderId
dbFindLayerHeader( dbCellViewId cvId, dbLayer layerNum );
Description
Finds the layer header on the specified layer in the specified cellview.
Arguments
Return Values
dbGetLayerHeaderLayerNum
dbLayer
dbGetLayerHeaderLayerNum( dbLayerHeaderId layerHeaderId );
Description
Gets the layer number of the layer header.
Arguments
Return Values
dbIsLayerHeaderBound
Boolean
dbIsLayerHeaderBound( dbLayerHeaderId layerHeaderId );
Description
Checks whether the layer header is bound to a technology database layer.
A layer header can be bound or unbound. A bound layer header has a valid technology database object. An unbound layer header has a layer number only. Layer header binding occurs when a layer header is read in or a new layer header is created.
Arguments
Return Values
|
Returns TRUE if the layer header is bound to a technology database layer. |
dbGetLayerSteinerBBox
dbBBox *
dbGetLayerSteinerBBox( dbCellViewId cvId, dbLayer layerNum );
Description
Gets the combined BBox of the steiners from the layer header of the layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the combined BBox of the steiners from the layer header of the layer. |
dbGetLayerGuideBBox
dbBBox *
dbGetLayerGuideBBox( dbCellViewId cvId, dbLayer layerNum );
Description
Gets the combined BBox of the guides from the layer header of the layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the combined BBox of the guides from the layer header of the layer. |
dbGetLayerBlockageBBox
dbBBox *
dbGetLayerBlockageBBox( dbCellViewId cvId, dbLayer layerNum );
Description
Gets the combined BBox of the blockages from the layer header of the layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the combined BBox of the blockages from the layer header of the layer. |
dbGetLPPHeaderLayerHeader
dbLayerHeaderId
dbGetLPPHeaderLayerHeader( dbLPPHeaderId lppHeaderId );
Description
Gets the layerHeader with which the lppHeader associates.
Arguments
Return Values
|
Returns the database identifier of the layerHeader with which the lppHeader associates. |
dbStartGenLayerHeader
dbGenStateId
dbStartGenLayerHeader( dbCellViewId cvId );
Description
Starts layerHeader generation in the specified cellview.
Arguments
Return Values
|
Returns the generator |
dbGenLayerHeader
Boolean
dbGenLayerHeader( dbGenStateId pState, dbLayerHeaderId *layerHeaderId );
Description
Generates the layer headers in the cellview.
Arguments
|
The generator |
|
|
A pointer to the |
Return Values
|
Returns TRUE if a layer header is generated. Returns FALSE otherwise. |
dbStartGenLayerToSteiner
dbGenStateId
dbStartGenLayerToSteiner( dbCellViewId cvId, dbLayer layerNum );
Description
Starts steiner generation on the layer header of the specified layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the generator |
dbGenLayerToSteiner
Boolean
dbGenLayerToSteiner( dbGenStateId pState, dbSteinerId *steinerId );
Description
Generates the steiners on the layer header of the specified layer.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a steiner is generated. Returns FALSE otherwise. |
dbStartGenLayerToGuide
dbGenStateId
dbStartGenLayerToGuide( dbCellViewId cvId, dbLayer layerNum );
Description
Starts guide generation on the layer header of the specified layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the generator |
dbGenLayerToGuide
Boolean
dbGenLayerToGuide( dbGenStateId pState, dbGuideId *guideId );
Description
Generates the guides on the layer header of the specified layer.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if a guide is generated. Returns FALSE otherwise. |
dbStartGenLayerToBlockage
dbGenStateId
dbStartGenLayerToBlockage( dbCellViewId cvId, dbLayer layerNum );
Description
Starts blockage generation on the layer header of the specified layer.
Arguments
|
The layer number. The function uses the layer number to obtain the layer header in the cellview. |
Return Values
|
Returns the generator |
dbGenLayerToBlockage
Boolean
dbGenLayerToBlockage( dbGenStateId pState, dbBlockageId *blockageId );
Description
Generates the blockages on the layer header of the specified layer.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a blockage is generated. Returns FALSE otherwise. |
dbStartGenLayerHeaderToLPPHeader
dbGenStateId
dbStartGenLayerHeaderToLPPHeader( dbLayerHeaderId layerHeaderId);
Description
Starts generating all the lppHeaders that contain the layer of the specified layerHeader.
Arguments
Return Values
|
Returns the generator |
dbGenLayerHeaderToLPPHeader
Boolean
dbGenLayerHeaderToLPPHeader( dbGenStateId pState, dbLPPHeaderId *lppHeaderId );
Description
Generates the lppHeaders that contain the layer of the specified layerHeader.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if an lppHeader is generated. Returns FALSE otherwise. |
Markers
This section describes functions that affect marker objects.
About Markers
Markers are used to highlight a concept in a design, such as a design error, a warning condition, or any information generated by a tool. Typically, markers are used to report DRC violations, such as minimum spacing violation rules, shorts and antenna. The marker object itself stores the coordinates of the marker shape, but no layer information. Markers optionally store their relationship to the objects that caused them.
dbIsMarkerId
Boolean
dbIsMarkerId( dbMarkerId markerId );
Description
Checks that the given markerId refers to a marker object.
Arguments
Return Values
|
Returns TRUE if the markerId refers to a marker object. Returns FALSE if it is not a marker object. |
dbCreateMarker
dbMarkerId
dbCreateMarker( dbCellViewId cvId, const char *msg, const char *shortMsg, const char *tool, Boolean isVisible, Boolean isClosed, dbMarkerSeverity severity, dbDeleteWhenType deleteWhen, unsigned int nPoints, dbPoint *pointArray, unsigned int nObjects, dbId *objectIds );
Description
Creates a marker object in the cellview cvId with the specified attributes.
Arguments
Return Values
|
Returns the database |
dbDeleteMarker
Boolean
dbDeleteMarker( dbMarkerId markerId );
Description
Deletes the marker object specified by markerId.
Arguments
Return Values
|
Returns TRUE if the marker object was successfully deleted. Returns FALSE otherwise. |
dbTransformMarker
Boolean
dbTransformMarker( dbMarkerId markerId, float scale, float angle );
Description
Transforms the marker object specified by markerId according to the specified scale factor and rotation angle.
Arguments
Return Values
|
Returns TRUE if the marker object was successfully transformed. Returns FALSE otherwise. |
dbAddObjectToMarker
Boolean
dbAddObjectToMarker( dbMarkerId markerId, dbId objectId );
Description
Arguments
Return Values
|
Returns TRUE if an object was successfully added to the marker. Returns FALSE otherwise. |
dbRemoveObjectFromMarker
Boolean
dbRemoveObjectFromMarker( dbMarkerId markerId, dbId objectId );
Description
Removes an object from the marker.
Arguments
Return Values
|
Returns TRUE if an object was successfully removed from the marker. Returns FALSE otherwise. |
dbIsMarkerVisible
Boolean
dbIsMarkerVisible( dbMarkerId markerId, );
Description
Checks that the marker specified by the database markerId is visible.
Arguments
Return Values
|
Returns TRUE if the marker specified by |
dbSetMarkerVisible
Boolean
dbSetMarkerVisible( dbMarkerId markerId, Boolean isVisible );
Description
Sets the isVisible field for the specified marker.
Arguments
Return Values
|
Returns TRUE if the |
dbIsMarkerClosed
Boolean
dbIsMarkerClosed( dbMarkerId markerId );
Description
Verifies that the marker specified by the database markerId is closed.
Arguments
Return Values
|
Returns TRUE if the marker specified by |
dbSetMarkerClosed
Boolean
dbSetMarkerClosed( dbMarkerId markerId, Boolean isClosed );
Description
Sets the isClosed field for the specified marker.
Arguments
Return Values
|
Returns TRUE if the |
dbGetMarkerSeverity
dbMarkerSeverity
dbGetMarkerSeverity( dbMarkerId markerId, );
Description
Gets the severity of the violation shown by the given marker, defaults to info.
Arguments
Return Values
dbSetMarkerSeverity
Boolean
dbSetMarkerSeverity( dbMarkerId markerId, dbMarkerSeverity severity );
Description
Sets the severity field for the specified marker.
Arguments
Return Values
|
Returns TRUE if the |
dbMarkerSeverityToString
String
dbMarkerSeverityToString( dbMarkerSeverity severity );
Description
Converts an enumerated value to a string for the severity attribute of a marker object.
Arguments
Return Values
dbStringToMarkerSeverity
dbMarkerSeverity
dbStringToMarkerSeverity( constString s );
Description
Converts a string to an enumerated value for the severity attribute of a marker object.
Arguments
Return Values
dbGetMarkerMsg
String
dbGetMarkerMsg( dbMarkerId markerId, );
Description
Gets the message associated with the marker given in the database markerId
Arguments
Return Values
dbSetMarkerMsg
Boolean
dbSetMarkerMsg( dbMarkerId markerId, const char *msg );
Description
Associates the message with the specified marker.
Arguments
Return Values
|
Returns TRUE if the message is successfully associated with the specified marker. Returns FALSE otherwise. |
dbGetMarkerShortMsg
String
dbGetMarkerShortMsg( dbMarkerId markerId );
Description
Gets the short message associated with the marker given in the database markerId
Arguments
Return Values
dbSetMarkerShortMsg
Boolean
dbSetMarkerShortMsg( dbMarkerId markerId, const char *shortMsg );
Description
Associates the short message with the specified marker.
Arguments
Return Values
|
Returns TRUE if the short message is successfully associated with the specified marker. Returns FALSE otherwise. |
dbGetMarkerTool
String
dbGetMarkerTool( dbMarkerId markerId );
Description
Gets the tool name associated with the marker given in the database markerId
Arguments
Return Values
dbSetMarkerTool
Boolean
dbSetMarkerTool( dbMarkerId markerId, const char *tool );
Description
Sets the tool name Associated with the specified marker.
Arguments
Return Values
|
Returns TRUE if the tool name is successfully associated with the specified marker. Returns FALSE otherwise. |
dbGetMarkerDeleteWhen
dbDeleteWhenType
dbGetMarkerDeleteWhen( dbMarkerId markerId );
Gets the deleteWhen attribute for the marker specified by markerId.
Arguments
Return Values
|
Returns the value of the deleteWhen marker. The valid enum choices are: |
dbSetMarkerDeleteWhen
Boolean
dbSetMarkerDeleteWhen( dbMarkerId markerId, dbDeleteWhenType deleteWhen );
Sets the deleteWhen attribute for the marker specified by markerId.
Arguments
|
The value of the deleteWhen attribute. The valid enum choices are: |
Return Values
|
Returns TRUE if the deleteWhen attribute was successfully set. Returns FALSE otherwise. |
dbGetMarker
Boolean
dbGetMarker( dbMarkerId markerId, unsigned int *nPoints, dbPoint **pointArray );
Description
Gets the points for the marker specified by markerId.
Arguments
|
A pointer to the number of marker points. Returned by the function if points are retrieved. |
|
|
The pointer to the marker points array. Returned by the function if points are retrieved. |
Return Values
|
Returns TRUE if the operation is successful. Returns FALSE otherwise. |
dbSetMarkerPoint
Boolean
dbSetMarkerPoint( dbMarkerId markerId, unsigned int nPoints, dbPoint *pointArray );
Description
Sets the point array for the marker specified by markerId.
Arguments
Return Values
|
Returns TRUE if the |
dbStartGenMarker
dbGenStateId
dbStartGenMarker( dbCellViewId cvId );
Description
Starts generating all the markers for a cellview.
Arguments
Return Values
|
Returns the generator |
dbGenMarker
Boolean
dbGenMarker( dbGenStateId pState, dbMarkerId *pMarkerId );
Description
Generates the next marker in the cellview.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a marker is generated. Returns FALSE otherwise. |
dbStartGenMarkerToPoint
dbGenStateId
dbStartGenMarkerToPoint( dbMarkerId markerId );
Description
Starts generating all the points for the given marker.
Arguments
Return Values
|
Returns the generator |
dbGenMarkerToPoint
Boolean
dbGenMarkerToPoint( dbGenStateId pState, dbPoint *point );
Description
Generates the next point in the marker.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a point is generated. Returns FALSE otherwise. |
dbStartGenMarkerToObject
dbGenStateId
dbStartGenMarkerToObject( dbMarkerId markerId );
Description
Starts generating all the objects for the given marker.
Arguments
Return Values
|
Returns the generator |
dbGenMarkerToObject
Boolean
dbGenMarkerToObject( dbGenStateId pState, dbId *objId );
Description
Generates the next object for the given marker.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if an object is generated. Returns FALSE otherwise. |
dbStartGenObjectToMarker
dbGenStateId
dbStartGenObjectToMarker( dbId objId );
Description
Starts generating all the markers for the given object.
Arguments
Return Values
|
The generator |
dbGenObjectToMarker
Boolean
dbGenObjectToMarker( dbGenStateId pState, dbMarkerId *markerId );
Description
Generates the next marker on the object.
Arguments
|
The generator |
|
|
The |
Return Values
|
Returns TRUE if a marker is generated. Returns FALSE otherwise. |
RowHeaders
This section describes functions that affect row headers.
About rowHeaders
A rowHeader contains information about a particular siteDef and a list of all the rows using that siteDef.
dbIsRowHeaderId
Boolean
dbIsRowheaderId( dbRowHeaderId rowHeaderId );
Description
Checks that the given rowHeaderId refers to a rowHeader object.
Arguments
Return Values
|
Returns TRUE if the rowHeaderId refers to a rowHeader object. Returns FALSE if it is not a row object. |
dbFindRowHeader
dbRowHeaderId
dbFindRowheaderId( dbCellViewId cvId, String siteDefName );
Description
Searches the specified cellview for a rowHeader with the specified master siteDef name.
Arguments
Return Values
|
Returns a valid rowHeader found in the specified cellview. Returns dbcNullId otherwise. |
dbGetRowHeaderSiteDef
dbSiteDefId
dbGetRowHeaderSiteDef( dbRowHeaderId rowHeaderId );
Description
Gets the siteDef associated with the rowHeader.
Arguments
Return Values
|
Returns the dbSiteDefId if the rowHeader was successfully retrieved. |
dbGetRowHeaderSiteDefName
Boolean
dbGetRowHeaderSiteDefName( dbRowHeaderId rowHeaderId, String *siteDefName );
Description
Gets the siteDefName attribute associated with the rowHeader object.
Arguments
|
The name of the siteDef associated with the rowHeader. A string pointer which is assigned to the siteDefName returned. |
Return Values
|
Returns TRUE if the name of the siteDef of the rowHeader was successfully retrieved. Returns FALSE otherwise. |
dbGetRowHeaderSiteDefWidth
Boolean
dbGetRowHeaderSiteDefWidth( dbRowHeaderId rowHeaderId, uint32_t* siteDefWidth );
Description
Gets the width of the siteDef attribute associated with the rowHeader object.
Arguments
|
The width of the siteDef associated with the rowHeader. The siteDefWidth pointer is filled by the function. |
Return Values
|
Returns TRUE if the width of the siteDef of the rowHeader was successfully retrieved. Returns FALSE otherwise. |
dbGetRowHeaderSiteDefHeight
Boolean
dbGetRowHeaderSiteDefHeight( dbRowHeaderId rowHeaderId, uint32_t* siteDefHeight );
Description
Gets the height of the siteDef attribute associated with the rowHeader object.
Arguments
|
The height of the siteDef associated with the rowHeader. The siteDefHeight pointer is filled by the function. |
Return Values
|
Returns TRUE if the height of the siteDef of the rowHeader was successfully retrieved. Returns FALSE otherwise. |
dbGetRowHeaderBBox
Boolean
dbGetRowHeaderBBox( dbRowHeaderId rowHeaderId, dbBBox* rowHeaderBBox );
Description
Gets the bBox of all the rows that refer to this rowHeader.
Arguments
|
The bBox of all the rows that refer to the row Header. The rowHeaderBBox pointer is filled by the function. |
Return Values
|
Returns TRUE if the BBox of the rowHeader was successfully retrieved. Returns FALSE otherwise. |
dbGetRowHeaderNumRows
Boolean
dbGetRowHeaderNumRows( dbRowHeaderId rowHeaderId, uint32_t* numRows );
Description
Gets the number of rows that refer to the rowHeader object.
Arguments
|
The number of rows that refer to the rowHeader. The numRows pointer is filled by the function. |
Return Values
|
Returns TRUE if the number of rows that refer to the rowHeader was successfully retrieved. Returns FALSE otherwise. |
dbIsRowHeaderBound
Boolean
dbIsRowHeaderBound( dbRowHeaderId rowHeaderId );
Description
Checks whether the rowHeader is bound. If the rowHeader is bound, the siteDef is read in the linkage from the rowHeader and is established by traversing from a row to that siteDef.
Arguments
Return Values
|
Returns TRUE if the rowHeader object is bound. Returns FALSE otherwise. |
dbStartGenRowHeader
dbGenStateId
dbStartGenRowHeader( dbCellViewId cvId );
Description
Starts generating all the rowHeaders for a cellview.
Arguments
Return Values
|
Returns the generator |
dbGenRowHeader
Boolean
dbGenRowHeader( dbGenStateId pState, dbRowHeaderId* pRowHeaderId );
Description
Generates the next rowHeader in the cellview.
Arguments
|
The generator |
|
|
The |
EEQ Masters
The EEQmaster (electrically equivalent master) is stored as a string on the cellview. EEQ cellviews are devices such as OR-gates or inverters that have several implementations with different shapes, geometries, and orientations.
dbGetCellViewEEQMaster
String
dbGetCellViewEEQMaster( dbCellViewId cvId );
Returns the value of the EEQmaster attribute of the cellview. If the string is empty, NULL will be returned.
dbSetCellViewEEQMaster
Boolean
dbSetCellViewEEQMaster( dbCellViewId cvId, String EEQMaster );
Set the value of the EEQmaster attribute of the cellview.
Steiners
A steiner is a logical point that can represent a pin, or the start and/or end points of a route. A steiner is a figure, specifically a connFig, that can have connectivity. It can also be associated with a specific layer.
The database Id of a steiner is the following.
typedef dbId dbSteinerId;
A steiner record is the same as a figure record. See the following.
typedef struct dbFigRec {
dbType type;
dbFigId fig;
size_t size;
dbCellViewId cellView;
dbNetId net;
dbPinId pin;
dbBBox bBox;
dbPurpose purpose;
} dbFigRec;
typedef dbFigRec dbSteinerRec;
dbIsSteinerId
Boolean
dbIsSteinerId( dbId objId );
Description
Determines whether the dbId is a valid steiner object.
Arguments
Return Values
|
Returns TRUE if the dbId is a valid steiner object. |
dbDeleteSteiner
Boolean
dbDeleteSteiner( dbSteinerId steinerId );
Description
Deletes the dbSteinerId object.
Arguments
Return Values
|
Returns TRUE if the steinerId is deleted. |
dbCreateSteiner
dbSteinerId
dbCreateSteiner( dbCellViewId cvId, dbBBox *bBox, dbLayer layerNum );
Description
Creates a steiner object with the specified attributes.
Arguments
|
The layer with which to associate the steiner. If layerNum is |
Return Values
|
Returns dbSteinerId if the steiner is created. |
dbGetSteinerBBox
dbBBox *
dbGetSteinerBBox( dbSteinerId steinerId );
Description
Gets the bounding box of the steiner object.
Arguments
dbSetSteinerBBox
Boolean
dbSetSteinerBBox( dbSteinerId steinerId, const dbBBox *bBox );
Description
Sets the bounding box of the steiner object.
Arguments
Return Values
|
Returns TRUE if the steiner bounding box is set successfully. |
dbGetSteinerLayerHeader
dbLayerHeaderId
dbGetSteinerLayerHeader( dbSteinerId steinerId );
Description
Gets the layer header of the steiner object.
Arguments
|
Returns the layer header of the steiner object. |
dbGetSteinerLayerNum
dbLayer
dbGetSteinerLayerNum( dbSteinerId steinerId );
Description
Gets the layer number on which the steiner object resides.
Arguments
|
Returns the layer on which the steiner object resides. |
dbSetSteinerLayerNum
Boolean
dbSetSteinerLayerNum( dbSteinerId steinerId, dbLayer layerNum );
Description
Sets the layer number on which the steiner resides.
Arguments
Return Values
|
Returns TRUE if the steiner layer is set successfully. |
dbStartGenSteiner
dbGenStateId
dbStartGenSteiner( dbCellViewId cvId )
Description
Starts generating all the steiners in the cellview.
Arguments
Return Values
|
The generator |
dbGenSteiner
Boolean
dbGenSteiner( dbGenStateId pState, dbSteinerId *steinerId )
Description
Generates the next steiner in the cellview.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if the steiner object is generated. |
dbStartGenSteinerToRoute
dbGenStateId
dbStartGenSteinerToRoute( dbSteinerId steinerId )
Description
Starts generation of the routes associated with the specified steiner object.
Arguments
Return Values
|
The generator |
dbGenSteinerToRoute
Boolean
dbGenSteinerToRoute( dbGenStateId pState, dbRouteId *routeId )
Description
Generates the next route for the specified steiner.
Arguments
|
The generator |
|
|
Returns TRUE if the route is generated. |
dbCreateTapSteiner
dbSteinerId
dbCreateTapSteiner( dbCellViewIdcvId, const dbBBox *bbox, dbLayerlayerNum)
Description
Creates a Tap Steiner object with the specified bounding box in the given cellview.
Arguments
|
List of bBox for the Tap Steiner object that will be created. |
|
|
Layer associated with the created Tap Steiner object that will be created. |
Return Value
dbIsTapSteiner
Boolean
dbIsTapSteinerId( dbSteinerIdsteinerId)
Description
Checks whether the specified ID is a Tap Steiner ID.
Arguments
Return Value
Track Patterns
This section describes functions that affect trackPattern objects.
About trackPatterns
trackPatterns are used to define the routing grid for gridded routers.
dbIsTrackPatternId
Boolean
dbIsTrackPatternId( dbTrackPatternId trackPatternId );
Description
Checks that the given trackPatternId refers to a trackPattern object.
Arguments
|
The database |
Return Values
|
Returns TRUE if the trackPatternId refers to a track pattern. Returns FALSE if it is not a track pattern. |
dbCreateTrackPattern
dbTrackPatternId
dbCreateTrackPattern( dbCellViewId cvId, Boolean isHorizontal, dbCoord startCoord, unsigned int numTracks, dbDistance trackSpace, dbLayer layer );
Description
Creates a trackPattern with the specified attributes in the specified cell view.
Arguments
|
Returns the database |
dbDeleteTrackPattern
Boolean
dbDeleteTrackPattern( dbTrackPatternId tpId );
Description
Deletes the track pattern specified by tpId.
Arguments
|
The database |
Return Values
|
Returns TRUE if the track pattern was successfully deleted. Returns FALSE otherwise. |
dbGetTrackPatternIsHorizontal
Boolean
dbGetTrackPatternIsHorizontal( dbTrackPatternId tpId );
Description
Verifies if the track pattern specified by tpId is horizontal.
Arguments
|
The database |
Return Values
|
Returns TRUE if the track pattern is horizontal. Returns FALSE otherwise. |
dbGetTrackPatternStart
Boolean
dbGetTrackPatternStart( dbTrackPatternId tpId, dbCoord *start );
Description
Gets the start coordinate for the track pattern specified by tpId.
Arguments
|
A pointer to the start coordinate of the trackPattern. Returned if the start coordinate is retrieved. |
Return Values
|
Returns TRUE if the start coordinate of the trackPattern is successfully retrieved. Returns FALSE otherwise. |
dbSetTrackPatternStart
Boolean
dbSetTrackPatternStart( dbTrackPatternId tpId, dbCoord start );
Description
Sets the start coordinate for the trackPattern specified by tpId.
Arguments
|
The start coordinate value to be set for the trackPattern specified by tpId. |
Return Values
|
Returns TRUE if the start coordinate for the track pattern specified by tpId was successfully set. Returns FALSE otherwise. |
dbGetTrackPatternNumTracks
Boolean
dbGetTrackPatternNumTracks( dbTrackPatternId tpId, unsigned int *numTracks );
Description
Gets the number of track lines for the track pattern specified by tpId.
Arguments
|
A pointer to the number of track lines of the trackPattern. Returned if the number of track lines is retrieved. |
Return Values
|
Returns TRUE if the number of track lines for the track pattern specified by tpId was successfully retrieved. Returns FALSE otherwise. |
dbSetTrackPatternNumTracks
Boolean
dbSetTrackPatternNumTracks( dbTrackPatternId tpId, unsigned int num );
Description
Sets the number of track lines for the track pattern specified by tpId.
Arguments
Return Values
|
Returns TRUE if the number of track lines for the track pattern specified by tpId was successfully set. Returns FALSE otherwise. |
dbGetTrackPatternSpace
Boolean
dbGetTrackPatternSpace( dbTrackPatternId tpId, dbDistance *space );
Description
Returns the tracking space between the track lines of the track pattern specified by tpId.
Arguments
|
A pointer to the tracking space of the trackPattern. Returned if the tracking space is retrieved. |
Return Values
|
Returns TRUE if the tracking space for the trackPattern specified by tpId was successfully retrieved. Returns FALSE otherwise. |
dbSetTrackPatternSpace
Boolean
dbSetTrackPatternSpace( dbTrackPatternId tpId, dbDistance space );
Description
Sets the tracking space between track lines for the trackPattern specified by tpId.
Arguments
|
The tracking space between two track lines to be set for the trackPattern specified by tpId. |
Return Values
|
Returns TRUE if the tracking space between two track lines for the trackPattern specified for tpId was successfully set. Returns FALSE otherwise. |
dbGetTrackPatternRoutingLayer
Boolean
dbGetTrackPatternRoutingLayer( dbTrackPatternId tpId, dbLayer *layer );
Description
Gets the routing layer for the trackPattern specified by tpId.
Arguments
|
A pointer to the routing layer for the trackPattern. Returned if the layer is retrieved. |
Return Values
|
Returns TRUE if the routing layer for the trackPattern specified for tpId was successfully retrieved. Returns FALSE otherwise. |
dbSetTrackPatternRoutingLayer
Boolean
dbSetTrackPatternRoutingLayer( dbTrackPatternId cvId, dbLayer layer );
Description
Sets the routing layer for the trackPattern specified by tpId.
Arguments
|
The routing layer to be set for the trackPattern specified by tpId. |
Return Values
|
Returns TRUE if the routing layer for the trackPattern specified for tpId was successfully set. Returns FALSE otherwise. |
dbStartGenTrackPattern
dbGenStateId
dbStartGenTrackPattern( dbCellViewId cvId );
Description
Starts generating all the trackPatterns for a cellview.
Arguments
Return Values
|
Returns the generator |
dbGenTrackPattern
Boolean
dbGenTrackPattern( dbGenStateId pState, dbTrackPatternId *tpId );
Description
Generates the next track pattern in the subject cellview.
Arguments
|
The generator |
|
|
A pointer to the trackPattern ID. Returned if a trackPattern is successfully generated. |
Return Values
|
Returns TRUE if a trackPattern is generated. Returns FALSE otherwise. |
Shape Figure Functions
Hierarchy of Shapes
Different geometrical shapes in the database, such as rectangles or polygons, are grouped into different object types. These object types collectively form the object class called shape. The following table illustrates the shape hierarchy.
| Name | Enumerated constant | ID Type for type dbType |
|---|---|---|
Operations on Generic Shapes
The following operations perform operations on or retrieve information about shapes of all kinds contained in a cellview, all shapes of a particular kind contained in a cellview, or a single specified shape.
dbIsShapeId
Boolean
dbIsShapeId( dbShapeId shapeId );
Returns TRUE if the ID passed as shapeId is a shape. Otherwise, it returns FALSE.
dbStartGenShape
dbGenStateId
dbStartGenShape( dbCellViewId cellViewId );
Starts the generator for all shapes (including both parent and child shapes) contained in a cellview. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGenShape
Boolean
dbGenShape( dbGenStateId stateId, dbShapeId pShapeId );
Generates all shapes (including both parent and child shapes) contained in a cellview. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbStartGenNonChildShape
dbGenStateId
dbStartGenNonChildShape( dbCellViewId cellViewId );
Starts the generator for all shapes (including both parent and child shapes) contained in a cellview. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGenNonChildShape
Boolean
dbGenNonChildShape( dbGenStateId stateId, dbShapeId pShapeId );
Generates all shapes contained in the cellview, specified by cellViewId, that are not child shapes of some parent. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbStartGenLPToShape
dbGenStateId
dbStartGenLPToShape( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose );
Starts the generator for all shapes (including both parent and child shapes) contained in a cellview with the specified layer and purpose. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGenLPToShape
Boolean
dbGenLPToShape( dbGenStateId stateId, dbShapeId pShapeId );
Generates all shapes (including both parent and child shapes) contained in a cellview with the specified layer and purpose. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbStartGenLPToPinShape
dbGenStateId
dbStartGenLPToPinShape( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose );
Starts the generator for all pin shapes (including both parent and child shapes) contained in a cellview with the specified layer and purpose. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGenLPToPinShape
Boolean
dbGenLPToPinShape( dbGenStateId stateId, dbShapeId pShapeId );
Generates all pin shapes (including both parent and child shapes) contained in a cellview with the specified layer and purpose. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbStartGenLPToNonChildShape
dbGenStateId
dbStartGenLPToNonChildShape( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose );
Starts the generator for all the shapes contained in the cellview with the specified layer and purpose that are not child shapes of some parent. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGenLPToNonChildShape
Boolean
dbGenLPToNonChildShape( dbGenStateId stateId, dbShapeId pShapeId );
Generates all the shapes contained in the cellview with the specified layer and purpose that are not child shapes of some parent. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbDeleteShape
Boolean
dbDeleteShape( dbShapeId shapeId );
Deletes the shape specified by shapeId. After this function is called, shapeId is invalid and you cannot use it. If the shape specified by shapeId is a parent, then all descendant figures are deleted as well. If the shape specified by shapeId is a child and the child’s point list matches the parent’s point list, the shape cannot be deleted, and the function returns FALSE. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbMoveShape
dbShapeId
dbMoveShape( dbShapeId shapeId, dbCellViewId destCellViewId, dbTransform transform );
Moves the shape specified by shapeId. The shape is magnified, then rotated and reflected about the origin as specified by the transformation’s orientation. Then it is translated by the transformation’s offset. If the shape, cellview, or transformation is invalid, the function gives a fatal error message and returns dbcNullShapeId. Otherwise, the function returns the ID of the transformed shape.
If destCellViewId is dbcNullCellViewId or if the destCellViewId is the cellview that contains the shape, the move is done within the same cellview. The shape’s ID and purpose are not changed. All properties on the shape are preserved.
If the destCellViewId is not the original shape’s cellview, the shape is deleted and a new shape is created in the cellview specified by destCellViewId. The newly created shape has a different ID but retains its original purpose. The new shape is not associated with any net, pin, or terminal of the original shape. All properties on the shape are preserved but have new IDs.
If shapeId refers to a parent shape with children, all descendant figures are moved according to the information kept in transform. If shapeId refers to a child by itself, the shape is moved without moving the parent. However, if the move is between cellviews, the child is moved but is no longer a child in the destination cellview. All other features regarding purpose and properties apply to child as well as parent shapes that are moved.
If the shape specified by shapeId is a child and the child’s point list matches the parent’s point list, the move is not allowed and the function returns dbcNullShapeId. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbCopyShape
dbShapeId
dbCopyShape( dbShapeId shapeId, dbCellViewId destCellViewId, dbTransform transform );
Copies the shape specified by shapeId. The copied shape is magnified, then rotated and reflected about the origin as specified by the transformation’s orientation. Then it is translated by the transformation’s offset. If the shape, cellview, or transformation is invalid, the function gives a fatal error message and returns dbcNullShapeId. Otherwise, it returns the ID of the copied shape.
If destCellViewId is dbcNullCellViewId, the shape is copied in the same cellview. If destCellViewId is not dbcNullCellViewId, the shape is copied into the cellview specified by destCellViewId.
The new shape retains its purpose and properties, and the figure is not associated with any net, pin, or terminal of the original shape.
If shapeId refers to a parent shape with children, all descendant figures are copied according to the information kept in transform. If shapeId refers to a child by itself, the shape is copied without copying the parent. However, if the copy is between cellviews, the child is copied but no longer is a child in the destination cellview. All other features regarding purpose and properties apply to child as well as parent shapes that are copied.
If the shape specified by shapeId is a child and the child’s point list matches the parent’s point list, the copy is not allowed and the function returns dbcNullShapeId. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbGetShapeLP
Boolean
dbGetShapeLP( dbShapeId shapeId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose on which the shape specified by shapeId was created.
dbGetShapeBBox
dbBBox *
dbGetShapeBBox( dbShapeId shapeId );
Returns a pointer to the bounding box of the shape specified by shapeId. This bBox structure is read only and is overwritten by the next call to dbGet*BBox or if the shape is deleted or modified. If you want to keep a permanent copy of the data, you must allocate your own storage and copy the data into it.
dbSetShapeLayer
Boolean
dbSetShapeLayer( dbShapeId shapeId, dbLayer layer );
dbSetShapePurpose
Boolean
dbSetShapePurpose( dbShapeId shapeId, dbPurpose purpose );
Sets the purpose of the shape.
dbSetViaShapePurpose
dbSetViaShapePurpose( dbViaId via, dbPurpose purpose );
Sets the purposes of all shapes in the cdsVia to the specified purpose. The updated parameters include primaryShapePurpose, cutShapePurpose, and otherShapePurpose. To set all purposes to their original values (defined in the cdsViaDevice definition), use this function with dbcUnknownPurpose as the new purpose value.
dbSetShapeLP
Boolean
dbSetShapeLP( dbShapeId shapeId, dbLayer layer, dbPurpose purpose );
Sets the layer and purpose of the shape.
dbHasShape
Boolean
dbHasShape( dbCellViewId cellViewId );
Checks if the cellViewId has any shapes. If it has any shapes, this function returns TRUE. Otherwise, the function returns FALSE.
dbLPHasShape
Boolean
dbLPHasShape( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose );
Returns TRUE if this layer and purpose pair has any shapes. The function returns FALSE if this layer-purpose pair has no shape.
dbGetShapeCellView
dbCellViewId
dbGetShapeCellView( dbShapeId shapeId );
Gets the cellViewId of the shape.
Rectangles
A rectangle in the OpenAccess database is assumed to be aligned with the x and y axes. For storage efficiency, each rectangle is represented by its bounding box.
dbCreateRect
dbRectId
dbCreateRect( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbBBox bBox );
Creates a rectangle in the specified cellview on the specified layer-purpose with the lower left and upper right corners defined by the bBox. It returns the ID of the newly created rectangle. You cannot create shapes on a layer-purpose whose purpose is dbcAllPurpose.
dbSetRectBBox
Boolean
dbSetRectBBox( dbRectId rectId, dbBBox bBox );
Sets the bounding box of the rectangle. If the rectangle is a parent with matching points, then its descendants’ points are set as well. If the rectangle is a child and the child’s point list matches the parent’s point list, you cannot set the bounding box of the rectangle.
dbDeleteRect
Boolean
dbDeleteRect( dbRectId rectId );
Deletes the rectangle specified by rectId. For other effects of deleting shapes, see “dbDeleteShape”.
dbGetRectLP
Boolean
dbGetRectLP( dbRectId rectId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the rectangle by using the second and third arguments, respectively.
dbGetRectBBox
dbBBox *
dbGetRectBBox( dbRectId rectId );
Returns a pointer to the bounding box of the rectangle. This bBox structure is read only and is overwritten by the next call to dbGet*BBox.
dbConvertRectToPolygon
dbPolygonId dbConvertRectToPolygon( dbRectId rectId );
Converts the rectangle to a polygon. The rectId is kept with the converted polygon ID. If the conversion fails, the function returns dbcNullPolygonId. If the rectangle has match points set, the conversion fails. The conversion cannot be done.
Polygons
A polygon in the OpenAccess database is represented by an array of points specifying its vertices. Although self-intersecting polygons can be represented in the database, many of the Cadence tools do not handle them.
dbCreatePolygon
dbPolygonId
dbCreatePolygon( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, unsigned int nPoints, dbPoint pointArray );
Creates a polygon in the specified cellview with the specified layer-purpose. nPoints is the number of vertices in the polygon, and pointArray is an array of points containing that number of vertices. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetPolygonPoint
Boolean
dbSetPolygonPoint( dbPolygonId polygonId, unsigned int nPoints, dbPoint pointArray );
Sets the number of points and point arrays of the polygon. If the polygon is a parent with matching points, its descendants’ points are set as well. If the polygon is a child and the child’s point list matches the parent’s point list, you cannot set the points. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbDeletePolygon
Boolean
dbDeletePolygon( dbPolygonId polygonId );
Deletes the polygon specified by polygonId. For other effects of deleting a shape, see dbDeleteShapevertexes.
dbGetPolygonLP
Boolean
dbGetPolygonLP( dbPolygonId polygonId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose on which the polygon was created.
dbGetPolygon
Boolean
dbGetPolygon( dbPolygonId polygonId, unsigned int pNPoints, dbPoint pPointArray );
Retrieves all vertices in the polygon. pNPoints returns the number of vertices, and pPointArray returns a pointer to an array of points representing all vertices in the polygon. This point array is read only and is overwritten by the next call that returns a point array. If you want to keep a permanent record of the vertices, you must allocate your own storage and make a copy of the point array before you call any other database routine.
dbGetPolygonBBox
dbBBox *
dbGetPolygonBBox( dbPolygonId polygonId );
Retrieves a pointer to the bounding box of the polygon. This bounding box structure is read only and is overwritten by the next call to dbGet*BBox.
dbStartGenPolygonToPoint
dbGenStateId
dbStartGenPolygonToPoint( dbPolygonId polygonId );
Starts the point generator for the polygon specified by polygonId. The function creates the appropriate generator state and returns a pointer to that generator state.
dbGenPolygonToPoint
Boolean
dbGenPolygonToPoint( dbGenStateId stateId, dbPoint pPoint );
Generates each point in the polygon, step by step. stateId must have been created by an earlier call to dbStartGenPolygonPoint.
dbConvertPolygonToRect
dbRectId dbConvertPolygonToRect( dbPolygonId polygonId );
Converts a polygon with four points to a rectangle. If the polygon cannot be converted to a rectangle, dbcNullRectId is returned. If the polygon has match points set, it cannot be converted.
Lines
A line in the OpenAccess database is represented by an array of points specifying its vertices.
dbCreateLine
dbLineId
dbCreateLine( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, unsigned int nPoints, dbPoint pointArray );
Creates a line in the specified cellview with the specified layer and purpose. nPoints is the number of vertices in the line, and pointArray is an array of points containing that number of vertices. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetLinePoint
Boolean
dbSetLinePoint( dbLineId lineId, unsigned int nPoints, dbPoint pointArray );
Sets the number of points and the point array of the line. If the line is a parent with matching points, its descendants’ points are set as well. If the line is a child and the child’s point list is set to match the parent’s point list, you cannot set the line points. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbDeleteLine
Boolean
dbDeleteLine( dbLineId lineId );
Deletes the line specified by lineId. For other effects of deleting a shape, see “dbDeleteShape”.
dbGetLineLP
Boolean
dbGetLineLP( dbLineId lineId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the specified line.
dbGetLine
Boolean
dbGetLine( dbLineId lineId, unsigned int pNPoints, dbPoint pPointArray );
Retrieves the vertices in the line. pNPoints returns the number of vertices, and pPointArray returns a pointer to an array of points representing all the vertices in the line. This point array is read only and is overwritten by the next call that returns a point array. If you want to keep a permanent record of the vertices, you must allocate your own storage and make a copy of the point array before you call any other database routine.
dbGetLineBBox
dbBBox *
dbGetLineBBox( dbLineId lineId );
Retrieves a pointer to the bounding box of the line. This bounding box structure is read only and is overwritten by the next call to dbGet*BBox.
dbStartGenLineToPoint
dbGenStateId
dbStartGenLineToPoint( dbLineId lineId)
Starts the point generator for the line specified by lineId. The function creates the appropriate generator state and returns a pointer to that generator state.
dbGenLineToPoint
Boolean
dbGenLineToPoint( dbGenStateId stateId, dbPoint pPoint );
Generates each point in the line, step by step. You must create stateId by an earlier call to dbStartGenLineToPoint.
Paths
A path in the OpenAccess database is represented by an array of points specifying its vertices. However, unlike lines, paths have widths and can be displayed in a number of different styles. The following table lists all display styles currently supported.
The enumerated constants are grouped in the enumerated type dbPathStyle. The EDIF terminology (of specifying path styles in terms of their end and corner types, each of which can be extend, truncate, or round) is being used. Among the 16 possible combinations, four of the more useful ones are supported. Because these four styles are also known by other names, the original name is listed in parentheses.
| End type | Enumerated constants corner type in type dbPathStyle |
|---|---|
dbCreatePath
dbPathId
dbCreatePath( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, unsigned int nPoints, dbPoint pointArray, dbDistance width, dbPathStyle style );
Creates a path in the specified cellview with the specified layer-purpose pair. nPoints is the number of vertices in the path. pointArray is an array of points containing that number of vertices. If the number of vertices specified in nPoints is two, and the pointArray contains the same vertices, the function returns NULL. Width is the width of the path and must be an even number. Otherwise, CDBA rounds it up to the next even number. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetPathPoint
Boolean
dbSetPathPoint( dbPathId pathId, unsigned int nPoints, dbPoint pointArray );
Sets the number of points and the point arrays of the path. If the number of vertices specified in nPoints is two, and the pointArray contains the same vertices, the function returns FALSE. If the path is a parent with matching points, its descendants have their points set as well. If the path is a child and the child’s point list matches the parent’s point list, the set is not allowed. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbSetPathExt
Boolean
dbSetPathExt( dbPathId pathId, int pathBeginExt, int pathEndExt );
Sets the extensions of the path whose path style is dbcVarExtendExtend. If the path style is not dbcVarExtendExtend, the function fails and returns FALSE.
dbSetPathStyle
Boolean
dbSetPathStyle( dbPathId pathId, dbPathStyle pathStyle );
Sets the style of the path. If the function fails, it returns FALSE.
dbSetPathWidth
Boolean
dbSetPathWidth( dbPathId pathId, dbDistance width );
dbDeletePath
Boolean
dbDeletePath( dbPathId pathId );
Deletes the path specified by pathId. For other effects of deleting a path shape, see “dbDeleteShape”.
dbGetPathLP
Boolean
dbGetPathLP( dbPathId pathId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the specified path.
dbGetPath
Boolean
dbGetPath( dbPathId pathId, unsigned int pNPoints, dbPoint pPointArray, dbDistance pWidth, dbPathStyle pStyle );
Retrieves the vertices in the path. pNPoints returns the number of vertices, and pPointArray returns a pointer to an array of points representing all the vertices in the path. This point array is read only and is overwritten if dbGetPath is called again or if the path is deleted or modified. If you want to keep a permanent record of the vertices, you must allocate your own storage and make a copy of the point array before you call any other database routine. The width and style of the path are returned using pWidth and pStyle, respectively.
dbGetPathBBox
dbBBox *
dbGetPathBBox( dbPathId pathId );
Retrieves a pointer to the bounding box of the path. This bBox structure is read only and is overwritten by the next call to dbGet*BBox.
dbGetPathExt
Boolean
dbGetPathExt( dbPathId pathId, int pPathBeginExt, int pPathEndExt );
Returns the extensions of the path. If the path style is not dbcVarExtendExtend, then both PathBeginExt and PathEndExt are returned as 0.
dbGetPathWidth
dbDistance
dbGetPathWidth( dbPathId pathId );
Returns the width of the path.
dbGetPathStyle
dbPathStyle
dbGetPathStyle( dbPathId pathId );
Returns the style of the path.
dbStartGenPathToPoint
dbGenStateId
dbStartGenPathToPoint( dbPathId pathId );
Starts the point generator for the path specified by pathId. It creates the appropriate generator state and returns a pointer to it.
dbGenPathToPoint
Boolean
dbGenPathToPoint( dbGenStateId stateId, dbPoint pPoint );
Generates each point in the path, step by step. stateId must have been created by an earlier call to dbStartGenPathToPoint.
dbConvertPathToPolygon
dbPolygonId dbConvertPathToPolygon( dbPathId pathId );
Converts the path to a polygon. The pathId is kept with the converted polygon ID. If the conversion fails, the function returns dbcNullPolygonId. If the path has match points set, you cannot convert the path.
dbConvertLineToPath
dbPathId dbConvertLineToPath( dbLineId lineId, dbDistance width, dbPathStyle style );
Converts a line to a path. The lineId is kept with the converted path ID. If the conversion fails, the function returns dbcNullPathId.
Labels
Labels are character strings with the following attributes:
Drafting
Specifies as Boolean whether or not the label stays backward or upside-down. If the drafting argument is set to TRUE, the backward or upside-down label is displayed in a readable form. If the drafting argument is set to FALSE, the backward or upside-down label stays the way it is.
dbCreateLabel
dbLabelId
dbCreateLabel( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbPoint origin, String labelString, dbLabelJustify justification, dbOrient rotation, dbFontStyle fontStyle, dbDistance fontHeight );
Creates the label with the specified attributes. When the label is created, three attributes—labelType, overbar, and drafting—each default to dbcNormalLabel, FALSE, and TRUE, respectively. If you want to change these defaults, use the set functions. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetLabelType
Boolean
dbSetLabelType( dbLabelId labelId, dbLabelType labelType );
Sets the labelType of the label.
dbSetLabelFontStyle
Boolean
dbSetLabelFontStyle( dbLabelId labelId, dbFontStyle fontStyle );
Sets the fontStyle of the label.
dbSetLabelOverbar
Boolean
dbSetLabelOverbar( dbLabelId labelId, Boolean overbar );
Sets the overbar of the label.
dbSetLabelDrafting
Boolean
dbSetLabelDrafting( dbLabelId labelId, Boolean drafting );
Sets the drafting of the label.
dbSetLabelOrigin
Boolean
dbSetLabelOrigin( dbLabelId labelId, dbPoint origin );
dbSetLabelTheLabel
Boolean
dbSetLabelTheLabel( dbLabelId labelId, String labelString );
Sets the labelString of the label.
dbSetLabelJustify
Boolean
dbSetLabelJustify( dbLabelId labelId, dbLabelJustify justification );
Sets the justification of the label.
dbSetLabelOrient
Boolean
dbSetLabelOrient( dbLabelId labelId, dbOrient rotation );
Sets the rotation of the label.
dbSetLabelHeight
Boolean
dbSetLabelHeight( dbLabelId labelId, dbDistance fontHeight );
Sets the fontHeight of the label.
dbDeleteLabel
Boolean
dbDeleteLabel( dbLabelId labelId );
Deletes the specified label. For other effects of deleting a label (shape), see “dbDeleteShape”.
dbGetLabel
Boolean
dbGetLabel( dbLabelId labelId, String pLabelString, dbLabelJustify pJustification, dbOrient pRotation, dbFontStyle pFontStyle, dbDistance pFontHeight );
Retrieves the attributes from the specified label.
dbGetLabelOrigin
dbPoint
dbGetLabelOrigin( dbLabelId labelId );
Returns the x and y coordinates of the origin of the label in a dbPoint structure.
dbGetLabelLP
Boolean
dbGetLabelLP( dbLabelId labelId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and the purpose of the label.
dbGetLabelBBox
dbBBox dbGetLabelBBox( dbLabelId labelId );
Returns a pointer to the bounding box of the label. This bBox structure is read only and is overwritten by the next call to dbGet*BBox.
dbGetLabelType
dbLabelType
dbGetLabelType( dbLabelId labelId );
dbGetLabelOverbar
Boolean
dbGetLabelOverbar( dbLabelId labelId );
Returns TRUE if the label has overbar turned on. The function returns FALSE if the label has overbar turned off.
dbGetLabelDrafting
Boolean
dbGetLabelDrafting( dbLabelId labelId );
Returns TRUE if the label has drafting turned on. The function returns FALSE if the label has drafting turned off.
Font Height
The font height is the height of the font to be used as an unsigned integer.
Font Style
Font style is the style of font to use for the label. Some of the more exotic font styles listed in the following table might not be available on all systems. The different styles are grouped in the enumerated type dbFontStyle.
| Name | Enumerated constants in type dbFontStyle |
|---|---|
Justify
Justify refers to the origin of the label relative to the text before orientation. The following table shows the nine possible justifications, which are grouped in the enumerated type dbLabelJustify.
| Enumerated constants for type dbLabelJustify | |||
|---|---|---|---|
| Left | Center | Right | |
Label Type
Label type controls whether or not and how a label must be evaluated. The following table shows the three possible types.
| Label type | Enumerated constants in type dbLabelType |
|---|---|
Origin
The origin is the point where the label is placed.
Overbar
Specifies as Boolean whether the label has the under bar character ( _ ) that needs be converted to an overbar. If the overbar argument is set to TRUE, the function converts the under bar character ( _ ) to an over bar when it is encountered. If the over bar argument is set to FALSE, then the under bar character ( _ ) remains.
Rotation
Rotation refers to how the label must be rotated when it is displayed. The following table shows the eight possible rotations.
| Label orientation | Enumerated constants in type dbOrient |
|---|---|
Ellipses
An ellipse in the OpenAccess database is defined by its bounding box. A circle is a special case of an ellipse where the bounding box is a square. Because rectangles are also defined by their bounding boxes, the functions for manipulating ellipses look like the functions for manipulating rectangles.
dbCreateEllipse
dbEllipseId
dbCreateEllipse( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbBBox bBox );
Creates an ellipse in the specified cellview on the specified layer-purpose pair. The lower left and the upper right corners define the bounding box specified by bBox. It returns the ID of the newly created ellipse. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetEllipseBBox
Boolean
dbSetEllipseBBox( dbEllipseId ellipseId, dbBBox bBox );
Sets the bounding box of the ellipse.
dbDeleteEllipse
Boolean
dbDeleteEllipse( dbEllipseId ellipseId );
Deletes the ellipse specified by ellipseId. For other effects of deleting shapes, see dbDeleteShape.
dbGetEllipseLP
Boolean
dbGetEllipseLP( dbEllipseId ellipseId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the ellipse by using the second and third arguments, respectively.
dbGetEllipseBBox
dbBBox *
dbGetEllipseBBox( dbEllipseId ellipseId );
Returns a pointer to the bounding box of the ellipse. This bounding box structure is read only and is overwritten by the next call to dbGet*BBox.
dbConvertEllipseToPolygon
dbPolygonId
dbConvertEllipseToPolygon( dbEllipseId ellipseId int *pNSides );
Converts the ellipse to a polygon with the number of sides specified by pNSides. If the conversion fails, the function returns dbcNullPolygonId. Otherwise, the function returns the converted polygon ID. You must initialize pNSides to specify the number of points of the sides expected. However, this function might convert the ellipse to the polygon with a different number of points, so the value is passed back through pNSides.
Arcs
Conceptually, an arc in the OpenAccess database can be considered an ellipse augmented by two angles: the angle at which the arc begins and the angle at which the arc ends. Arcs with a sweep angle larger than pi radians (180 degrees) are not currently supported. This means only arcs up to the size of half an ellipse can be represented in the database.
dbCreateArc
dbArcId
dbCreateArc( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbBBoxellipseBBox, dbAngle startAngle, dbAngle stopAngle );
Creates an arc specified by the ellipse ellipseBBox, the starting angle startAngle, and the stopping angle stopAngle. Both angles must be specified in radians. The sweep of the arc begins at startAngle and proceeds counterclockwise ending at stopAngle. The sweep angle must be no more than pi radians (180 degrees). You cannot create shapes on a layer-purpose pair whose purpose is dbcAllPurpose.
dbSetArc
Boolean
dbSetArc( dbArcId arcId, dbBBox ellipseBBox, dbAngle startAngle, dbAngle stopAngle );
Sets the ellipseBBox and angles of the arc.
dbCreateArcByThreePoints
dbArcId
dbCreateArcByThreePoints( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbPoint point1, dbPoint point2, dbPoint point3 );
Provides an alternative way to create an arc by specifying three points through which the arc must pass. The three points must uniquely specify a well-defined arc. Otherwise, dbCreateArcByThreePoints returns an error.
dbSetArcPoint
Boolean
dbSetArcPoint( dbArcId arcId, dbPoint point1, dbPoint point2, dbPoint point3 );
Sets the three points of the arc.
dbDeleteArc
Boolean
dbDeleteArc( dbArcId arcId );
Deletes the arc specified by arcId. For other effects of deleting an arc (shape), see “dbDeleteShape”.
dbGetArcLP
Boolean
dbGetArcLP( dbArcId arcId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the arc, using the second and third arguments, respectively.
dbGetArc
Boolean
dbGetArc( dbArcId arcId, dbBBox ppEllipseBBox, dbAngle pStartAngle, dbAngle pStopAngle );
Retrieves the three components of the arc specified by arcId: the bounding box of the ellipse, the starting angle, and the stopping angle. The function returns them using the second, third, and fourth arguments, respectively. Notice that the function returns a pointer to the bounding box. The bounding box structure specified by this pointer is read only and is overwritten by the next call to dbGetArc.
Because arcs are stored in integer database units in the database, rounding errors do occur when you specify the three components. Arcs are mapped from or to the internal data structures. Therefore, dbGetArc might not be same as the angles you specified in the dbCreateArc call when you created the arc.
dbGetArcBBox
dbBBox *
dbGetArcBBox( dbArcId arcId );
Retrieves the real bounding box of the arc, the smallest rectangle that completely encloses the arc. The function returns a pointer to the bounding box. This bounding box is read only and is overwritten by the next call to dbGet*BBox.
dbGetArcBothBBox
Boolean
dbGetArcBothBBox( dbArcId arcId, dbBBox ppEllipseBBox, dbBBox ppRealBBox );
Retrieves the arc as two bounding boxes. Because the sweep angle of an arc must be less than pi radians (180 degrees), the arc can be represented by two bounding boxes: the bounding box defining the ellipse and the bounding box defining the arc within that ellipse. Both bounding boxes are read only and are overwritten by the next call to dbGetArcBothBBox.
dbConvertArcToLine
dbLineId
dbConvertArcToLine( dbArcId arcId, unsigned int pNSides );
Converts the arc to a line with the number of segments specified by pNSides. If the conversion fails, the function returns dbcNullLineId. Otherwise, the function returns the converted line ID. You initialize pNSides to specify the number of points expected. However, this function might convert the arc to a line with a different number of points, so the value is passed back through pNSides.
Donuts
A Donut in the OpenAccess database is defined by two concentric circles.
dbCreateDonut
dbDonutId
dbCreateDonut( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbPoint center, dbDistance outerRadius, dbDistance holeRadius );
Creates a donut in the specified cellview on the specified layer-purpose. The outer circle, with radius outerRadius, and the inner circle (the circle demarcating the hole), with radius holeRadius, are both centered at center. It returns the ID of the newly created donut. If the creation fails, dbcNullDonutId is returned. You cannot create shapes on a layer whose purpose is dbcAllPurpose.
dbSetDonutCenter
Boolean
dbSetDonutCenter( dbDonutId donutId, dbPoint center );
dbSetDonutRadius
Boolean
dbSetDonutRadius( dbDonutId donutId, dbDistance outerRadius, dbDistance holeRadius );
dbDeleteDonut
Boolean
dbDeleteDonut( dbDonutId donutId );
Deletes the donut specified by donutId. If the deletion fails, the function returns FALSE. For other effects of deleting a donut shape, see “dbDeleteShape”.
dbGetDonutLP
Boolean
dbGetDonutLP( dbDonutId donutId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the donut. If the retrieval fails, the function returns FALSE.
dbGetDonutBBox
dbBBox *
dbGetDonutBBox( dbDonutId donutId );
Retrieves the bounding box of the donut. The bounding box is read only and is overwritten by the next call to dbGet*BBox.
dbGetDonutBothBBox
Boolean
dbGetDonutBothBBox( dbDonutId donutId, dbBBox ppOuterBBox, dbBBox ppHoleBBox );
Retrieves the bounding boxes of the donut. These bounding box structures are read only and are overwritten by the next call to dbGetDonutBothBBox.
dbConvertDonutToPolygon
dbPolygonId
dbConvertDonutToPolygon( dbDonutId donutId, unsigned int pNSides );
Converts the donut to a polygon with the number of sides specified by pNSides. If the conversion fails, the function returns dbcNullPolygonId. Otherwise, the function returns the converted polygon ID. You initialize pNSides to specify the number of points expected. However, this function might convert the donut to a polygon with a different number of points. The value is passed back through pNSides.
Dots
A Dot in the OpenAccess database is defined by a single point.
dbCreateDot
dbDotId
dbCreateDot( dbCellViewId cellViewId, dbLayer layer, dbPurpose purpose, dbPoint xy );
Creates a dot in the specified cellview on the specified layer-purpose. The function returns the ID of the newly created dot. If the creation fails, the function returns dbcNullDotId. You cannot create shapes on a layer-purpose pair whose purpose is dbcAllPurpose.
dbSetDot
Boolean
dbSetDot( dbDotId dotId, dbPoint xy );
dbSetDotSize
Boolean
dbSetDotSize( dbDotId dotId, dbDistance width, dbDistance height );
Sets the x direction (width) and y direction (height) of the dot.
dbDeleteDot
Boolean
dbDeleteDot( dbDotId dotId );
Deletes the dot specified by dotId. If the deletion fails, the function returns FALSE. For other effects of deleting shapes, see “dbDeleteShape”.
dbGetDotLP
Boolean
dbGetDotLP( dbDotId dotId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of the dot. If the retrieval fails, the function returns FALSE.
dbGetDot
dbPoint
dbGetDot( dbDotId dotId );
Shape Route Status
The following functions get and set the route status of the shape.
dbGetShapeRouteStatus
Boolean
dbGetShapeRouteStatus( dbShapeId shapeId, dbRouteStatus* routeStatus );
Description
Returns the routeStatus of the specified shape via the routeStatus parameter.
Arguments
|
The routeStatus can be normalRouteStatus, fixedRouteStatus, or lockedRouteStatus. |
Return Values
|
Returns TRUE if the shapeRouteStatus was successfully retrieved. Returns FALSE otherwise. |
dbSetShapeRouteStatus
Boolean
dbSetShapeRouteStatus( dbShapeId shapeId, dbRouteStatus routeStatus );
Description
Sets the routeStatus for the specified shape.
Arguments
|
The current route status can be |
Return Values
|
Returns TRUE if the shapeRouteStatus for the specified shape is successfully set. Returns FALSE otherwise. |
Text Display Objects
A text display object lets you make changes in the display characteristics of master labels on an instance-by-instance basis. All master labels are displayed in the instances of that master.
Every instance label (which has changed any, some, or all of the display characteristics from the master label), creates a text display object. This object has information about the display characteristics for that label on that instance. The changed display information is kept in this object. Other characteristics are inherited from the master label. The master label is called the associate and the instance label is called the owner.
The fields outlining the display characteristics in the text display object are the same as in the label: origin, justification, rotation, font style, font height, overbar, and drafting. In addition, the text display object has three more fields: owner, associate, and displayFlags. The displayFlags function (of type dbDisplayFlags) indicates which display characteristics in the text display object override the characteristics from the master label.
Text Display Types
The following table shows the enumerated constants of type dbTextDisplayAssocType used for the associate (master label) of text display objects. The type of the text display object indicates the associate type of a text display object.
| Associate types | Enumerated constants in type dbTextDisplayAssocType |
|---|---|
The Text Display Function
The only function (as opposed to macro) affecting the display of text is dbTextDisplayId.
dbTextDisplayId
dbTextDisplayId
dbCreateTextDisplay( dbTextDisplayRec txtDisplayRecord, dbDisplayFlags displayFlags );
Creates a text display object with the specified attributes. txtDisplayRecord is a text display record containing the initial values for the display characteristics being changed. txtDisplayRecord also has fields for the owner and the associate. The full description of the record structure is described in “Text Display Objects”.
The displayFlags parameter indicates display characteristics inherited from the master and passed as parameters.
Macros to set and reset the various display characteristics on an object of type dbDisplayFlags are described later in this chapter. All overriding display characteristics (as indicated by displayFlags) must have valid values. If any of the fields in the record have invalid values, the default from the associate is used. If any values need to be changed later, you can use the set functions.
The associate field in the record refers to the label whose display characteristics are being modified. The owner field refers to the instance on which the label’s display is being modified. The bBox, justify, fontStyle, height, orient, overbar, drafting, and origin fields are the display characteristics you can modify. The text field is copied from the associate and cannot be modified. The text display object is created on the same layer with the same purpose as the associate.
Macros for Display Flags
The following macros manipulate displayFlags and the dbDisplayFlags type.
dbmSetDisplayFlagsAll
dbmSetDisplayFlagsAll( displayFlags );
Sets all flags in displayFlags. This macro indicates that all display characteristics are retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsAll
dbmUnsetDisplayFlagsAll( displayFlags );
Resets all flags in displayFlags. This macro indicates that all display characteristics are retrieved from the associate.
dbmSetDisplayFlagsOverbar
dbmSetDisplayFlagsOverbar( displayFlags );
Sets the overbar flag in displayFlags. This macro indicates that the overbar value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsOverbar
dbmUnsetDisplayFlagsOverbar( displayFlags );
Resets the overbar flag in displayFlags. This macro indicates that the overbar value is retrieved from the associate.
dbmSetDisplayFlagsDrafting
dbmSetDisplayFlagsDrafting( displayFlags );
Sets the drafting flag in displayFlags. This macro indicates that the drafting value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsDrafting
dbmUnsetDisplayFlagsDrafting( displayFlags );
Resets the drafting flag in displayFlags. This macro indicates that the drafting value is retrieved from the associate.
dbmSetDisplayFlagsFontStyle
dbmSetDisplayFlagsFontStyle( displayFlags );
Sets the font style flag in displayFlags. This macro indicates that the font style value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsFontStyle
dbmUnsetDisplayFlagsFontStyle( displayFlags );
Resets the font style flag in displayFlags. This macro indicates that the font style value is retrieved from the associate.
dbmSetDisplayFlagsHeight
dbmSetDisplayFlagsHeight( displayFlags );
Sets the font height flag in displayFlags. This macro indicates that the font height value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsHeight
dbmUnsetDisplayFlagsHeight( displayFlags );
Resets the font height flag in displayFlags. This macro indicates that the font height value is retrieved from the associate.
dbmSetDisplayFlagsJustify
dbmSetDisplayFlagsJustify( displayFlags );
Sets the justification flag in displayFlags. This macro indicates that the justification value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsJustify
dbmUnsetDisplayFlagsJustify( displayFlags );
Resets the justification flag in displayFlags. This macro indicates that the justification value is retrieved from the associate.
dbmSetDisplayFlagsOrient
dbmSetDisplayFlagsOrient( displayFlags );
Sets the orientation flag in displayFlags. This macro indicates that the orientation value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsOrient
dbmUnsetDisplayFlagsOrient( displayFlags );
Resets the orientation flag in displayFlags. This macro indicates that the orientation value is retrieved from the associate.
dbmSetDisplayFlagsOrigin
dbmSetDisplayFlagsOrigin( displayFlags );
Sets the origin flag in displayFlags. This macro indicates that the origin value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsOrigin
dbmUnsetDisplayFlagsOrigin( displayFlags );
Resets the origin flag in displayFlags. This macro indicates that the origin value is retrieved from the associate.
dbmSetDisplayFlagsVisible
dbmSetDisplayFlagsVisible( displayFlags );
Sets the visible flag in displayFlags. This macro indicates that the visible value is retrieved from the text display object as opposed to the associate.
dbmUnsetDisplayFlagsVisible
dbmUnsetDisplayFlagsVisible( displayFlags );
Resets the visible flag in displayFlags. This macro indicates that the visible value is retrieved from the associate.
Structure and Functions for Text Display Records
A text display record contains attributes of a text display. A text member of the text display points to a permanent string that must not be modified.
The following structure represents a text display record:
typedef struct dbTextDisplayRec dbTextDisplayRec;
struct dbTextDisplayRec {
dbType type;
dbTextDisplayId textDisplay;
unsigned int size;
dbCellViewId cellView;
dbNetId net;
dbPinId pin;
dbBBox bBox;
dbPurpose purpose;
dbLayer layer;
dbLabelJustify justify;
dbFontStyle fontStyle;
dbOrient orient;
dbTextDisplayAssocType tdType;
Boolean overbar;
Boolean drafting;
Boolean visible;
Boolean isNameVisible;
Boolean isValueVisible;
dbPoint origin;
dbDistance height;
String text;
dbId associate;
dbId owner;
dbDisplayFlags dFlags;
};
The following functions manipulate the attributes in the text display record shown.
dbSetTextDisplayOverbar
Boolean
dbSetTextDisplayOverbar( dbTextDisplayId textDisplayId, Boolean overbar );
Sets the overbar of the text display object indicated by textDisplayId to overbar. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayFontStyle
Boolean
dbSetTextDisplayFontStyle( dbTextDisplayId textDisplayId, dbFontStyle fontStyle );
Sets the font style of the text display object indicated by textDisplayId to the value fontStyle. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayDrafting
Boolean
dbSetTextDisplayDrafting( dbTextDisplayId textDisplayId, Boolean drafting );
Sets the drafting of the text display object indicated by textDisplayId to the value drafting. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayOrigin
Boolean
dbSetTextDisplayOrigin( dbTextDisplayId textDisplayId, dbPoint origin );
Sets the origin of the text display object indicated by textDisplayId to the value origin. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayJustify
Boolean
dbSetTextDisplayJustify( dbTextDisplayId textDisplayId, dbLabelJustify justification );
Sets the justification of the text display object indicated by textDisplayId to the value justification. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayOrient
Boolean
dbSetTextDisplayOrient( dbTextDisplayId textDisplayId, dbOrient rotation );
Sets the orientation of the text display object indicated by textDisplayId to the value orient. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbSetTextDisplayHeight
Boolean
dbSetTextDisplayHeight( dbTextDisplayId textDisplayId, dbDistance fontHeight );
Sets the height of the text display object indicated by textDisplayId to the value height. The function returns TRUE if successful. Otherwise, the function returns FALSE.
dbDeleteTextDisplay
Boolean
dbDeleteTextDisplay( dbTextDisplayId textDisplayId );
Deletes the text display object indicated by textDisplayId. Displays the text with the default display characteristics. For other effects of deleting shapes, see “dbDeleteShape”.
dbGetTextDisplay
Boolean
dbGetTextDisplay( dbTextDisplayId textDisplayId, String pText, dbLabelJustify pJustification, dbOrient pRotation, dbFontStyle pFontStyle, dbDistance pFontHeight, Boolean pOverbar, Boolean pDrafting );
Retrieves the attributes from the text display object indicated by textDisplayId.
dbGetTextDisplayOrigin
dbPoint
dbGetTextDisplayOrigin( dbTextDisplayId textDisplayId );
Returns the x and y coordinates of the origin of the textDisplay in a dbPoint structure.
dbGetTextDisplayLP
Boolean
dbGetTextDisplayLP( dbTextDisplayId textDisplayId, dbLayer pLayer, dbPurpose pPurpose );
Retrieves the layer and purpose of textDisplay.
dbGetTextDisplayBBox
dbBBox dbGetTextDisplayBBox( dbTextDisplayId textDisplayId );
Returns a pointer to the bounding box of the textDisplay. This bBox structure is read only and is overwritten by the next call to dbGet*BBox. Returns NULL if there is an error.
dbGetTextDisplayAssociate
dbId
dbGetTextDisplayAssociate( dbTextDisplayId textDisplayId );
Returns the dbId of the associate of the text display object. For now, the associate of the text display object can only be a label. Returns dbcNullId if there is an error.
dbGetTextDisplayOwner
dbId
dbGetTextDisplayOwner( dbTextDisplayId textDisplayId );
Returns the dbId of the owner of the text display object (for now, the owner can only be an instance). Returns dbcNullId if there is an error.
dbAssociateHasTextDisplay
Boolean
dbAssociateHasTextDisplay( dbId associateId );
Returns TRUE if there are any text display objects referring to the database object indicated by associateId. The associate can only be a label.
dbObjectHasTextDisplay
Boolean
dbObjectHasTextDisplay( dbId ownerId );
Returns TRUE if the object indicated by objectId owns any text display objects. Otherwise, returns FALSE. The objectId can only refer to an instance.
dbGetAssociateTextDisplay
dbTextDisplayId
dbGetAssociateTextDisplay( dbId associateId, dbId ownerId );
Given an associate and an owner, this macro checks if a text display object exists for the owner referring to the associate. Returns a textDisplayId if the text display object exists or a dbcNullTextDisplayId if it does not exist.
dbStartGenTextDisplay
dbGenStateId
dbStartGenTextDisplay( dbId owner );
dbGenTextDisplay
Boolean
dbGenTextDisplay( dbGenStateId stateId, dbTextDisplayId &textDisplayId );
These functions generate all text displays of the object indicated by owner.
dbSetTextDisplayVisible
Boolean
dbSetTextDisplayVisible( dbTextDisplayId textDisplayId, Boolean visible );
Sets the text display visible or invisible by using the value of visible argument.
dbSetTextDisplayNameVisible
Boolean
dbSetTextDisplayNameVisible( dbTextDisplayId textDisplayId, Boolean visible );
Sets the text display name visible or invisible by using the value of visible argument.
dbSetTextDisplayValueVisible
Boolean
dbSetTextDisplayValueVisible( dbTextDisplayId textDisplayId, Boolean visible );
Sets the text display value visible or invisible by using the value of visible argument.
Instance and Hierarchy Functions
This section describes instances and the hierarchy, and the functions used for both. See the following sections for more specific information:
Instances
A cellview can contain an instance, and an instance of a cellview can also contain its own cellview. The cellview referred to by an instance (the cellview containing the instance) is called the master cellview of the instance. Many instances can refer to (that is, be contained by) the same master cellview. The master cellview can in turn contain instances that refer to other masters to form multiple levels of hierarchy.
Each instance must be placed where the origin of the master cellview is aligned when instantiated, in one of eight possible orientations. Each instance has a name that must be unique among all instances contained in the cellview.
There are two types of instances: regular instances (inst) and mosaic instances (mosaicInst). These two object types form the object class called any instance (anyInst).
Iterated Instances
An iterated instance is a vector of single instances (instances with the numInst attribute equal to one) represented compactly by one database object. The iterated instance refers to its master multiple times (the number of times specified by numInst) inside the cellview containing it. The iterated instance has a numInst attribute of greater than one.
Instance Name Syntax
The instance name syntax below is in BNF (Backus-Naur Format) notation. Items enclosed in brackets ([ ]) specify the item is optional where zero items or one item might be present. Items enclosed in curly braces ({}) are also optional, except zero or more items can be present. The word number indicates a nonnegative integer less than 65536.
instName ::= baseName [ < number [ : number ] > ]
An instance name (instName) is a base name that is optionally followed by a simple vector term. The restrictions on the base name and number are the same as the ones for the net and terminal name syntax with some minor restrictions.
The simple vector term can consist of a single number or imply a range of numbers. The range can be expressed by a starting and ending number separated by colons. The vector term has the same expanded form as the net and terminal names except that for instance names, increment, repeat operators and parenthetic grouping are not allowed.
The instance name must be unique at both the full instance and member name levels. A single instance with a name that implies sharing a member between full instances is not allowed.
Instance Headers
To operate efficiently and keep good records, the database automatically creates and manages a database object type called instance header (instHeader). This header serves as a symbolic link between instances and their masters.
Within a cellview, all instances with the same master are linked together under a single instance header for fast traversal. Each instance header, therefore, corresponds to a unique master instantiated in the cellview. Objects belonging to instHeader type cannot have properties attached to them.
The timeStamp field in the instance header is updated when any instance linked under an instance header is created, deleted, modified, moved, or copied.
Binding of Instances and Instance Headers
The master of an instance might or might not reside in virtual memory. If the master of an instance is in virtual memory and is linked to an instance header, the instance header (and the instances it represents) is bound. Otherwise, the instance header is unbound.
When an instance header is bound, the master cellview is linked to the instance header through an “inter-cellview” reference. When an instance header is unbound, only the name of the master is available from the instance header.
When an instance header is bound to a master, the connections belonging to each instance (represented by the instance header) are also bound to their corresponding terminals on the master.
When a connection in an instance is bound, the instance is also linked to its corresponding terminal using an inter-cellview reference pointer. If a connection cannot be bound (for example, the corresponding terminal does not exist on the master), then only the name of the terminal is available from the unbound connection. Refer to “CDBA Connectivity Functions” for information about connections.
When combined with instance headers, binding adds a level of memory management between instances and their masters. With these concepts, it is possible for CDBA to read master cellviews into virtual memory only on demand. In this way, not all the masters referred to by a cellview need to be in virtual memory at once. They are only read in as needed. Each time a master needs to be bound, dbOpen is called to open the master cellview.
Automatic Actions on Instance Headers and Cellviews
When the first instance of a master is created within a cellview, CDBA automatically creates a new instance header corresponding to the new master in the cellview. When the last instance of a master within a cellview is deleted, the instance header corresponding to that master is automatically deleted from the cellview.
If a master cellview is purged from virtual memory by a call to dbPurge, all references to it are invalidated immediately. The dbPurge function handles this automatically by going through all cellviews that refer to the master and unbinding all corresponding instance headers.
Instance Creation and Modification
The following functions create instances or modify instances.
dbCreateInst
dbInstId
dbCreateInst( dbCellViewId cellViewId, dbCellViewId masterId, String instName, dbPoint origin, dbOrient orient, unsigned int numInst );
Creates an instance of the master specified by masterId. The instance is placed at the specified origin with the specified orientation.
The instName parameter specifies the name of the instance, which must be unique within the cellview.
The numInst parameter specifies the number of instances represented by this database object. numInst must have a value of one unless you want to create an iterated instance.
The number of instances implied by instName takes precedence over the number specified by numInst. If instName is NULL, then CDBA names the instance by appending a number to the string valued property instNamePrefix, found on the master. If the property does not exist or is not string valued, it uses the default prefix of “I.”
The number is updated each time an automatically named instance is created in the cellview.
The following table lists the eight orientations allowed in the enumerated type dbOrient. The orientations are a combination of rotation and mirroring about the x or y axis. Mirroring, if any, is done before the instance is rotated by the specified number of degrees.
| Mirroring and rotation | Enumerated constant in type dbOrient |
|---|---|
dbCreateInstByMasterName
dbInstId
dbCreateInstByMasterName( dbCellViewId cvId, const char *libName, const char *cellName, const char *viewName, const char *instName, dbPoint org, dbOrient ornt, unsigned int nInst );
Creates an instance (of cellview libName, cellName, viewName) in the specified the cellview.
dbCreateBlockInst
dbInstId
dbCreateBlockInst( dbCellViewId cellViewId, dbCellViewId masterId, const char *instanceName, dbPoint origin, dbOrient orientation, unsigned int numInst, Boolean physOnly );
Creates an instance and specifies its visibility in the module (logical) domain.
The EMH status of the instance is specified through physOnly. TRUE creates an instance that is physical only. False creates an instance that is both logical and physical.
dbCreateBlockInstByMasterName
dbInstId
dbCreateBlockInstByMasterName( dbCellViewId cvId, const char *libName, const char *cellName, const char *viewName, const char *instName, dbPoint org, dbOrient ornt, unsigned int nInst, Boolean physOnly );
Creates an instance (of cellview libName, cellName, viewName) and specifies its visibility in the module (logical) domain.
The EMH status of the instance is specified through physOnly. TRUE creates an instance that is physical only. False creates an instance that is both logical and physical.
dbCreateInstWithPurpose
dbInstId
dbCreateInstWithPurpose( dbCellViewId cellViewId, dbCellViewId masterId, String instName, dbPoint origin, dbOrient orient, unsigned short numInst, dbPurpose purpose );
Creates an instance like dbCreateInst except the instance’s purpose is defined using purpose instead of being set to dbcCellPurpose.
dbCreateParamInst
dbInstId
dbCreateParamInst( dbCellViewId cellViewId, dbCellViewId masterId, String instName, dbPoint origin, dbOrient orient, unsigned short numInst, unsigned int nParams, dbParamRec paramArray );
Creates a parameterized cell instance using the specified parameters. The arguments of this function are identical to the ones used in dbCreateInst except for the last two: nParams and paramArray.
The nParams parameter specifies how many parameters are listed in the parameter array paramArray. Each element of the parameter array is a record containing the parameter name, type, and value. Creating parameterized cell instances using this function is more efficient than calling the dbCreateInst, dbReplaceProp combination.
The following is the description of the parameter argument dbParamRec:
struct dbParamRec {
String propName;
dbPropType propType;
dbPropValue propValue;
};
dbSetInstPlacementStatus
Boolean
dbSetInstPlacementStatus( dbInstId instId, dbPlacementStatus placementStatus );
For placement and routing, you can add the optional placement status attribute to an instance. The following table lists the five status types allowed in the enumerated type dbPlacementStatus. The default value of this optional attribute (that is, the value set by dbCreateInst) is dbcFirm.
| Placement status of instance | Enumerated constants in type dbPlacementStatus |
|---|---|
dbSetInstName
Boolean
dbSetInstName( dbInstId instId, String instName );
Sets the name of the specified instance to instName. The name of each instance must be unique within the cellview containing the instance. The name must also agree with the number of iterations on the instance.
dbSetInstOrigin
Boolean
dbSetInstOrigin( dbInstId instId, dbPoint newOrigin );
Sets the origin of the instance specified by instId to newOrigin. If the instance is connected to any nets, these connections are preserved.
dbSetInstOrient
Boolean
dbSetInstOrient( dbInstId instId, dbOrient newOrientation );
Sets the orientation of the instance specified by instId to newOrientation. If the instance is connected to any nets, these connections are preserved.
dbSetInstMag
Boolean
dbSetInstMag( dbInstId instId, float mag );
Sets the magnification of the instId instance to mag.
dbSetInstTransform
Boolean
dbSetInstTransform( dbInstId instId, dbTransform transform );
Sets the origin, orientation, and magnification of the instId instance. You must use this function if origin, orientation, or magnification needs to be set more than once.
dbSetInstMaster
Boolean
dbSetInstMaster( dbInstId instId, dbCellViewId masterId );
Sets the master of the specified instance.
dbSetAnyInstMaster
Boolean
dbSetAnyInstMaster( dbAnyInstId anyInstId, dbCellViewId masterId );
Sets the master of any instance.
dbSetAnyInstNumInst
Boolean
dbSetAnyInstNumInst( dbAnyInstId anyInstId, unsigned short numInst );
Sets the number of instances to be represented by this iterated instance. The name of this instance is changed to reflect the specified number of instances. If the instance name is a vectored name, the lower bound is unchanged. If the name is a scalar, the name is suffixed with a zero-based vector expression. For example:
If the new name overlaps members of other instances, the function returns FALSE and no change is made.
dbSetAnyInstName
Boolean
dbSetAnyInstName( dbAnyInstId anyInstId, String instName );
Sets the instance name. The number of instances represented by this instance (numInst) is set to the one implied by the new name. Connections on the instance terminals are not automatically updated according to the new numInst. The function returns FALSE if the new name is not unique, if there is an illegal iterated instance reference, or if the new name overlaps with members of other instances.
dbSetAnyInstBaseName
Boolean
dbSetAnyInstBaseName( dbAnyInstId anyInstId, String baseName );
Sets the instance base name. The function returns FALSE if the resulting instance name is not unique, if there is an illegal iterated instance reference, or if the instance base name overlaps with members of other instances, in which case no change is made.
The dbOpenHier function is documented in “CDBA Input and Output Functions”
dbAllocFlattenOptions
dbFlattenOptions*
dbAllocFlattenOptions( );
Allocates memory for the dbFlattenOptions pointer and initializes different options with default values.
Arguments
Return Value
dbFreeFlattenOptions
Boolean
dbFreeFlattenOptions(
dbFlattenOptions *flattenOptions
);
Deallocates the memory allocated for the dbFlattenOptions pointer.
Arguments
Return Value
dbFlattenInst
Boolean
dbFlattenInst( dbId objId, unsigned int level, Boolean flattenPcells, Boolean preservePins, Boolean preserveRodObjects, Boolean delDetachedBlockages, Boolean preservepinFigs, );
Flattens instance objId up through named levels of hierarchy. If the instance is flattened a value of TRUE is returned, if it is not flattened a value of FALSE is returned. This API flattens all the vias. Also, flattenInst flattens mosaics as well as normal instances.
Arguments
dbFlattenInst2
Boolean
dbFlattenInst2( dbIdobjId, unsigned intlevel, dbFlattenOptions*optionsdbExcludePCellsexcludeObj);
Flattens an instance objId up through named levels of hierarchy along with a set of flatten options. dbFlattenInst2 flattens mosaics as well as normal instances. You need to allocate and free the dbFlattenOptions pointer, before and after using this function by using the and functions.
Arguments
|
Number of levels of hierarchy through which to flatten the instance. |
|
void FigCallback(dbFigId srcFig,dbFigId dstFig); options->callbackOnFigCopy = figCallback; |
|
|
|
|
|
|
A dbExcludePCells object.
When specified, any PCell instance whose master library, cell, and view names are stored in this object, will not be flattened, even when For more information, see dbCreateExcludePCellsFromFile. |
Return Value
Example
void FigCallback (dbFigId srcFig, dbFigId dstFig);
void mosaicInstCallback(dbMosaicId oMosaic, dbInstId nInst, int row, int column);
dbFlattenOptions *options = dbAllocFlattenOptions();
options->hierSeparator = strdup("_"); options->callbackOnFigCopy = figCallback; options->callbackOnMosaicInstCopy = mosaicInstCallback; options->skipSteiners = TRUE; dbFlattenInst2(instMid, 1, options); free(options->hierSeparator); dbFreeFlattenOptions(options);
Flattens the instance instMid through one level of the hierarchy by using "_" as hierarchy separator. A Steiner, if any, is copied to the parent cell. Callbacks are set for FigCopy and MosaicInstCopy, which are defined in user’s code.
dbCreateExcludePCellsFromFile
dbExcludePCells
dbCreateExcludePCellsFromFile(
const char* filePath
);
Description
Creates a dbExcludePCells object from the input ExcludePCells file.
The dbExcludePCells object stores the library, cell, and view names of the Pcell masters. When passed as a flatten option, any Pcell instance whose master library, cell, and view names are stored in this object will not be flattened.
Arguments
Return Value
dbExcludePCellsContain
Boolean
dbExcludePCellsContain( dbExcludePCellsdbPCells, dbCellViewIdcvId);
Description
Checks whether the cellview ID of the specified Pcells is to be excluded during Pcell flattening.
Arguments
|
Database IDs of the related dbExcludePCells object. |
|
Return Value
|
|
|
|
|
dbDeleteExcludePCells
void
dbDeleteExcludePCells(
dbExcludePCells pcells
);
Description
Deletes the dbExcludePCells object.
Arguments
|
The |
Return Values
Instance Deletion
The following function deletes the instance from the cellview that contains it. The corresponding instance header is automatically updated to reflect the change. If this instance is the last instance attached to the instance header, then the instance header is also deleted. If the instance is a parent, then all the descendants are also deleted. For more information on parent-child relationships, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
dbDeleteInst
Boolean
dbDeleteInst( dbInstId instId );
Instance Information Retrieval
The following functions retrieve information about instances, including names, instance headers, and masters.
General Instance Information
The following functions retrieve information about instances in general.
dbGetInst
Boolean
dbGetInst( dbInstId instId, String pInstName, dbPoint pOrigin, dbOrient pOrientation, unsigned short pNumInst );
Returns the name, origin, orientation, and numInst attributes of the instance specified by instId.
dbGetInstTransform
dbTransform
dbGetInstTransform( dbInstId instId );
Returns the transform (the orientation, origin, and magnification) of the instance.
dbGetInstOrigin
dbPoint
dbGetInstOrigin( dbInstId instId );
Returns the origin of the instance as a point.
dbGetInstOrient
dbOrient
dbGetInstOrient( dbInstId instId );
Returns the orientation of the instance. The function supports both regular and mosaic instances.
dbGetInstMag
float
dbGetInstMag( dbInstId instId );
Retrieves the magnification of the instance.
dbGetInstName
String
dbGetInstName( dbInstId instId );
Returns the name of the instance as a cellview string.
dbGetInstNumInst
unsigned int
dbGetInstNumInst( dbInstId instId );
Returns the numInst attribute of the instance.
dbGetInstPlacementStatus
dbPlacementStatus
dbGetInstPlacementStatus( dbInstId instId );
Retrieves the placement status of the instance.
dbGetInstBBox
dbBBox *
dbGetInstBBox( dbInstId instId );
Retrieves the bounding box of the instance and returns a pointer to temporary storage. The bounding box of an instance is determined by the bounding box of the master cellview, the origin of the instance, its orientation, and its magnification.
dbGetInstLibName
String
dbGetInstLibName( dbInstId instId );
Retrieves the library name of the master of the instance.
dbGetInstCellName
String
dbGetInstCellName( dbInstId instId );
Retrieves the cell name of the master of the instance.
dbGetInstViewName
String
dbGetInstViewName( dbInstId instId );
Retrieves the view name of the master of the instance.
dbGetInstNameNumInst
int
dbGetInstNameNumInst( String instName );
Returns the number of iterations implied by the instance name.
dbCellViewId
dbGetAnyInstCellView( dbAnyInstId anyInstId );
Retrieves the parent cellview of the instance.
dbGetAnyInstNumInst
int
dbGetAnyInstNumInst( dbAnyInstId anyInstId );
Returns the number of instances represented by this iterated instance.
dbGetAnyInstName
String
dbGetAnyInstName( dbAnyInstId anyInstId );
Retrieves the name of any instance.
dbGetAnyInstBaseName
String
dbGetAnyInstBaseName( dbAnyInstId anyInstId );
Retrieves the baseName of any instance.
Instance Headers
The following functions retrieve information about instance headers.
dbGetInstInstHeader
dbInstHeaderId
dbGetInstInstHeader( dbInstId instId );
Returns the instance header of the instance.
dbGetInstHeaderMaster
dbCellViewId
dbGetInstHeaderMaster( dbInstHeaderId instHeaderId );
Returns the master cellview specified by the instance header. If the master cellview is not already in virtual memory, it is brought into virtual memory and bound to the instance header.
dbGetAnyInstInstHeader
dbInstHeaderId
dbGetAnyInstInstHeader( dbAnyInstId anyInstId );
Returns the instance header of any instance.
Instance Masters
The functions dbGetInstMaster and dbGetAnyInstMaster, retrieve information about master cellviews of instances, specifically, the master cellview ID specified by the instance. The master cellview is brought into virtual memory (if the master cellview is not already there) and bound to the corresponding instance header.
dbGetInstMaster
dbCellViewId
dbGetInstMaster( dbInstId instId );
dbGetAnyInstMaster
dbCellViewId
dbGetAnyInstMaster( dbAnyInstId anyInstId );
dbGetAnyInstSwitchMaster
dbCellViewId
dbGetAnyInstSwitchMaster( dbAnyInstId anyInstId, String viewList );
This function switches you into a different cellview that has the same library name and cell name as anyInst. The viewList parameter returns the first available view name of a string of view names you can switch into. dbGetAnyInstSwitchMaster returns the sub-master.
If the switched cellview is not a parameterized cell, this function behaves the same way as dbOpenCellView but is easier to use. If the switched cellview is a parameterized cell, each property on anyInst is checked to see if the property is a parameter of the cellview. However, it does not matter whether the cellview is parameterized or not, the function still returns the sub-master.
dbGetAnyInstSwitchedMaster(anyInstId,"symbolschematic");
The dbOpenAllMaster function is documented in “Database I/O Functions”.
Predicate Functions for Instances
The following functions return Boolean values.
dbIsInstHeaderBound
Boolean
dbIsInstHeaderBound( dbInstHeaderId instHeaderId );
Returns TRUE if the instance header is bound to its master. Otherwise, the function returns FALSE.
dbIsSubInstHeaderId
Boolean
dbIsSubInstHeaderID( dbIsSubInstHeaderId instHeaderId );
Returns TRUE if the instHeaderId indicates a subHeader, which means it is the instHeader for a Pcell sub-master. Otherwise, the function returns FALSE. Calling this function does not open the master cellview.
dbIsInstBound
Boolean
dbIsInstBound( dbInstId instId );
Returns TRUE if the specified instance is bound to its instance header. Otherwise, the function returns FALSE.
dbIsAnyInstBound
Boolean
dbIsAnyInstBound( dbAnyInstId anyInstId );
Returns TRUE if any instance is bound to its master. Otherwise, it returns FALSE.
dbIsSameMaster
Boolean
dbIsSameMaster( dbAnyInstId anyInstId1, dbAnyInstId anyInstId2 );
Returns TRUE if the two instances refer to the same master, that is, if both have the same instance header as returned by dbGetAnyInstInstHeader. Otherwise, it returns FALSE.
Generator Functions
The following are pairs of functions that start the generator for and generate instances, instance headers, and masters of a cellview (or generate information about these).
dbStartGenInstHeader
dbGenStateId
dbStartGenInstHeader( dbCellViewId cellViewId );
Starts the generator for all instance headers in the cellview.
dbGenInstHeader
Boolean
dbGenInstHeader( dbGenStateId pState, dbInstHeaderId pInstHeaderId );
Generates all instance headers in the cellview.
dbStartGenMaster
dbGenStateId
dbStartGenMaster( dbCellViewId cellViewId );
Starts the generator for all masters specified by the cellview. If instHeader is unbound at the time this generator is called, it becomes bound to its master when the generator searches instHeader.
dbGenMaster
Boolean
dbGenMaster( dbGenStateId pState, dbCellViewId pMasterId );
Generates all masters specified by the cellview. If instHeader is unbound at the time this generator is called, it becomes bound to its master when the generator searches instHeader.
dbStartGenInstHeaderToAnyInst
dbGenStateId
dbStartGenInstHeaderToAnyInst( dbInstHeaderId instHeaderId );
Starts the generator to return a type number that indicates whether anyInstId is a regular instance (dbcInstType) or a mosaic instance (dbcMosaicInstType), or that indicates that no more instances are to be generated (dbcNoMoreObj, which is equal to 0).
dbGenInstHeaderToAnyInst
dbType
dbGenInstHeaderToAnyInst( dbGenStateId pState, dbAnyInstId pAnyInstId );
Returns a type number that indicates whether anyInstId is a regular instance (dbcInstType) or a mosaic instance (dbcMosaicInstType), or that indicates that no more instances are to be generated (dbcNoMoreObj, which is equal to 0).
You typically use dbGenInstHeaderToAnyInst in a conditional expression of a “while” statement or in a selection expression of a “switch” statement.
dbStartGenInstHeaderToInst
dbGenStateId
dbStartGenInstHeaderToInst( dbInstHeaderId instHeaderId );
Starts the generator for all instances specified by the instance header.
dbGenInstHeaderToInst
Boolean
dbGenInstHeaderToInst( dbGenStateId pState, dbInstId pInstId );
Generates all instances specified by the instance header.
dbStartGenAnyInst
dbGenStateId
dbStartGenAnyInst( dbCellViewId cellViewId );
Starts the generator for all instances and mosaic instances contained in the cellview. The order might be random, so not all instances of the same master are generated in sequence.
dbGenAnyInst
dbType
dbGenAnyInst( dbGenStateId pState, dbAnyInstId pAnyInstId );
Generates all instances and mosaic instances contained in the cellview. The order might be random, so not all instances of the same master are generated in sequence.
dbGenAnyInst returns a type number that indicates whether anyInstId is a regular instance (dbcInstType), a mosaic instance (dbcMosaicInstType), or indicates that no more instances are to be generated (dbcNoMoreObj, which is equal to 0).
You typically use dbGenAnyInst in a conditional expression of a while statement or in a selection expression of a switch statement.
dbStartGenInst
dbGenStateId
dbStartGenInst( dbCellViewId cellViewId );
Starts the generator for all instances contained in the cellview.
dbGenInst
Boolean
dbGenInst( dbGenStateId pState, dbInstId pInstId );
Generates all instances contained in the cellview.
dbStartGenMasterToInstHeader
dbGenStateId
dbStartGenMasterToInstHeader( dbCellViewId masterId );
Starts the generator for all instance headers that are bound to the master cellview specified by masterId. Each of these instance headers resides within a different cellview.
dbGenMasterToInstHeader
Boolean
dbGenMasterToInstHeader( dbGenStateId pState, dbInstHeaderId pInstHeaderId );
Generates all instance headers that are bound to the master cellview specified by masterId. Each of these instance headers resides within a different cellview.
Hierarchy Traversal Functions
The following functions traverse the hierarchy or retrieve information about it.
dbProduceOverlap
Boolean
dbProduceOverlap( dbCellViewId cellViewId, dbBBox *pBBox, unsigned int displayStartLevel, unsigned int displayStopLevel, dbLayer layer, dbPurpose purpose, dbShapeConsumerFunc shapeConsumer, void *pConsumerData );
Calls the user function shapeConsumer with each shape whose bBox overlaps the bounding box passed in when the shape is transformed to the top-level coordinate system. You can limit the selection to supply shapes that are at certain levels in the hierarchy and only on a specified layer or a specified layer-purpose pair.
The functions displayStartLevel and displayStopLevel specify the highest level (inclusive) and the deepest level (inclusive) to be produced, respectively. If the layer is set to dbcAllLayer, shapes are returned from all layers. The shapes are similarly filtered by the purpose specified. You can use the dbcAllPurpose value as a wild card.
The dbProduceOverlap function normally returns a value of TRUE. However, for both displayStartLevel and displayStopLevel, if the cellViewId is invalid, the function prints a message and returns FALSE. If the layer-purpose pair does not exist within the cellview, the function does not print a message and returns FALSE. The function prints a message if the bounding box is malformed.
If the shape consumer returns TRUE, the producer continues to generate shapes. If it returns FALSE, the producer stops immediately and returns TRUE.
The consumer data is a pointer into a data structure that you define. It is passed down to the consumer with each call and provides a simple mechanism for reentrant programming. The consumer data can be NULL.
The shape record contains a copy of the shape’s attributes. Geometric attributes, such as point, bounding box, and orientation, are converted to the coordinate system of the top level cellview (cellViewId).
usrShapeConsumer
Declare the consumer for dbProduceOverlap as follows:
Boolean
usrShapeConsumer( dbCellViewId cellViewId, dbShapeId shapeId, void *pUsrData, dbShapeRec *pShapeRec );
dbProduceOverlapInst
Boolean
dbProduceOverlapInst( dbCellViewId cellViewId, dbBBox *pBBox, unsigned int displayStartLevel, unsigned int displayStopLevel, dbInstConsumerFunc instConsumer, void *pConsumerData );
The dbProduceOverlapInst function provides most of the same information as the SKILL getOverlaps function does. Unlike the SKILL getOverlaps function, however, the dbProduceOverlapInst function does not produce shapes; the dbProduceOverlapInst function produces only overlapping instances.
The dbProduceOverlapInst function produces instances similar to the way dbProduceOverlap produces shapes. The dbProduceOverlapInst function returns only the instances between levels displayStartLevel and displayStopLevel, inclusive, that overlap the bounding box pBBox when the instance is transformed to the top-level coordinate system.
The instConsumer argument is input to FuncBooleanPtr. This is necessary for the code to work with the c++ complier. For Example:
dbProduceOverlapInst(
cv, pbbox, dbcInstanceLayer, dbcInstanceLayer,
(FuncBooleanPtr)myInstConsumer, NULL);
usrInstConsumer
The instance record contains a copy of the instance’s attributes. Geometric attributes, such as origin, bounding box, and orientation, are converted to the coordinate system of the top-level cellview (cellViewId). Declare the consumer as follows.
Boolean
usrInstConsumer( dbCellViewId, dbInstId, void *, dbInstRec * );
The dbProduceOverlapInst function is based on dbGetNeighbor and has the same calling conventions and limitations. The function returns only hierarchical instances found in the direction specified. The dbProduceOverlapInst function does not produce vias. Use the dbRegionQuery C API function to produce vias.
dbGetNeighbor
dbShapeId
dbGetNeighbor( dbCellViewId cellViewId dbBBox *pBBox dbDirection direction dbLayer layer dbPurpose purpose dbDistance *pDistance, dbPoint *pXyOffset );
Returns the closest neighboring shape on the specified layer and purpose.
The dbGetNeighbor function and its companion function, dbGetNeighborInst (described after this function), provide the same functionality as the SKILL dbGetNeighbor function.
The dbGetNeighbor function generates only shapes at the current display level in the hierarchy. The cellview passed in must be the cellview being edited within a window on the current desk. If it is not, a message is printed and dbcNullShapeId is returned. dbcNullShapeId is returned if nothing is found on the layer-purpose pair or if the layer-purpose pair does not exist within the cellview. If the cellview does not exist or the bounding box is not well-formed, a message is printed before returning a dbcNullShapeId.
dbGetNeighborInst
dbInstId
dbGetNeighborInst( dbCellViewId cellViewId dbBBox *pBBox dbDirection direction dbDistance *pDistance dbPoint *pXyOffset );
Returns only the hierarchical instances found in the direction specified. This function is based on dbGetNeighbor (previously described) and has the same calling conventions and limitations.
Advanced Hierarchy Traversal Functions
The following structures can be used to retrieve more detailed information about the hierarchy.
dbHierPath Structure
The dbHierPath structure contains information about the hierarchy.
Declarations
The declarations for the dbHierPath structure are the following.
struct dbHierPath {
dbId id,
unsigned int rows,
unsigned int columns,
unsigned int memInst,
dbBBox bBox
}
typedef struct dbHierPath dbHierPath;
Arguments
The members of the dbHierPath structure are the following.
dbHierInfo Structure
The dbHierInfo structure contains detailed information about the hierarchy.
Declarations
The declarations for the dbHierInfo structure are the following.
struct dbHierInfo {
dbCellViewId topCellViewId;
dbLayer layer;
dbPurpose purpose;
dbBBox bBox;
FuncConsumerPtr usrConsumer;
usrType *pCArg;
FuncSwitcherPtr usrSwitcher;
usrType *pSArg;
dbCellViewId cellViewId;
dbId id;
int threshold;
Boolean bordersOnly;
Boolean toExpand;
Boolean toProduce;
dbTransform transform;
int depth;
dbHierPath hierPath[dbcMaxHierDepth];
FuncSwitcherPtr mosaicSwitcher;
usrType *pMArg;
Boolean useThresholdOnDot;
Boolean doNeighbor;
dbDirection direction;
dbDistance distance;
dbPoint closePoint;
Boolean pruneByLayer;
usrType pNeighborInfo;
unsigned short borderRows;
unsigned short borderColumns;
int abortCounter;
int rectThreshold;
Boolean pinOnly;
Boolean toCheckAbort;
Boolean trueOverlap;
FuncSwitcherPtr viaSwitcher
usrType *pVArg
};
typedef struct dbHierInfo dbHierInfo;
#define dbcMaxHierDepth 32
Arguments
The members of the dbHierInfo structure are the following.
Functions for the HierInfo Structure
The following functions allocate and free the HierInfo structure.
dbAllocHierInfo
dbHierInfo *
dbAllocHierInfo( );
This function allocates and initializes a dbHierInfo structure. If the function fails, NULL is returned.
dbFreeHierInfo
Boolean
dbFreeHierInfo( dbHierInfo pHierInfo );
This function frees the dbHierInfo structure. If the function fails, FALSE is returned.
dbProduceOverlap2
Boolean
dbProduceOverlap2( dbHierInfo *pHierInfo );
Calls the user-defined consumer and user-defined view switcher with the top view ID stored in pHierInfo->topCellViewId. When transformed to the top-level coordinate system, each shape is on the layer-purpose pair and overlaps the searching box. The function produces pHierInfo->bBox and passes it to the consumer pHierInfo->usrConsumer.
For each instance, dbProduceOverlap2 calls the view switcher pHierInfo->viewSwitcher. You can direct toProduce and toExpand to govern whether to produce the shapes or not and to expand down the hierarchy or not.
bbox overlaps the search area but not its boundary, the figure will not be produced.Example
The following is an example of the dbProduceOverlap2 function for producing via shapes:
oaBoolean
dbViaShapesTest::testViaShapes(dbId design)
{
techFileId techId;
dbHierInfo *hierInfo;
dbLayer layerList[3];
techId = techGetCellViewTechFile(design);
if (techcNullTechFileId == techId) {
return FALSE;
}
hierInfo = dbAllocHierInfo();
hierInfo->topCellViewId = design;
// The top cellview, the query uses to produce via shapes
hierInfo->viaSwitcher = viaSwitcher;
// The user-defined C function to let the user decide whether or not a via master should be traversed
hierInfo->usrConsumer = shapeConsumer;
// The user-defined C function to call for providing the produced shapes to the user
hierInfo->usrSwitcher = usrSwitcher;
// The user-defined C function to let the user decide whether or not an instance master should be traversed
hierInfo->purpose = dbcAllPurpose;
hierInfo->pruneByLayer = TRUE;
hierInfo->bBox = *dbGetCellViewBBox(design);
hierInfo->pCArg = (usrType*) this;
hierInfo->pSArg = (usrType*) this;
hierInfo->pVArg = (usrType*) this;
layerList[0] = 2;
layerList[1] = 4;
layerList[2] = 3;
for(int i = 0; i < 3; i++) {
hierInfo->layer = layerList[i];
dbProduceOverlap2(hierInfo); //produce shapes for this layer/AnyPurpose
}
dbFreeHierInfo(hierInfo);
return TRUE;
}
usrConsumer
Declare the user-defined consumer function as follows.
Boolean
usrConsumer( dbHierInfo *pHierInfo, dbShapeRec *pShapeRec );
pShapeRec points to a shape record structure whose coordinates are transformed to the coordinate system of the top view. You can use the type member dbShapeRec to find its type and pass pShapeRec to the corresponding record type. For example:
pPolygonRec = (dbPolygonRec *) pShapeRec;
pHierInfo points to the dbHierInfo structure, which dbProduceOverlap2 updated.
If the return value is TRUE, then dbProduceOverlap2 continues to produce shapes. If the return value is FALSE, dbProduceOverlap2 stops producing additional shapes for the current level.
usrSwitcher
Declare the user-defined cellview switcher as follows.
Boolean
usrSwitcher( dbHierInfo *pHierInfo );
The pHierInfo parameter points to the dbHierInfo structure which dbProduceOverlap2 sets and updates.
The first time usrSwitcher runs, pHierInfo->id is type NULL. dbProduceOverlap2 initializes pHierInfo->id from the top level cellview. usrSwitcher evaluates pHierInfo->id. It then sets the toProduce and toExpand parameters to direct dbProduceOverlap2 to produce shapes and to expand the design hierarchy.
Subsequently, dbProduceOverlap2 sets pHierInfo->id to type dbcInstType or dbcMosaicInstType. usrSwitcher evaluates pHierInfo->id. It then sets the toProduce and toExpand parameters to direct dbProduceOverlap2 to produce shapes and to expand the design hierarchy.
mosaicSwitcher
Declare the user-defined cellview switcher for handling mosaics as follows:
Boolean
mosaicSwitcher( dbHierInfo *pHierInfo );
The pHierInfo parameter points to dbHierInfo structure which dbProduceOverlap2 sets and updates.
You can use the mosaic ID pHierInfo->id without defining mosaicSwitcher, if you do not want to affect the mosaic itself.
This function produces two possible outcomes:
-
If
mosaicSwitcherdoes not exist, CDBA processesmosaicInstand passes it tousrSwitcher. -
If
mosaicSwitcherexists and you want to producemosaicInst, you need to set bothpHierInfo->toExpandandpHierInfo->toProduceto TRUE inmosaicSwitcher. UnlikeusrSwitcher, you do not need to setpHierInfo->cellViewId.
viaSwitcher
Declare the user-defined cellview switcher for handling vias as follows:
Boolean
mosaicSwitcher( dbHierInfo *pHierInfo );
The pHierInfo parameter points to the dbHierInfo structure which dbProduceOverlap2 sets and updates. pHierInfo->id is the via Id. You do not need to define viaSwitcher if you do not want to do anything on the via itself.
Hierarchy Signal Traversing Functions
The following structures and functions work together to traverse signals in the hierarchy.
dbSigHierPath Structure
The dbSigHierPath structure contains information about the instances that get traversed.
Declarations
The declarations for the dbSigHierPath structure are shown below.
struct dbSigHierPath {
dbAnyInstId anyInstId;
unsigned int memIndex;
};
typedef struct dbSigHierPath dbSigHierPath;
Members
The members of the dbSigHierPath structure are used in the following way:
|
Keeps the history of all |
|
dbSigHierInfo Structure
The dbSigHierInfo structure contains general information about a signal that is going to be traversed.
Declarations
The declarations for the dbSigHierInfo structure are shown below.
struct dbSigHierInfo {
FuncBooleanPtr usrConsumer;
usrType *pCArg;
FuncBooleanPtr usrSwitcher;
usrType *pSArg;
dbCellViewId childCellViewId;
dbSigId sigId;
Boolean toExpand;
Boolean toProduceMemInst;
int startLevel;
int stopLevel;
nt depth;
dbSigHierPath hierPath[dbcMaxHierDepth];
};
typedef struct dbSigHierInfo dbSigHierInfo;
#define dbcMaxHierDepth 32
Members
The members of the dbSigHierInfo structure are used in the following way.
Functions Using the dbSigHierInfo Structure
The following functions work with the dbSigHierInfo structure to traverse a signal through the hierarchy.
dbTraverseSigHier
Boolean
dbTraverseSigHier( dbSigHierInfo pSigHierInfo );
Traverses a specified signal through the design hierarchy. You specify the signal to be traversed through pSigHierInfo. pSigHierInfo is a dbSigHierInfo structure that passes information required by this function. The traversal can start and stop at any level you specify in pSigHierInfo. Refer to dbSigHierInfo for details. This function implements the hierarchy traversal in a way similar to dbProduceOverlap2.
The dbTraverseSigHier function calls the user-defined consumer usrConsumer and view switcher usrSwitcher. The dbTraverseSigHier function is called for every connection made by this signal in a specified view.
If usrConsumer returns FALSE or an error is encountered, this function stops immediately and returns FALSE. Otherwise, dbTraverseSigHier returns TRUE.
usrConsumer
Code the usrConsumer function as follows:
Boolean
usrConsumer( dbSigHierInfo pSigHierInfo );
The pointer pSigHierInfo is a pointer to dbSigHierInfo, which was updated by dbTraverseSigHier. If the return value is TRUE, dbTraverseSigHier continues to produce signals. If the return value is FALSE, dbTraverseSigHier stops producing any more signals.
The view switcher opens the desired views in the design hierarchy where the signal is traversed. If you do not specify the usrSwitcher, it assumes only top-level traversing.
usrSwitcher
Code the usrConsumer function as follows:
Boolean
usrSwitcher( dbSigHierInfo pSigHierInfo );
pSigHierInfo points to the dbSigHierInfo structure, which has been updated by dbTraverseSigHier. If pSigHierInfo->usrSwitcher is NULL, the stopLevel is assumed to be top level (level 0) and produces only top-level signals.
Set the toExpand member of the pSigHierInfo structure to TRUE if you need to continue the traversal. Set it to FALSE otherwise. The usrSwitcher function automatically sets toExpand to FALSE if the stopLevel is reached.
FigGroup Functions
This section describes functions that affect figGroups objects.
About figGroups
A figGroup is designed to provide a grouping mechanism for geometrical objects with some collective property as boundary, orientation and origin.
The basic use model for figGroups is to take individual figures and group them into one unit, fixing the relative positions of the set. After this, the unit acts as one object which moves all figures at once. Another use model is the ability to query base on the figGroup’s bounding box.
typedef dbId dbFigGroupId;
typedef dbcNullFigGroupId ((dbFigGroupId) NULL)
The following list the types of figGroups.
typedef enum dbFigGroupType {
dbcNoneFigGroupType = 0, (VLE editable. Equiavelent to no type being set.)
dbcNexgenFigGroupType = 1,
dbcSyncCloneFigGroupType = 2,
dbcPlaceAreaFigGroupType = 3,
dbcRowFigGroupType = 4,
}
#define dbcMaxFigGroupType 4
static CONST constString dbvFigGroupTypeString[] = {
none,
analogModule,
syncClone,
placeArea,
row
};
dbCreateFigGroup
dbFigGroupId
dbCreateFigGroup( dbCellViewId cellViewId cppConstString name Boolean ordered dbPoint origin dbOrient orient dbFigGroupType type = dbcNoneFigGroupType );
Description
Creates a figGroup object in specified cellview with specified name. If ordered is true then members' order is preserved. The origin, orient, and type are specified as well. Returns the dbFigGroupId of the newly created figGroup if the command succeeds.
dbDeleteFigGroup
Boolean
dbDeleteFigGroup( dbFigGroupId figGroupId );
Description
Deletes a specified figGroup object. Removes the contents of the figGroup but does not delete the contents. Deletes props and the areaBoundary as well. Returns true if command succeeds, false if it fails.
dbAddFigToFigGroup
Boolean
dbAddFigToFigGroup( dbFigGroupId figGroupId dbId id );
Description
Adds the dbObject Id to the members list of the specified figGroup. Returns true if the member is added successfully.
dbFindFigGroupByName
dbFigGroupId
dbFindFigGroupByName( dbCellViewId cellViewId cppConstString name );
Description
Returns the figGroupId if found. Otherwise returns dbcNullFigGroupId.
dbRemoveFigFromFigGroup
Boolean dbRemoveFigFromFigGroup( dbFigGroupId figGroupId dbId id );
Description
Removes the specified dbobject ID from the members list of the specified figGroup. Returns true if Id is successfully removed or it is not in the figGroup's members list.
dbSetFigGroupOrient
Boolean
dbSetFigGroupOrient( dbFigGroupId figGroupId dbOrient orient );
Description
Sets the orientation property of the figGroup to the specified orientation. Returns true if successful.
dbSetFigGroupOrigin
Boolean
dbSetFigGroupOrigin( dbFigGroupId figGroupId dbPoint origin );
Description
Sets the origin property of the figGroup to the specified point. Returns true if successful.
dbGetFigGroupOrdered
Boolean
dbGetFigGroupOrdered( dbFigGroupId figId );
Description
Returns true if the specified figGroup is ordered and false otherwise.
dbSetFigGroupOrdered
dbSetFigGroupOrdered(
dbFigGroupId figId
Boolean ordered
);
Description
Sets the value of the ordered property of the specified figGroup to the specified value. Returns true if successful.
dbGetFigGroupName
String
dbGetFigGroupName( dbFigGroupId figGroupId );
Description
Retrieves the name of the figGroup object specified. Returns the string if found, or NULL.
dbGetFigGroupOrientation
dbOrient
dbGetFigGroupOrientation( dbFigGroupId figGroupId );
Description
Returns the orientation of the specified figGroup.
dbGetFigGroupOrigin
dbPoint
dbGetFigGroupOrigin( dbFigGroupId figGroupId );
Description
Returns origin of the specified figGroup.
dbGetFigGroupType
dbGetFigGroupType( dbFigGroupId figGroupId );
Description
Returns the type of the specified figGroup.
dbGetMemberFigGroup
dbFigGroupId dbGetMemberFigGroup( dbId id );
Description
Returns the figGroupId whose member list contains the dbId specified. Otherwise returns dbcNullFigGroupId.
dbStartGenFigGroup
dbGenStateId
dbStartGenFigGroup( dbCellViewId cellViewId );
Description
Initializes an iterator for all figGroup objects in a cell view. Returns a stateId for this iterator.
dbGenFigGroup
Boolean
dbGenFigGroup( dbGenStateId stateId, dbFigGroupId *figGroupId );
Description
Retrieve the next figGroup Id for the state Id. If the list is exhausted, return false. Otherwise returns true.
dbStartGenFigGroupToId
dbGenStateId
dbStartGenFigGroupToId( dbFigGroupId FigGroupId );
Description
Initializes an iterator over the list of dbId’s of members of the specified figGroup. Returns a stateId for this iterator.
dbGenFigGroupToId
Boolean
dbGenFigGroupToId( dbGenStateId stateId dbId *id );
Description
Retrieve the next member dbId. This could be either a figure or a figGroup. If the list is exhausted, return false. Otherwise returns true.
Region Queries
This section describes region query functions. Below is a simple hierarchical design representation from a query perspective.

There is a query function for each region query class type.
Each query functions takes the following common arguments.
- top cellview used as the root of the design hierarchy.
- bounding box specifying the region of the design in the top cellview to perform the query.
- transform applied to the design.
- size filter resolution.
- start and stop levels of the design to query.
- client data used by the client application.
- client consumer function called for each object produced by the region query.
-
client pre-hierarchy expansion function called during the region query before processing either an instance or a via.
The pre-hierarchy expansion functions allows a client application to control what portion of the design hierarchy is processed. If the function returns TRUE, the design hierarchy referenced by the specified instance or via is processed. If the function returns FALSE, the design hierarchy is not processed. If pre-hierarchy expansion is called, the client application defined function receives the dbId of an instance or a via, and row and column information if the dbId is an array instance. -
client post-hierarchy expansion function called only if the pre-hierarchy expansion function is called and returns TRUE.
Post-hierarchy expansion is called only after all the hierarchical design content is produced. If post-hierarchy expansion is called, the client application defined function receives the dbId of an instance or a via, and row and column information if the dbId is an array inst.ance.
The client consumer, pre and post hierarchy expansion functions are passed a dbQueryStateId used to access the region query attributes. The top cellivew, current transform, size filter, and client data are examples of the attributes. The following are the function prototypes for the object specific query consumer functions.
typedef void (*dbBlockageQueryConsumer) (dbBlockageId blockageId,
dbQueryStateId stateId) ;
typedef void (*dbBoundaryQueryConsumer) (dbBoundaryId boundaryId,
dbQueryStateId stateId) ;
typedef void (*dbGuideQueryConsumer) (dbGuideId guideId,
dbQueryStateId stateId) ;
typedef void (*dbInstQueryConsumer) (dbInstId instId,
dbQueryStateId stateId) ;
typedef void (*dbMarkerQueryConsumer) (dbMarkerId markerId,
dbQueryStateId stateId) ;
typedef void (*dbRowQueryConsumer) (dbRowId rowId,
dbQueryStateId stateId) ;
typedef void (*dbShapeQueryConsumer) (dbShapeId shapeId,
dbQueryStateId stateId) ;
typedef void (*dbSteinerQueryConsumer) (dbSteinerId steinerId,
dbQueryStateId stateId) ;
typedef void (*dbViaQueryConsumer) (dbViaId viaId,
dbQueryStateId stateId) ;
The following are the function prototypes for the pre and post expansion functions.
typedef Boolean (*dbPreQueryExpand) (dbId id,
unsigned int row,
unsigned int col,
dbQueryStateId stateId);
typedef Boolean (*dbPostQueryExpand) (dbId id,
unsigned int row,
unsigned int col,
dbQueryStateId stateId);
The following are the region query functions.
dbLayerBlockageQuery
void
dbLayerBlockageQuery( dbCellViewId cellViewId, dbLayer layer, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbBlockageQueryConsumer blockageConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for blockages on the specified layer in the specified region of the design hierarchy.
Arguments
Return Values
dbPlacementBlockageQuery
void
dbPlacementBlockageQuery( dbCellViewId cellViewId, dbLayer layer, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbBlockageQueryConsumer blockageConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for placement blockages in the specified region of the design hierarchy.
Arguments
Return Values
dbBoundaryQuery
void
dbBoundaryQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbBoundaryQueryConsumer boundaryConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for boundaries in the specified region of the specified design hierarchy.
Arguments
Return Values
dbGuideQuery
void
dbGuideQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbGuideQueryConsumer guideConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for guides in the specified region of the specified design hierarchy.
Arguments
Return Values
dbInstQuery
void
dbInstQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbInstQueryConsumer instConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for instances in the specified region of the specified design hierarchy.
Arguments
Return Values
dbMarkerQuery
void
dbMarkerQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbMarkerQueryConsumer markerConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for markers in the specified region of the specified design hierarchy.
Arguments
Return Values
dbRowQuery
void
dbRowQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbRowQueryConsumer rowConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for rows in the specified region of the specified design hierarchy.
Arguments
Return Values
dbShapeQuery
void
dbShapeQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbShapeQueryConsumer shapeConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for shapes in the specified region of the specified design hierarchy.
Arguments
Return Values
dbSteinerQuery
void
dbSteinerQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbSteinerQueryConsumer steinerConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for steiners in the specified region of the specified design hierarchy.
Arguments
Return Values
dbViaQuery
void
dbViaQuery( dbCellViewId cellViewId, dbBBox *region, dbTransform transform, unsigned int filterSize, unsigned int startLevel, unsigned int stopLevel, dbViaQueryConsumer viaConsumer, dbPreQueryExpand preExpander, dbPostQueryExpand postExpander, void *clientData);
Description
Begins a region query for vias in the specified region of the specified design hierarchy.
Arguments
Return Values
dbAbortQuery
void
dbAbortQuery( dbQueryStateId stateId );
Description
Aborts the region query in a user-defined consumer or visitor function while it is executing. An abort marks the query as aborted, but does not indicate an immediate termination of the query.
Depending on the current state of the query and the control point being processed at some level of the design hierarchy, the query aborts systematically. Once the abort is called, the user-defined consumers/visitors are not called.
Arguments
Return Values
dbGetQueryLayer
dbLayer
dbGetQueryLayer( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to get the layer number. This function applies only to blockage, shape, and steiner queries.
Arguments
Return Values
dbGetQueryPurpose
dbPurpose
dbGetQueryPurpose( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to get the purpose. This function applies only during shape queries.
Arguments
Return Values
dbSetQueryClientData
Boolean
dbSetQueryClientData( dbQueryStateId stateId, void *clientData );
Description
Allows the client application defined consumer and hierarchy expansion functions to set the region query client data. It is the responsibility of the client to manage this data.
Arguments
Return Values
|
Returns TRUE if the region query client data is successfully set. Returns FALSE otherwise. |
dbGetQueryClientData
void*
dbGetQueryClientData( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to get the region query client data. It is the responsibility of the client to manage this data.
Arguments
Return Values
|
Returns a pointer to the client data. The client can typecast the data back to the original data type. |
dbGetQueryTopCellView
dbCellViewId
dbGetQueryTopCellView( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to access the top cellview for which the query was executed.
Arguments
Return Values
dbGetQueryRegion
dbBBox*
dbGetQueryRegion( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to access the original query region for which the query was executed.
Arguments
Return Values
dbGetQueryCurrentTransform
dbTransform
dbGetQueryCurrentTransform( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to access the current transform based on the current level in the hierarchy.
Arguments
Return Values
dbGetQueryCurrentRegion
dbBBox*
dbGetQueryCurrentRegion( dbQueryStateId stateId );
Description
Allows the client application defined consumer and hierarchy expansion functions to access the current query region at different hierarchy levels as the query traverses through the design hierarchy.
Arguments
Return Values
dbCreateQueryHierPath
dbQueryHierPath*
dbCreateQueryHierPath();
Description
Creates an empty hierarchical path data structure. Hierarchical path functions from client application defined region query consumer and hierarchy expansion functions use the hierarchical path data structure.
Return Values
|
Returns a pointer to the newly created hierarchical path data structure. |
dbFreeQueryHierPath
void
dbFreeQueryHierPath( dbQueryHierPath *hierPath );
Description
Frees hierarchical path data created by dbCreateQueryHierPath().
Argument
Return Values
dbGetQueryHierPath
void
dbGetQueryHierPath( dbQueryStateId stateId, dbQueryHierPath **hierPath );
Description
Allows the client application defined consumer and hierarchy expansion functions to access the current query hierPath as the query traverses through the design hierarchy.
Arguments
|
Pointer to the hierarchical path data defined by the client. |
Return Values
dbCopyQueryHierPath
dbQueryHierPath*
dbCopyQueryHierPath( dbQueryHierPath *hierPath );
Description
Creates an exact copy of the passed in hierPath object.
Arguments
Return Values
dbCompareQueryHierPaths
Boolean
dbCompareQueryHierPaths( dbQueryHierPath* *hierPath1, dbQueryHierPath* *hierPath2 );
Description
Compares two hierPath objects.
Arguments
Return Values
|
Returns TRUE if hierPath1 and hierPath2 are same. Returns FALSE otherwise. |
dbResetQueryHierPath
void
dbResetQueryHierPath( dbQueryHierPath *hierPath );
Description
Resets the hierPath by setting its depth to zero.
Arguments
Return Values
dbGetQueryHierPathTransform
dbTransform
dbGetQueryHierPathTransform( dbQueryHierPath *hierPath );
Description
Gets the hierPath context transform by concatenating the transforms of all the instances in the hierPath starting from the lowest instance or via in the hierPath and working up towards level 0.
Arguments
Return Values
dbGetQueryHierPathDepth
unsigned int
dbGetQueryHierPathDepth( dbQueryHierPath *hierPath );
Description
Returns the value of the depth parameter from the hierarchical path data structure.
Arguments
Return Values
dbGetQueryHierPathLevel
void
dbGetQueryHierPathLevel( dbQueryHierPath *hierPath, unsigned int level, dbId *id, unsigned int* row, unsigned int* col );
Description
Gets the instId or the viaId at the specified level. If this inst is an arrayInst, the function also returns the row and column information.
Arguments
Return Values
dbPushQueryHierPathLevel
void
dbPushQueryHierPathLevel( dbQueryHierPath *hierPath, dbId id, unsigned int row, unsigned int col );
Description
Pushes an instId or viaId on the hierPath. Clients can provide row and column information for array instances. This adds a new level to the hierPath and the depth increments by one.
Arguments
Return Values
|
Returns TRUE if the instId is successfully pushed on the hierPath. Returns FALSE otherwise. |
dbPopQueryHierPath
void
dbPopQueryHierPath( dbQueryHierPath *hierPath );
Description
Pops the hierPath up one level. This reduces a level in the hierPath and the depth decrements by one.
Arguments
Return Values
Parameterized Cells
A parameterized cell is a special cellview that creates variations of itself at run time based on different values of parameters. A special SKILL program stored with the cellview applies the parameters. The parameters are specified as a hierarchical property list on the cellview of the parameterized cell. This list lets you choose the names, default values, and value types for the parameters.
When an instance of a parameterized cell is placed in another cellview, any properties on this instance override the default parameters stored on the master. If no variant of the cellview was created for this set of parameters, the SKILL program creates a run-time variant of the parameterized cell. These variants are not stored on disk. Instead, they are re-created each time the parameterized cell is opened or bound.
Parameterized Cells and Database Organization
Only the superMaster cellview defining a parameterized cell is permanently stored in the database. The run-time variants created for different parameter bindings are temporary cellviews that exist for the lifetime of the process or the parameter bindings.
The dbSave command does not save a variant cellview because this overwrites the superMaster of the parameterized cell. (However, a variant cellview can be written to another cellview using dbWriteCellView).
For each unique parameterization of a parameterized cell within a cellview, a variant of instHeader describes those instances with that particular parameterization. The instances generated for an instHeader include the instances of the variants of an instHeader for that instHeader.
In the following figure, cellview P was instantiated once in cellview A and three times in cellview B. The instance in cellview A and one of the instances in cellview B have a property w=1.5, while the other two instances in cellview B have a property w=3.0.

Functions for Parameterized Cells
The following functions return information and act on cellviews for parameterized cells.
dbCellViewHasVariant
Boolean
dbCellViewHasVariant( dbCellViewId cellViewId );
Returns TRUE if the cellview has variant cellviews.
dbStartGenVariantCellView
dbGenStateId
dbStartGenVariantCellView( dbCellViewId cellViewId );
Starts the generator for all variant cellviews of a superMaster cellview. If the cellview is not a superMaster, the function does not generate any cellviews.
dbGenVariantCellView
Boolean
dbGenVariantCellView( dbGenStateId pState, dbCellViewId pCellViewId );
These two functions generate all variant cellviews of a superMaster cellview. If the cellview is not a superMaster cellview, the function does not generate any cellviews.
dbInstHeaderHasVariant
Boolean
dbInstHeaderHasVariant( dbInstHeaderId instHeaderId );
Returns TRUE if the instHeader has variant instHeaders.
dbStartGenInstHeaderVariant
dbGenStateId
dbStartGenInstHeaderVariant( dbInstHeaderId instHeaderId );
Prepares the generator for all variant instHeaders of an instHeader. If the master for instHeader is not a parameterized cell, the function does not generate any variant instHeaders.
dbGenInstHeaderVariant
Boolean
dbGenInstHeaderVariant( dbGenStateId pState, dbInstHeaderId pInstHeaderId );
Generates all variant instHeaders of an instHeader. If the master of an instHeader is not a parameterized cell, the function does not generate any variant instHeaders.
dbDumpPcell
Boolean
dbDumpPcell( dbCellViewId cvId, string cvFile, string pCellFile ):
Description
Writes out the parameterized cell SKILL procedure attached to the given cellview to the specified file. Also creates a file that contains all the SKILL commands needed to recreate the cellview.
Arguments
Return Values
|
Returns TRUE if the parameterized cell SKILL procedure attached to the given cellview to the specified file. Otherwise FALSE is returned. |
Defining and Undefining a Parameterized Cell
Described in this section are functions that both convert a regular cellview into a parameterized cellview and a parameterized cellview into a regular cellview. Defining or undefining parameterized cells causes major changes in the database.
When a parameterized cell is created, all instHeaders referring to that cellview get reorganized to have variant instHeaders. The opposite happens when a parameterized cell is de-parameterized. Defining and undefining can result in opening or purging variants, respectively. Therefore, these functions might run slowly.
dbDefineParamCell
Boolean
dbDefineParamCell( dbCellViewId cellViewId, String procFileName );
Changes the cellview specified by cellViewId into a parameterized cell. The procedure filename must be the name of a file containing un-encrypted SKILL code defining the procedure pcGenCell.
The cellview must have a hierarchical property named parameters. The hierarchical property contains the default values for the parameters. This command does an implicit dbSave. If there is a severe error in the SKILL procedure, if the parameters property is illegal, or if the function is unable to save the cellview, the function returns FALSE.
dbUndefineParamCell
Boolean
dbUndefineParamCell( dbCellViewId cellViewId );
Changes the parameterized cell specified by cellViewId into a regular cellview. The hierarchical property list named parameters is deleted from the cellview.
Creating Parameterized Cells
In this section, the process of defining a transistor block described both shows the usefulness of parameterized cells and gives you an example of how to create them.
When you place a transistor symbol, interpreted labels in the transistor symbol usually display values for w and l. This is seen in the following example of both the definition and an instance of a schematic symbol for an nfet.

Because the netlister is set up to interpret certain properties, it substitutes the correct value for w and l in the netlist.
However, the process of interpreting properties at run time for the layout representation is more complicated for a netlister. This involves writing the bounding box of a rectangle and the vertices of polygons and paths as an expression that gets interpreted each time the rectangle is referred to. The context for each reference to a rectangle also needs to be passed so that the process can locate the properties.
Parameterized cells evaluate the parameters and compute the effect on all objects in the cellview each time a new set of parameter bindings is encountered. The parameterized cells then create a special temporary cellview, known as a variant cellview. The SKILL procedure associated with the parameterized cell is processed to interpret the parameters and adjust the contents of variant cellview.
To define the transistor layout as a parameterized cell, do the following:
-
In the Graphics Editor, create a hierarchical property list named
parameters. In this property list, define the parameters and their defaults.GraphicsEditor edit nfet layout
GraphicsEditor plisted parameters=proplist(w=2.0 l=1.2)
-
Write a SKILL procedure named
pcGenCellto create the gate and the diffusion, and to implant shapes for the transistors. This procedure is temporarily written to a file,/tmp/nfet.il, to be used in the next step:procedure( pcGenCell( cellView ) prog( (params w l) if( !dbobectp(params = cellView~>parameters) error("invalid parameters" )) if( !numberp(w = params~>w) error( "invalid w" )) if( !numberp(w = params~>l) error( "invalid l" )) dbCreateRect( cellView 1 "drawing" list( -2:0 l+2.0:w ));; diffusion dbCreateRect( cellView 2 "drawing" list( -1:-1 l+1.0:w+1.0 )) ;; implant dbCreateRect( cellView 3 "drawing" list( 0:-2 l:w+2.0 )) ;; poly gate return(t) ) )
-
In CDBA, associate the SKILL procedure with the
nfetlayout cellview:dbCellViewId nfetId; nfetId=dbOpenCellView( "test" "nfet" "layout" NULL "a" ); if (nfetId != dbcNullCellViewId) { dbDefineParamCell( nfetId, "/tmp/nfet.il" ); }
This step copies the SKILL file/tmp/nfet.ilinto the database and associates it with thenfetlayout. The un-encrypted SKILL procedure is no longer needed by the database. -
In CDBA, create an instance of the
nfetlayout:dbInstId inst; dbPropValue value; inst = dbCreateInst( cellViewId, nfetId, NULL ); if (inst != dbcNullCellViewId) { val.aFloat = 3.0; dbCreateProp( inst, "w", dbcFloatType, val ); val.aFloat = 1.5; dbCreateProp( inst, "l", dbcFloatType, val ); }
nfetlayout and the instance ofnfetlayout appear as

Warnings about Parameterized Cells
Be aware of the following when building and using parameterized cells:
- Defining a parameterized cell does an implicit save of the cellview.
-
The database freely creates and deletes
instHeadersassociated with the variants of a parameterized cell.
Abutment Attributes
This section describes the two abutment attributes, abutName and abutRefName, supported in Parameterized cells.
Abutment Attributes for Parametrized Cells
The dbPinFigs owned by a pin can be identified with two names, the pinFigName and the abutName. Since the abutName attribute on each shape has a unique value in the subMaster design, you can find a dbPinFig based on its abutName. In addition, the dbPinFig can have an abutRefName, which specifies the name of its reference shape. The abutRefName attribute need not be unique as multiple shapes can refer to the same reference shape.
Also, the abutRefName on a shape must not be identical to its abutName, as a shape cannot be its own reference shape.
The functions in this section describe how to set, unset, and get the values of abutName and abutRefName attributes.
dbSetFigAbutName
BOOLEAN
dbSetFigAbutName( dbFigId fig, constString name );
Description
Sets the abutName attribute of the dbPinFig associated with the given dbFigId. If you specify an empty string as the abutName, the existing name specified for the dbPinFig is cleared.
The following conditions must be met to successfully assign a unique name to the dbPinFig:
-
The specified
dbFigIdis that of adbPinFig. -
The
dbPinFigexists in a Pcell. - The name being assigned is unique within a Pcell submaster.
-
The name and reference name assigned to the
dbPinFigis different.
Arguments
|
The database identifier of the |
|
Return Values
|
Returns |
dbSetFigAbutRefName
BOOLEAN
dbSetFigAbutRefName( dbFigId fig, constString name );
Description
Assigns a reference name to the dbPinFig associated with the given dbFigId.
The following conditions must be met to successfully assign a unique name to the dbPinFig:
-
The specified
dbFigIdis that of adbPinFig. -
The
dbPinFigexists in a Pcell. -
The reference name being assigned to the
dbPinFigis not the same as theabutName.
Arguments
|
The database identifier of the |
|
Return Values
|
Returns |
dbGetFigAbutName
String
dbGetFigAbutName( dbFigId fig );
Description
Retrieves the name assigned to the dbPinFig associated with the given dbFigId
The following conditions must be met to successfully retrieve the name of the dbPinFig:
-
The specified
dbFigIdis that of adbPinFig. -
An
abutNamemust have been assigned to thedbPinFigwith the givendbFigId. -
The
dbPinFigexists in a Pcell.
Arguments
|
The database identifier of the |
Return Values
|
The |
dbGetFigAbutRefName
String
dbGetFigAbutRefName( dbFigId fig );
Description
Retrieves the reference name assigned to the dbPinFig associated with the given dbFigId
The following conditions must be met to successfully retrieve the reference name of the dbPinFig:
-
The specified
dbFigIdis that of adbPinFig. -
A reference name must have been assigned to the
dbPinFigwith the givendbFigId. -
The
dbPinFigexists in a Pcell.
Arguments
|
The database identifier of the |
Return Values
|
The reference name of the |
dbHasFigAbutName
Boolean
dbHasFigAbutName( dbFigId fig );
Description
Returns a Boolean value indicating whether a name was assigned to the dbPinFig associated with the given dbFigId.
The following conditions must be met for this function to return TRUE:
Arguments
|
The database identifier of the |
Return Values
|
Returns |
dbHasFigAbutRefName
Boolean
dbHasFigAbutRefName( dbFigId fig );
Description
Returns a Boolean value indicating whether a reference name was assigned to the dbPinFig associated with the given dbFigId.
The following conditions must be met for this function to return TRUE:
Arguments
|
The database identifier of the |
Return Values
dbFindAbutFig
dbFigId
dbFindAbutFig( dbCellViewId subMasterId, constString name );
Description
Searches for the dbPinFig with the specified name in the given submaster cell and returns its database identifier.
Arguments
|
The database identifier of the submaster cell in which you want to search for the |
|
Return Values
|
The database identifier of the |
Mosaic Functions
A mosaic is a database object that represents an array of instances of one master. A mosaic instance is a database object that represents each master in the array and is associated with a user-defined icon.
The following sections list all CDBA functions available to create, delete, and modify mosaics and mosaic instances, retrieve information about mosaics and mosaic instances, and traverse the hierarchy to generate mosaics.
Mosaic and Mosaic Instance Creation
The following are the CDBA functions available to create mosaics and mosaic instances having various characteristics.
dbCreateSimpleMosaic
dbMosaicId
dbCreateSimpleMosaic( dbCellViewId cellViewId, dbCellViewId masterId, String mosaicName, dbPoint origin, dbOrient orientation, unsigned short rows, unsigned short columns, dbDistance rowSpacing, dbDistance columnSpacing );
Creates a simple mosaic from the master specified by masterId and returns its ID. The name of the instance, specified by the string mosaicName, must be unique within the cellview. If you do not want to name the instance, you can pass NULL as the mosaicName argument. CDBA then names the instance with the unique string representation of a serial number kept by the CDBA for each cellview. The serial number is updated each time an instance is named by CDBA.
The orientation argument specifies the orientation of the instance. Refer to the table associated with dbCreateInst for a complete description of the orientation. The argument origin specifies the origin of the lower left instance in the array. Rows and columns specify the size of the array. The argument rowSpacing specifies the spacing between mosaic element origins in the y direction. The argument columnSpacing specifies the space between mosaic element origins in the x direction. If the creation fails, the function returns dbcNullMosaicId.
dbCreateDefaultSpacingMosaic
dbMosaicId
dbCreateDefaultSpacingMosaic( dbCellViewId cellViewId, dbCellViewId masterId, String mosaicName, dbPoint origin, dbOrient orientation, unsigned short rows, unsigned short columns );
Creates a simple mosaic, similar to dbCreateSimpleMosaic, but row and column spacings are derived from the master cellview. If the master cellview contains a shape on the align layer (dbcAlignLayer), it uses the shape’s bounding box. Otherwise, it uses the master cellview’s bounding box. The row and column spacings are computed from the height and width of the bounding box after it is rotated by the orientation specified.
dbCreateMosaic
dbMosaicId
dbCreateMosaic( dbCellViewId cellViewId, String mosaicName, dbPoint origin, unsigned short rows, unsigned short columns );
Creates a mosaic of type dbcEmptyMosaic, which is a regular array consisting of empty cells. There is no master associated with this mosaic, and its row and column spacing defaults to the uniform spacing of zero. It returns a mosaicId. The rows and columns arguments specify the size of the array. The size of the tile array is equal to the number of rows times the number of columns.
dbCreateMosaicInst
dbMosaicInstId
dbCreateMosaicInst( dbMosaicId mosaicId, dbCellViewId masterId, dbIcon icon );
Creates a mosaic instance with the specified icon and appends it to the instance list of the mosaic specified by the mosaicId.
Mosaic and Mosaic Instance Deletion
The following CDBA functions delete mosaics and mosaic instances.
dbDeleteMosaic
Boolean
dbDeleteMosaic( dbMosaicId mosaicId );
Deletes the mosaic specified by mosaicId. Also, it deletes the associated mosaic instance list and tile array. If the mosaic is a parent, then all the descendants are likewise deleted.
See “CDBA Parent-Child Relationship Functions” for more details about parent-child relationships.
dbDeleteMosaicInst
Boolean
dbDeleteMosaicInst( dbMosaicInstId mosaicInstId );
Deletes the mosaic instance specified by mosaicInstId from the mosaic instance list. If the tile array contains references to this mosaic instance, they are converted to dbcEmptyIcon.
Mosaic Modification
The following CDBA functions modify mosaics.
dbSetRowOffsetByIndex
Boolean
dbSetRowOffsetByIndex( dbMosaicId mosaicId, int index, dbDistance offset );
Sets the row offset of a mosaic by specifying an index that indicates which row you want to set to the specified offset.
dbSetColumnOffsetByIndex
Boolean
dbSetColumnOffsetByIndex( dbMosaicId mosaicId, int index, dbDistance offset );
Sets the column offset of a mosaic by specifying an index that indicates which column you want to set to the specified offset.
dbSetRowOffset
Boolean
dbSetRowOffset( dbMosaicId mosaicId, dbDistance offsetArray );
Sets the row offset of a mosaic. Row offset is the distance between the bottom edge of the mosaic and the top edge of the row. The size of the offsetArray must be the same as the number of rows in the array. If the array has uniform spacing and is not a simple array, the row offset reflects the variable spacing with the specified offsetArray. The values in the array must increase monotonically.
dbSetColumnOffset
Boolean
dbSetColumnOffset( dbMosaicId mosaicId, dbDistance offsetArray );
Sets the column offset of a mosaic. Column offset is the distance between the left edge of the mosaic and the right edge of the column. The size of the offsetArray must equal the number of columns in the mosaic. If the mosaic has uniform spacing and is not a simple array, the column offset reflects the variable spacing with the specified offsetArray. The values in the array must increase monotonically.
dbSetUniformRowSpacing
Boolean
dbSetUniformRowSpacing( dbMosaicId mosaicId, dbDistance spacing );
Sets the row spacing of a mosaic to uniform spacing. If the mosaic has variable row spacing, it becomes uniform spacing with the specified spacing.
dbSetUniformColumnSpacing
Boolean
dbSetUniformColumnSpacing( dbMosaicId mosaicId, dbDistance spacing );
Sets the column spacing of a mosaic to uniform spacing. If the mosaic has variable column spacing, it becomes uniform spacing with the specified spacing after this function.
dbSetMosaicName
Boolean
dbSetMosaicName( dbMosaicId mosaicId, String mosaicName );
dbSetMosaicType
Boolean
dbSetMosaicType( dbMosaicId mosaicId, dbMosaicType mosaicType );
Lets you change the type of a mosaic. Before changing the type, this function checks the tile array of the mosaic to verify whether or not the mosaic can be changed to the type specified. For example, a row-biased array cannot be changed to a regular mosaic if the tile array contains dbcGoLeftIcon or dbcPaddingIcon.
dbSetMosaicTileArray
Boolean
dbSetMosaicTileArray( dbMosaicId mosaicId, dbMosaicTile tileArray, dbMosaicType mosaicType );
Replaces the tile array with the new tile array if it satisfies the type specified. The size of the tile array must be equal to the number of rows times the number of columns of the mosaic.
dbSetMosaicInstMaster
Boolean
dbSetMosaicInstMaster( dbInstId mosaicInstId, dbCellViewId masterId );
Changes the master of the mosaicInst to the one specified by masterId.
dbSetMosaicSize
Boolean
dbSetMosaicSize( dbMosaicId mosaicId, unsigned int rows, unsigned int columns );
Changes the number of rows and columns of the mosaic to the specified values. The size of the tile array is decreased or increased to reflect the new size. The tile array is decreased by eliminating the top-most rows or the right-most columns of the array. It is increased by adding rows at the top of the array or columns at the right of the array. The newly added rows or columns contain empty cells.
dbSetMosaicOrigin
Boolean
dbSetMosaicOrigin( dbMosaicId mosaicId, dbPoint origin );
Changes the origin of the array.
Mosaic and Mosaic Instance Information Retrieval
The following CDBA functions retrieve information about mosaics and mosaic instances.
dbGetMosaicType
dbMosaicType
dbGetMosaicType( dbMosaicId mosaicId );
dbGetMosaicTileArray
Boolean
dbGetMosaicTileArray( dbMosaicId mosaicId, dbMosaicTile pTileArray );
The tile array of the mosaic is put in TileArray, which must be allocated before the call. The size of TileArray must match the size of the mosaic.
dbGetMosaicOrigin
dbPoint
dbGetMosaicOrigin( dbMosaicId mosaicId );
Returns the origin of the mosaic.
dbGetMosaicName
String
dbGetMosaicName( dbMosaicId mosaicId );
Returns the name of the mosaic as a permanent string.
dbGetMosaicSize
Boolean
dbGetMosaicSize( dbMosaicId mosaicId, unsigned short pRows, unsigned short pColumns );
Returns the size (number of rows and columns) of the mosaic.
dbGetMosaicNumInst
unsigned short
dbGetMosaicNumInst( dbMosaicId mosaicId );
Returns the number of rows in the specifed mosaic.
dbGetMosaicNumRows
unsigned int
dbGetMosaicNumRows(
dbMosaicId mosaicId
);
Description
Returns the number of rows in the specified mosaic.
Arguments
Return Value
dbGetMosaicNumColumns
unsigned int
dbGetMosaicNumColumns(
dbMosaicId mosaicId
);
Returns the number of columns in the specified mosaic.
Arguments
Return Value
dbGetMosaicMaxExt
dbDistance
dbGetMosaicMaxExt( dbMosaicId mosaicId );
Returns the maximum extension attribute of the mosaic.
dbGetMosaicMasterIcon
dbCellViewId
dbGetMosaicMasterIcon( dbMosaicId mosaicId, dbIcon icon );
Returns the master cellview of the mosaicInst, represented by the given icon.
dbGetMosaicByName
dbMosaicId
dbGetMosaicByName( dbCellViewId cellViewId, String name );
Returns a mosaic specified by the name in the cellview. If there is no mosaic with that name, it returns NULL.
dbGetMosaicOutline
dbBBox *
dbGetMosaicOutline( dbMosaicId mosaicId );
Returns the outline bounding box of the mosaic.
dbGetMosaicBBox
dbBBox *
dbGetMosaicBBox( dbMosaicId mosaicId );
Returns the bounding box of the mosaic.
dbGetMosaicInstMosaic
dbMosaicId
dbGetMosaicInstMosaic( dbMosaicInstId mosaicInstId );
Returns the mosaic that mosaicInstId belongs to.
dbGetMosaicInstIcon
dbIcon
dbGetMosaicInstIcon( dbMosaicInstId mosaicInstId );
Returns the icon that represents mosaicInst in the master list of the mosaic.
dbGetMosaicInstBBox
dbBBox *
dbGetMosaicInstBBox( dbMosaicInstId mosaicInstId, unsigned short col, unsigned short row );
Returns the bBox of mosaicInst located in the col column and row row. The col or row specified starts from zero and ends at one less than the number of columns or rows of the mosaic.
dbGetMosaicInstTransform
dbTransform *
dbGetMosaicInstTransform( dbMosaicInstId mosaicInstId, unsigned short col, unsigned short row );
Returns the transformation of the mosaicInst located in the col column and row row. The col or row specified starts from zero and ends at one less than the number of columns or rows of the mosaic.
dbGetRowOffsetByIndex
dbDistance
dbGetRowOffsetByIndex( dbMosaicId mosaicId, int index );
Returns the offset of the row specified by index.
dbGetColumnOffsetByIndex
dbDistance
dbGetColumnOffsetByIndex( dbMosaicId mosaicId, int index );
Returns the offset of the column specified by index.
dbGetRowOffset
dbDistance *
dbGetRowOffset( dbMosaicId mosaicId );
Returns the row offset as a dbDistance array. The array is allocated in a temporary buffer that is valid only until the next database call.
dbGetColumnOffset
dbDistance *
dbGetColumnOffset( dbMosaicId mosaicId );
Returns the column offset as a dbDistance array. The array is allocated in a temporary buffer that is valid only until the next database call.
dbGetSimpleMosaicSpacing
Boolean
dbGetSimpleMosaicSpacing( dbMosaicId mosaicId, dbDistance pXSpacing, dbDistance pYSpacing );
Returns the column spacing in XSpacing and row spacing in YSpacing.
dbGetUniformRowSpacing
dbDistance
dbGetUniformRowSpacing( dbMosaicId mosaicId );
Returns the row spacing if the mosaic has uniform spacing.
dbGetUniformColumnSpacing
dbDistance
dbGetUniformColumnSpacing( dbMosaicId mosaicId );
Returns the column spacing if the mosaic has uniform spacing.
dbAllocMosaicTileArray
dbMosaicTile **
dbAllocMosaicTileArray( unsigned short rows, unsigned short columns );
Allocates a tile array of the specified size.
dbFreeMosaicTileArray
Boolean
dbFreeMosaicTileArray( dbMosaicTile tileArray, unsigned short rows, unsigned short columns );
Frees a tile array allocated by dbAllocMosaicTileArray. The size of the specified tileArray must match the specified size.
Boolean Predicate Retrieval Functions
The following CDBA functions return values of TRUE or FALSE in response to queries about mosaics.
dbIsColumnSpacingUniform
Boolean
dbIsColumnSpacingUniform( dbMosaicId mosaicId );
Returns TRUE if the mosaic column spacing is uniform.
dbIsRowSpacingUniform
Boolean
dbIsRowSpacingUniform( dbMosaicId mosaicId );
Returns TRUE if the mosaic row spacing is uniform.
dbIsSimpleMosaic
Boolean
dbIsSimpleMosaic( dbMosaicId mosaicId );
Returns TRUE if the mosaic is a simple mosaic.
dbHasMosaic
Boolean
dbHasMosaic( dbCellViewId cellViewId );
Returns TRUE if there is a mosaic in the cellview.
Traversal and Generator Functions
The following CDBA functions traverse the hierarchy to generate mosaics, instances in a mosaic, and information on elements stored in mosaics.
dbStartGenMosaic
dbGenStateId
dbStartGenMosaic( dbCellViewId cellViewId );
Starts the generator for all mosaics in a cellview.
dbGenMosaic
Boolean
dbGenMosaic( dbGenStateId pState, dbMosaicId pMosaicId );
Generates mosaics contained in a cellview.
dbStartGenMosaicToMosaicInst
dbGenStateId
dbStartGenMosaicToMosaicInst( dbMosaicId mosaicId );
Starts the generator for all instances in a mosaic.
dbGenMosaicToMosaicInst
Boolean
dbGenMosaicToMosaicInst( dbGenStateId pState, dbMosaicInstId pMosaicInstId, dbIcon pIcon );
Generates instances contained in a mosaic. In a simple mosaic, only one instance is returned. Because this instance is repeated many times over the entire mosaic, it is a mosaicInst. Its location, orientation, and bounding box are not meaningful.
The Icon part of the name typically indicates the blank character for a simple mosaic. In a complicated mosaic created by the Structure Compiler, Icon is the ASCII character used in the tile array file representing this master.
dbStartGenMosaicToElementInfo
dbGenStateId
dbStartGenMosaicToElementInfo( dbMosaicId mosaicId );
Starts the generator for all element information stored in a mosaic.
dbGenMosaicToElementInfo
Boolean
dbGenMosaicToElementInfo( dbGenStateId pState, dbCellViewId pMasterId, dbIcon pIcon, dbPoint pLocation, dbOrient pOrientation, dbBBox pBBox );
Generates element information stored in a mosaic. The data returned can create an instance at the same location as the element in the mosaic.
Guides
This section describes functions affecting Guide objects.
About Guides
A guide is a design object. It corresponds to the OpenAccess oaGuide object.
A guide specifies a connection between two objects that are intended to be wired together. You can use guides when you know the branching of a wire into segments for each end point and/or the layer constraints, but before you know the detailed location of the wiring.
Routing nets usually replaces guides with wires, or routes. Guides qualify as route objects, so you can add guides to routes.
The following definition applies to guides.
typedef cdsBaseIdType dbGuideId;
dbIsGuideId
Boolean
dbIsGuideId( dbId guideId );
Description
Verifies that the guideId is a guide object.
Arguments
Return Values
dbCreateGuide
dbGuideId
dbCreateGuide( dbCellViewId cvId, dbPoint startPoint, dbPoint endPoint, dbLayer startLayerNum, dbLayer endLayerNum );
Description
Creates a guide in the specified cellview with the specified attributes.
Arguments
Return Values
dbDeleteGuide
Boolean
dbDeleteGuide( dbGuideId guideId );
Description
Deletes the guideId from the database.
Arguments
Return Values
dbGetGuidePoints
Boolean
dbGetGuidePoints( dbGuideId guideId, dbPoint *startPoint, dbPoint *endPoint );
Description
Obtains the start point and the end point of the guide in the specified dbPoint parameters.
Arguments
Return Values
|
TRUE if the points are returned successfully. |
dbSetGuidePoints
Boolean
dbSetGuidePoints( dbGuideId guideId, dbPoint startPoint, dbPoint endPoint );
Description
Changes the start and end points of the guide.
Arguments
Return Values
|
TRUE if the new points are set successfully. |
dbGetGuideRoute
dbRouteId
dbGetGuideRoute( dbGuideId guideId );
Description
Obtains the route to which the guide is attached.
Arguments
Return Values
|
The route to which the guide is attached. If no route has been specified, NULL is returned. |
dbIsGuideFollowLayers
Boolean
dbIsGuideFollowLayers( dbGuideId guideId );
Description
Indicates whether routing must follow the guide layers when attempting to replace this guide with physical routing.
Arguments
Return Values
|
TRUE if following the guide layers is mandatory. |
dbSetGuideFollowLayers
Boolean
dbSetGuideFollowLayers( dbGuideId guideId, Boolean followLayer );
Description
Changes the followLayer attribute to specify whether routing must follow the guide layers.
Arguments
|
The attribute specifying whether routing must follow the guide layers. |
Return Values
|
TRUE if the setting operation is successful. |
dbStartGenGuide
dbGenStateId
dbStartGenGuide( dbCellViewId cellViewId );
Description
Starts guide generation in the cellview. Works in conjunction with dbGenGuide.
Arguments
Return Values
dbGenGuide
Boolean
dbGenGuide( dbGenStateId pState, dbGuideId *pGuideId );
Description
Generates the guides in the cellview. Works in conjunction with dbStartGenGuide.
Arguments
Return Values
pathSegs
This section describes functions affecting pathSeg objects.
About pathSeg objects
A pathSeg object represents a 2-point routing segment. Each point has the following associated characteristics.
The oaPathSeg class derives from the oaShape class.
typedef cdsBaseIdType dbPathSegId;
typedef enum dbEndStyle {
dbcUnknownEndStyle = 0,
dbcTruncateEndStyle = 1,
dbcExtendEndStyle = 2,
dbcVariableEndStyle = 3,
dbcChamferEndStyle = 4,
dbcCustomEndStyle = 5
} dbEndStyle;
The dbSegStyle structure corresponds to the OpenAccess oaSegStyle class. The dbSegStyle structure has information about width, beginStyle, endStyle, beginExtension, and endExtension.
typedef struct dbSegStyle {
unsigned int width;
dbBeginStyle beginStyle;
dbEndStyle endStyle;
unsigned int beginExt;
unsigned int endExt;
unsigned int beginLeftDiagExt;
unsigned int beginRightDiagExt;
unsigned int beginRightHalfWidth;
unsigned int endLeftDiagExt;
unsigned int endRightDiagExt;
unsigned int endRightHalfWidth;
}
The following definition applies to dbPathSegRec.
typedef struct dbPathSegRec {
dbType type;
dbPathSegId pathSegId;
size_t size;
dbCellViewId cellViewId;
dbNetId net;
dbPinId pin;
dbBBox bBox;
dbLayer layerNum;
dbPurpose purposeNum;
dbPoint beginPt;
dbPoint endPt;
dbRouteId route;
dbSegStyle *style;
} dbPathSegRec;
dbIsPathSegId
Boolean
dbIsPathSegId( dbPathSegId pathSegId );
Description
Verifies that the pathSegID is a pathSeg object.
Arguments
Return Values
|
TRUE if the pathSegID is a pathSeg object. |
dbCreatePathSeg
dbPathSegId
dbCreatePathSeg( dbCellViewId cvId, dbLayer layerNum, dbPurpose purposeNum, dbPoint beginPoint, dbPoint endPoint, const dbSegStyle *segStyle );
Description
Creates a pathSeg in the design with the specified parameters.
Arguments
Return Values
dbDeletePathSeg
Boolean
dbDeletePathSeg( dbPathSegId pathSegId );
Description
Deletes the pathSegId from the database.
Arguments
Return Values
dbConvertPathSegToPolygon
dbPolygonId
dbConvertPathSegToPolygon( dbPathSegId pathSegId );
Description
Converts the pathSeg to a polygon. If the conversion fails, the function returns a NULL pointer.
Arguments
Return Values
dbGetPathSegPoints
Boolean
dbGetPathSegPoints( dbPathSegId pathSegId, dbPoint* beginPoint, dbPoint* endPoint );
Description
Obtains the beginning and ending points of the segment.
Arguments
Return Values
|
TRUE if the points are obtained successfully. |
dbGetPathSegBoundary
Boolean
dbGetPathSegBoundary( dbPathSegId pathSegId, unsigned int* numPoints, dbPoint** pointArray );
Description
Obtains the boundary points of the segment.
Arguments
Return Values
|
TRUE if the boundary is obtained successfully. |
dbGetPathSegRecBoundary
Boolean
dbGetPathSegRecBoundary( dbPathSegRec *rec, unsigned int* numPoints, dbPoint** pointArray );
Description
Obtains the boundary points of the segment described in the dbPathSegRec structure.
Arguments
Return Values
|
TRUE if the boundary is obtained successfully. |
dbGetPathSegStyle
Boolean
dbGetPathSegStyle( dbPathSegId pathSegId, dbSegStyle *style );
Description
Obtains the segStyle of the pathSeg.
Arguments
dbGetPathSegRouteTopology
dbRouteTopology
dbGetPathSegRouteTopology( dbPathSegId pathSegId );
Description
Obtains the route topology of the segment.
Arguments
Return Values
dbIsPathSegOrthogonal
Boolean
dbIsPathSegOrthogonal( dbPathSegId pathSegId );
Description
Determines if the pathSeg is orthogonal.
Arguments
Return Values
dbSetPathSegPoints
Boolean
dbSetPathSegPoints( dbPathSegId pathSegId, dbPoint beginPoint, dbPoint endPoint );
Description
Updates the beginning and ending points of the segment.
Arguments
Return Values
|
TRUE if the ending points update successfully. |
dbSetPathSegStyle
Boolean
dbSetPathSegStyle( dbPathSegId pathSegId, const dbSegStyle *segStyle );
Description
Sets the segStyle of the segment.
Arguments
|
Pointer to the dbSegStyle structure. The structure corresponds to the oaSegStyle class. |
Return Values
|
TRUE if the segStyle is set successfully. |
dbSetPathSegTopology
Boolean
dbSetPathSegTopology( dbPathSegId pathSegId, dbRouteTopology routeTopology );
Description
Sets the route topology of the segment to the specified topology.
Arguments
Return Values
dbGetPathSegRoute
dbRouteId
dbGetPathSegRoute( dbPathSegId pathSegId );
Description
Obtains the route of the path segment.
Arguments
Return Values
Vias
This section describes functions affecting Via objects.
About Vias
A via is a design object. It corresponds to the OpenAccess oaVia object.
A via represents a physical connection between two adjacent physical objects, such as path segments, that exist on two different layers. A via references a via definition, the oaViaDef, from the technology database that corresponds to the design.
There are two types of vias, standard vias and custom vias. A standard via has a predefined set of via parameters. You can tailor the parameters to create a variety of vias that apply to a variety of connections. A standard via references a standard via definition.
A custom via is similar to an instance in that the custom via definition references another design. Custom vias often include a set of parameter values, so you can tailor the master via for each specific via.
Commonly, a via is associated with routes, although a via can represent a pin figure.
Vias always have a viaHeader which contains the attributes that are common to all vias of a specific via definition.
The following definitions apply to vias.
typedef cdsBaseIdType dbViaId;
typedef enum dbRouteStatus {
dbcUnknownRouteStatus = 0,
dbcNormalRouteStatus = 1,
dbcFixedRouteStatus = 2,
dbcLockedRouteStatus = 3
} dbRouteStatus;
typedef enum dbRouteTopology {
dbcUnknownRouteTopology = 0,
dbcNoneRouteTopology = 1
dbcStripeRouteTopology = 2,
dbcStandardCellWireRouteTopology = 3,
dbcIOWireRouteTopology = 4,
dbcBlockWireRouteTopology = 5,
dbcRingRouteTopology = 6,
dbcPadRingRouteTopology = 7,
dbcBlockRingRouteTopology = 8,
dbcCoreWireRouteTopology = 9
} dbRouteTopology;
typedef enum dbViaDirection {
dbcLayer1ToLayer2Direction = 0,
dbcLayer2ToLayer1Direction = 1
} dbViaDirection;
The following definition applies to dbViaRec.
typedef struct dbViaRec {
dbType type;
dbViaId viaId;
dbBBox bBox;
dbCellViewId cellViewId;
} dbViaRec;
dbIsViaId
Boolean
dbIsViaId( dbId viaId );
Description
Verifies that the viaId is a via object. The via object can be either a standard or custom via.
Arguments
Return Values
|
TRUE if the viaId is a via object. |
dbDeleteVia
Boolean
dbDeleteVia( dbViaId viaId );
Description
Deletes the viaId from the database.
Arguments
Return Values
dbGetViaViaHeader
dbViaHeaderId
dbGetViaViaHeader( dbViaId viaId );
Description
Returns the viaHeader associated with the via. The viaHeader includes the attributes that are common to all vias of the particular via definition.
For vias of via definitions that have parameters, the function returns the via subheader.
Arguments
Return Values
dbGetViaViaDef
techViaDefId
dbGetViaViaDef( dbViaId viaId );
Description
Returns the via definition associated with the viaId.
Arguments
Return Values
dbGetViaViaDefName
String
dbGetViaViaDefName( dbViaId viaId );
Description
Returns the name of the via definition associated with the viaId.
Arguments
Return Values
|
The name of the via definition associated with the via. Returns a null string if unable to obtain the name of the via definition. |
dbGetViaRoute
dbRouteId
dbGetViaRoute( dbViaId viaId );
Description
Returns the route to which the viaId belongs, if any.
Arguments
Return Values
dbGetViaRouteStatus
dbRouteStatus
dbGetViaRouteStatus( dbViaId viaId );
Description
Returns the current route status of the viaId.
Arguments
Return Values
|
Returns the enum value of the route status. The enum values are the following. |
dbGetViaDirection
dbViaDirection
dbGetViaDirection( dbViaId viaId );
Description
Returns the routing direction of the viaId.
Arguments
Return Values
|
The routing direction of the via object. The values are the following. |
dbSetViaRouteStatus
Boolean
dbSetViaRouteStatus( dbViaId viaId, dbRouteStatus routeStatus );
Description
Sets the routing status of the viaId.
Arguments
|
The enum value of the route status. The enum values are the following. |
Return Values
|
TRUE if the routing status is set successfully. |
dbSetViaDirection
Boolean
dbSetViaDirection( dbViaId viaId, dbViaDirection viaDirection );
Description
Sets the routing direction of the viaId.
Arguments
|
The routing direction of the via object. The values are the following. |
Return Values
|
TRUE if the routing direction is set successfully. |
dbStartGenViaHeaderToVia
dbGenStateId
dbStartGenViaHeaderToVia( dbViaHeaderId viaHeaderId );
Description
Starts via generation for the specified via header. Works in conjunction with function dbGenViaHeaderToVia.
Arguments
Return Values
|
The identifier used to track the state of via generation for the specified header. |
dbGenViaHeaderToVia
Boolean
dbGenViaHeaderToHeader( dbGenStateId pState, dbViaId *pviaId );
Description
Generates the vias. Works in conjunction with function dbStartGenViaHeaderToVia.
Arguments
Return Values
|
TRUE if the vias successfully generate. |
dbIsCustomViaId
Boolean
dbIsCustomViaId( dbId viaId );
Description
Verifies that the given viaId is a custom via object.
Arguments
Return Values
|
TRUE if the viaId refers to a custom via object. |
dbCreateCustomVia
dbViaId
dbCreateCustomVia( dbCellViewId cvId, techViaDefId viaDefId, dbTransform transform, unsigned int numParams, const dbParamRec* params );
Description
Arguments
Return Values
dbGetCustomViaParams
Boolean
dbGetCustomViaParams( dbViaId viaId unsigned int* numParams, dbParamRec** params );
Description
Returns the custom via parameters for the custom via.
Arguments
Return Values
|
TRUE if the custom via parameters are successfully obtained. |
dbSetCustomViaParams
Boolean
dbSetCustomViaParams( dbViaId viaId unsigned int numParams, const dbParamRec* params );
Description
Sets the custom via parameters for the custom via.
Arguments
Return Values
|
TRUE if the parameters are set successfully. |
dbIsStdViaId
Boolean
dbIsStdViaId( dbId viaId );
Description
Verifies that the viaId is a standard via object.
Arguments
Return Values
|
TRUE if the viaId refers to a standard via object. |
dbCreateStdVia
dbViaId
dbCreateStdVia( dbCellViewId cvId, techViaDefId viaDefId, dbTransform transform, unsigned int numParams, const dbViaParam *viaParam );
Description
Arguments
Return Values
Example
The following are examples of creating a standard via and setting parameters of a standard via.
Boolean setStdViaParams(dbViaId viaId) { const dbViaParam *viaParams = dbGetStdViaViaParam(viaId); dbStdViaParams* stdViaParams = dbGetViaParamStdViaParams((dbViaParam*)viaParams); //Set via parameter with dbUnit. Not userUnit. stdViaParams->layer1Enc.x = 60; stdViaParams->layer1Enc.y = 6; dbSetStdViaParamDefault(viaParams, dbcLayer1EncViaParamType, FALSE); stdViaParams->cutWidth = stdViaParams->cutHeight = 310; dbSetStdViaParamDefault(viaParams, dbcCutWidthViaParamType, FALSE); dbSetStdViaParamDefault(viaParams, dbcCutHeightViaParamType, FALSE); stdViaParams->cutRows = stdViaParams->cutColumns = 2; dbSetStdViaParamDefault(viaParams, dbcCutRowsViaParamType, FALSE); dbSetStdViaParamDefault(viaParams, dbcCutColumnsViaParamType, FALSE); if (!dbSetStdViaParam(viaId, (dbViaParam *)viaParams)) return error("setStdViaParams: Failed to set via params to a stdVia.\n"); return TRUE; } Boolean createVia(void) { dbCellViewId cellView;
const oaString testLibName = getLibName();
cellview = dbOpenCellViewByType(testLibName, "Atop", "layout",
"maskLayout", "w", NULL);
techFileId tfId = techGetCellViewTechFile(topRep);
techViaDefId viaDef1 = techFindViaDefByName(tfId, "M2xM1xG");
dbViaId via1_id = dbCreateStdVia(cellview, viaDef1, dbvIdentTransform, NULL);
// Creates a stdVia with a specified viaParam.
dbViaParam *viaParam = techGetStdViaDefParams(viaDef1);
// Sets cutWidth to its default value 0.13 but turns its defFlag bit on.
// Supposely dbCreateStdVia() should create a stdVia with setDefault for
cutWidth.
dbStdViaParams *stdViaParam = dbGetViaParamStdViaParams(viaParam);
stdViaParam->cutWidth = 130;
dbSetStdViaParamDefault(viaParam, dbcCutWidthViaParamType, FALSE);
stdViaParam->cutRows = 2;
dbSetStdViaParamDefault(viaParam, dbcCutRowsViaParamType, FALSE);
dbViaId via2_id = dbCreateStdVia(cellview, viaDef1, dbvIdentTransform, viaParam);
const dbViaParam *viaParam_2 = dbGetStdViaViaParam(via2_id);
stdViaParam = dbGetViaParamStdViaParams((dbViaParam *) viaParam_2);
if (!dbHasStdViaParamDefault(viaParam_2, dbcCutColumnsViaParamType)) return error("cutColumns should be setDefault for via2_id.\n");
if (!dbHasStdViaParamDefault(viaParam_5, dbcCutWidthViaParamType)) return error("cutWidth should setDefault for via2_id.\n");
if (stdViaParam->cutWidth != 130)
return error("The value of cutWidth of stdVia_2 is not 0.13(default).\n");
// To modify a placed stdVia with a non-default parameter value.
if (!setStdViaParams(via1_id))
return error("Failed to set partameters for stdVia(M4xM3xG).\n");
dbSave(cellview);
dbClose(cellview);
return TRUE;
dbGetStdViaViaParam
dbViaParam*
dbGetStdViaViaParam ( dbViaId viaId* );
Description
Returns the standard via parameters for the standard via.
Arguments
Return Values
dbSetStdViaParam
Boolean
dbSetStdViaParam dbViaId viaId< const dbViaParam *viaParam );
Description
Sets the standard via parameters for the standard via.
Arguments
Return Values
|
TRUE if the parameters are set successfully. |
Example
See dbCreateStdVia.
Routes
This section describes functions affecting Route objects.
About Routes
A route represents a connection between two points. The connection can be logical, physical, or both. Each route can contain representations of the objects to which it connects.
A route can include multiple segments and vias, but a route cannot include a branch. A net with branching is represented by multiple routes. When a route encounters a branching point, a Steiner object represents the connection point at the branch. A Steiner object collects all the routes ending at the branch. It provides a way to traverse a set of routes through their connections.
The objects that support routes include pathSeg, customVia and stdVia, and Guide objects.
The following definition applies to routes.
typedef cdsBaseIdType dbRouteId;
dbIsRouteId
Boolean
dbIsRouteId( dbId objId );
Description
Verifies that the objId is a route object.
Arguments
Return Values
dbCreateRoute
dbRouteId
dbCreateRoute( dbCellViewId cvId, dbNetId netId, Boolean isGlobal, dbRouteStatus status );
Description
Creates a route in the specified cellview with the specified attributes.
The function throws an exception if you specify a net from another cellview.
Arguments
|
The enum value of the route status. The enum values are the following. |
Return Values
dbDeleteRoute
Boolean
dbDeleteRoute( dbRouteId routeId );
Description
Deletes the routeId from the database.
Arguments
Return Values
dbGetRouteObjects
Boolean
dbGetRouteObjects( dbRouteId routeId, unsigned int* numObjects, dbId** routeObjects );
Description
Returns the objects of the route in a dbId array.
Arguments
Return Values
|
TRUE if the route objects are returned successfully. |
dbGetRouteNumObjects
unsigned int
dbGetRouteNumObjects( dbRouteId routeId );
Description
Obtains the number of routing objects in the route. Routing objects can include guide, pathSeg, customVia, and stdVia objects.
Arguments
Return Values
dbGetRouteStatus
dbRouteStatus
dbGetRouteStatus( dbRouteId routeId );
Description
Obtains the route status of the route.
Arguments
Return Values
|
The enum value of the route status. The enum values are the following. |
dbGetRouteStartConn
dbId
dbGetRouteStartConn( dbRouteId routeId );
Description
Obtains the identifier of the connection object at which the route starts.
Arguments
Return Values
|
The database identifier of the object at which the route starts. |
dbGetRouteEndConn
dbId
dbGetRouteEndConn( dbRouteId routeId );
Description
Obtains the identifier of the connection object at which the route ends.
Arguments
Return Values
|
The database identifier of the object at which the route ends. |
dbIsRouteGlobal
Boolean
dbIsRouteGlobal( dbRouteId routeId );
Description
Verifies whether the route is a global route.
Arguments
Return Values
|
TRUE if the route is marked as a global route. |
dbIsRouteHasGuide
Boolean
dbIsRouteHasGuide ( dbRouteId routeId );
Description
Verifies whether the route contains one or more guides.
Arguments
Return Values
|
TRUE if the route contains one or more guides. |
dbIsRouteContiguous
Boolean
dbIsRouteContiguous( dbRouteId routeId );
Description
Verifies whether all objects in the route are contiguous. Route objects are pathSegs, vias, and guides.
A route can span multiple layers. So, the function determines contiguity based on the point at which each route object connects to the adjacent route object and the layer on which each connects. A route is contiguous if the end point of each object matches the beginning point of the adjacent object and the two points are on the same layer.
For vias, the via origin is both the beginning point and the ending point. The via direction determines the layer. For example, a via direction is set to oacLayer1ToLayer2ViaDirection. Layer1 must match the object before the via. Layer2 must match the object after the via.
For guides with no specified starting or ending layer, the function assumes the start/end layer matches any layer specified for the adjacent object.
Arguments
Return Values
|
TRUE if all objects in the route are contiguous. The function returns TRUE for single-object routes and returns FALSE for zero-object or empty routes. |
dbSetRouteStatus
Boolean
dbSetRouteStatus( dbRouteId routeId, dbRouteStatus routeStatus );
Description
Sets the route status for the specified route.
Arguments
|
The enum value of the route status. The enum values are the following. |
Return Values
|
TRUE if the route status is set successfully. |
dbSetRouteObjects
Boolean
dbSetRouteObjects( dbRouteId routeId, unsigned int numObjects, dbId* routeObjects );
Description
Updates the route by replacing the existing route objects with new route objects specified in the routeObjects array.
Arguments
Return Values
|
TRUE if the new route objects are passed in successfully. |
dbSetRouteGlobal
Boolean
dbSetRouteGlobal( dbRouteId routeId, Boolean global );
Description
Sets or resets the global attribute of the route.
Arguments
Return Values
|
TRUE if the |
dbSetRouteStartConn
Boolean
dbSetRouteStartConn( dbRouteId routeId, dbId objectId );
Description
Connects the specified object to the starting point of the specified route. If the route already has a starting connection object, the route is disconnected first then connected to the specified object.
Arguments
Return Values
|
TRUE if the object connects successfully. |
dbSetRouteEndConn
Boolean
dbSetRouteEndConn( dbRouteId routeId, dbId objectId );
Description
Connects the specified object to the ending point of the specified route. If the route already has an ending connection object, the route is disconnected first then connected to the specified object.
Arguments
Return Values
|
TRUE if the object connects successfully. |
dbUnsetRouteStartConn
Boolean
dbUnsetRouteStartConn( dbRouteId routeId );
Description
Disconnects the route from its starting connection object.
Arguments
Return Values
|
TRUE if the route disconnects successfully. |
dbUnsetRouteEndConn
Boolean
dbUnsetRouteEndConn( dbRouteId routeId );
Description
Disconnects the route from its ending connection object.
Arguments
Return Values
|
TRUE if the route disconnects successfully. |
dbGetNumRoutes
unsigned int* numRoutes
dbGetNumRoutes( dbCellViewId cvId, );
Description
Obtains the number of routes in the cellview.
Arguments
Return Values
dbStartGenRoute
dbGenStateId
dbStartGenRoute( dbCellViewId cvId );
Description
Starts generating all the routes in the cellview. Works in conjunction with function dbGenRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation in the cellview. |
dbGenRoute
Boolean
dbGenRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes in the cellview. Works in conjunction with function dbStartGenRoute.
Arguments
|
The identifier used to track the state of route generation in the cellview. |
|
Return Values
|
TRUE if the routes generate successfully. |
dbStartGenNetToRoute
dbGenStateId
dbStartGenNetToRoute( dbNetId netId );
Description
Starts generating all the routes for the net. Works in conjunction with function dbGenNetToRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation for the net. |
dbGenNetToRoute
Boolean
dbGenNetToRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes for the net. Works in conjunction with function dbStartGenNetToRoute.
Arguments
|
The identifier used to track the state of route generation for the net. |
|
Return Values
|
TRUE if the routes generate successfully. |
dbStartGenShapeToConnRoute
dbGenStateId
dbStartGenShapeToConnRoute( dbShapeId shapeId );
Description
Starts generating all the routes that connect to the shape. Works in conjunction with function dbGenShapeToConnRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation for the shape. |
dbGenShapeToConnRoute
Boolean
dbGenShapeToConnRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes that connect to the shape. Works in conjunction with function dbStartGenShapeToConnRoute.
Arguments
|
The identifier used to track the state of route generation for the shape. |
|
Return Values
|
TRUE if the routes generate successfully. |
dbStartGenPinToConnRoute
dbGenStateId
dbStartGenPinToConnRoute( dbPinId pinId );
Description
Starts generating all the routes that connect to the pin. Works in conjunction with function dbGenPinToConnRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation for the pin. |
dbGenPinToConnRoute
Boolean
dbGenPinToConnRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes that connect to the pin. Works in conjunction with function dbStartGenPinToConnRoute.
Arguments
|
The identifier used to track the state of route generation for the pin. |
|
Return Values
|
TRUE if the routes generate successfully. |
dbStartGenTermToConnRoute
dbGenStateId
dbStartGenTermToConnRoute( dbTermId termId );
Description
Starts generating all the routes that connect to the term. Works in conjunction with function dbGenTermToConnRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation for the term. |
dbGenTermToConnRoute
Boolean
dbGenTermToConnRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes that connect to the term. Works in conjunction with function dbStartGenTermToConnRoute.
Arguments
|
The identifier used to track the state of route generation for the term. |
|
Return Values
|
TRUE if the routes generate successfully. |
dbStartGenInstTermToConnRoute
dbGenStateId
dbStartGenInstTermToConnRoute( dbInstTermId instTermId );
Description
Starts generating all the routes that connect to the instTerm. Works in conjunction with function dbGenInstTermToConnRoute.
Arguments
Return Values
|
The identifier used to track the state of route generation for the instTerm. |
dbGenInstTermToConnRoute
Boolean
dbGenInstTermToConnRoute( dbGenStateId pState, dbRouteId* routeId );
Description
Generates all the routes that connect to the instTerm. Works in conjunction with function dbStartGenInstTermToConnRoute.
Arguments
|
The identifier used to track the state of route generation for the instTerm. |
|
Return Values
|
TRUE if the routes generate successfully. |
CDBA Connectivity Functions
Connectivity is the logical and physical connection of signals in one cellview to signals in other cellviews. This chapter defines objects, relationships, and attributes that implement logical and physical connectivity and that are accessible through the programming interface. In addition, it describes the rules of use and limitations imposed by the current implementation.
The following sections further define the concepts involved in connectivity and describe the relationships between these concepts in more detail.
- Object Classes and Their Members
- Figures
- Connections in Cellviews
- Any Instance
- Nets
- Signals
- Terminals
- Instance Terminals
- Pins
- BusDef and BitOrder
- Cellview Information
- Equivalent Connectivity Time Functions
- Net and Terminal Name Syntax
- Name and Vector Expression Expansion
- Automatic Database Deletions
- Constraints on Database Objects
- Restrictions to the Interface
- Connectivity Example Function
Object Classes and Their Members
An object class is a data type abstraction that groups distinct but related objects into a class (an array) according to the attributes or common generators that the objects share. Example object classes are geometric shapes, instances, and figures.
The following table shows the enumerated constants and ID types associated with each object class used in connectivity.
| Name | Enumerated constant | ID type |
|---|---|---|
A member is a specific object in an array of objects. Examples of object members include member nets, member instances, member connections (connected instance terminals), and member terminals.
When used in a function name, the mem part implies the presence of an ID and an integer index that specifies which member of the object array (counting from the left-most member) is under consideration.
For each member, the index is zero-based, starting with the left-most member when the list of objects is expanded. The left-most bit is commonly used as the most significant bit when the data on a bus is treated as a number.
Figures
A figure is a class of database objects, including instances and geometric shapes, that are accessible from nets or pins. Figures are the geometries or instances that implement a net or pin. A net without figures is invisible when viewed with the graphics editor. A pin cannot exist without a figure. A figure is represented in a name by the fig part.
Connections in Cellviews
A terminal on a cellview represents a net containing a single electrical signal or a group of electrical signals. Terminals and pins indicate which nets in a cellview are available for connection when an instance of a cellview is placed.
An instance terminal is an instance of a master terminal in a given cellview. When you place an instance of a cellview, you can connect a net to its corresponding instance terminal. The associated signals in this connection between the two cellviews start from the left-most bit.
Instance terminals and nets implement logical connections. Instance pins and nets implement physical connections.
A connected instance terminal is the logical connection between an instance, an instance terminal, and a net within a cellview, and between the two nets in the master and instance cellviews. The net, instance, and instance terminal objects are in the instance cellview, and the master terminal and its net are in the master cellview of the instance.
A connected instance pin is the physical connection between a net, an instance terminal, and a pin. The connection occurs where the instance is placed. The net connected to an instance terminal and the net connected to the associated instance pin must contain the same electrical signals.
Any Instance
The term any instance refers to a class of database objects that includes instances and mosaic instances. Any instance is represented in a name by the anyInst part of the name. When any type of instance appears, anyInst is used in the appropriate place. All types of instances must have unique names within any specified cellview.
A member instance refers to a specific member of an instance. When used in a function name, memInst implies the presence of an anyInstId and an integer index. The index specifies which member of the instance (starting from zero) is under consideration. A member instance is represented in a name by the memInst part of the name.
Instances
An instance is a database object that implies there is another cellview inside the cellview containing the instance. An instance has a particular location and orientation. The instance has a name, a type, and a list of connections. Each instance name in the cellview must be unique.
There is, at most, one connection on an instance for each terminal in the master cellview of the instance. In addition, instances are user-definable and have a purpose associated with them.
The integer attribute of an instance, called numInst, is the number of times the master of the instance is logically instantiated. When numInst is greater than one, the instance is essentially a vector of instances represented with one object. This is also called an iterated instance. Each connection of an iterated instance connects all bits for each terminal of all the implied instances of the iterated instance. There is, at most, one instance connected to a net or pin; nets and pins cannot support a vector of instances.
Functions Acting on Instances
The following functions act on instances.
dbGetMemInstName
String
dbGetMemInstName( dbAnyInstId anyInstId, int instIndex );
Returns the name of the member instance.
dbStartGenAnyInstToConn
dbGenStateId
dbStartGenAnyInstToConn( dbAnyInstId anyInstId );
Starts the generator for connected instance terminals attached to this instance, if any. One instance terminal on an iterated instance represents all instance terminals for the implied instances of the iterated instance.
dbGenAnyInstToConn
Boolean
dbGenAnyInstToConn( dbGenStateId state, dbInstTermId pInstTermId );
Generates connected instance terminals attached to this instance, if any. One instance terminal on an iterated instance represents all instance terminals for the implied instances of the iterated instance.
dbStartGenAnyInstToInstTerm
dbGenStateId
dbStartGenAnyInstToInstTerm( dbAnyInstId anyInstId );
Starts the generator for instance terminals (both connected and unconnected) for this instance, if any.
dbGenAnyInstToInstTerm
Boolean
dbGenAnyInstToInstTerm( dbGenStateId state, dbInstTermId pInstTermId );
Generates instance terminals (both connected and unconnected) for this instance, if any.
The following six functions for any instance are documented in “Instance and Hierarchy Functions”.
-
dbGetAnyInstName -
dbSetAnyInstName -
dbGetAnyInstBaseName -
dbSetAnyInstBaseName -
dbGetAnyInstNumInst -
dbSetAnyInstNumInst
Nets
A net is a database object representing the physical implementation of a single electrical signal or group of electrical signals. A net implements the connections to instance pins and to pins of the cellview containing the net. A net can have pins, terminals, instance terminals, internal geometries that implement connections, and instance pins associated with it.
Nets and Signals
A net has a name and a number of bits. When you explicitly list the names of the group members, the net name is formed that implements a group of signals. For example, a net with the name A, B, C contains three signals named A, B, and C, respectively. The same member can occur more than once. For example, a net A, B, A contains two signals named A and a signal named B.
A signal can also occur in more than one net; a signal can be physically implemented (or wired) by more than one net. For example, net A, B and net C, A are both implementing signal A. This signal is referred to as member index (or bit) zero and index one of nets A, B and C, A, respectively. Consequently, the term member net, represented in a name by the memNet part, is introduced to refer to a specific member of a net. When used in a function name, the memNet part implies the presence of a net ID and an integer index. The index specifies which bit of the net is under consideration, with index zero referring to the left-most bit.
Net Hierarchy
A net can also be hierarchical and have parent or child nets that represent the current status of the connectivity between these nets. The net hierarchy allows tools such as placement and routing and layout extraction to express a physically unrealized connection of two nets.
Parent and child relationships within a net hierarchy are conceptually different from parent and child relationships for figures. For details about parent and child relationships for figures, see “CDBA Figure Functions”.
The root net for a specified net is found by following the parent relationships upward until there is a net that has no parent. The root net for a net that has no parent is itself. Two nets are defined as logically equivalent if they have the same root net.
Net Names
A net name must be different from all other nets unless they have the same root net (that is, are logically equivalent). The names of all nets that share a common root net are aliases for that hierarchy of nets. The preferred name for that net is the name of the root net.
Connection Status
The status of connections can be retrieved from a net. The C data type for the constants is dbConnStatusType. The following table gives the values for connection status.
If a net is connected to one or more pins, it must have a terminal. Pins can connect to child nets of a specified net. However, a terminal must always refer to the root net for the child nets because the terminal can point to only one net.
The net connected to an instance pin can be either the same as, or a child of, the net connected to the corresponding instance terminal. An instance terminal must be logically connected to a net prior to connecting child nets to its instance pins.
Functions Acting on Nets
The following functions act on nets.
dbCreateNet
dbNetId
dbCreateNet( dbCellViewId cellViewId, String netName, dbNetId parentNetId );
Creates a new net in a cellview. If the net already exists, returns NULL.
To create a child net, the parentNetId object must not be nil. If netName is an empty string or nil, the name of the parent net is used. Also, the child net will have same number of bits as the parent net. If netName is specified, then it must imply the same number of bits as the parent net. Child nets do not have unique names in CDBA. A child net is always created even when other nets exist with the same name.
dbCreateNamedSubNet
dbNetId
dbCreateNamedSubNet( dbNetIdparentNetId, const char *subNetName);
Description
Creates a subnet with the specified name. The behavior is different from dbCreateNet because when a root net ID is specified. dbCreateNameSubNet creates a named oaScalarNet with the subnet name and associates it with the parent net.
The following restrictions apply:
- The specified parentNetId must be a single-bit net.
- The parentNetId must be a scalar net, which means that it cannot be a bus-bit name.
- The parentNetId cannot have any subnets with the specified subnet name.
- The subNetName must imply that it is a bit net.
- The block cannot have any nets with the specified subnet name.
|
Database ID of the root net with which the subnet will be associated. The parentNetId also provides the cellview in which the new net is created. |
|
Example
In the following example, generating nets in the cellview cvId creates the named nets a and sn2. Generating the subnets of net a creates named subnets sn1 and sn2.
dbNetId rootNet = dbCreateNet(cvId, "a");
dbNetId subNet1 = dbCreateNet(cvId, "sn1", rootNet);
dbNetId subNet2 = dbCreateNamedSubNet(rootNet, "sn2");
dbMakeNet
dbNetId
dbMakeNet( dbCellViewId cellViewId, String netName, dbNetId parentNetId );
These two functions create a net by name. The net name can imply that the net contains one or more bits. If the parentNetId is NULL and a topmost parent net of the specified name already exists, dbCreateNet returns NULL and dbMakeNet returns the net.
If the parentNetId is not NULL, the newly created net is placed as a child of the specified parent net. Child and parent nets can have different names, but they must imply the same number of bits. If the name for a child net is specified as NULL or an empty string, the name of the parent is used. Child and parent nets always refer to the same signals, but only topmost parent nets are listed as member nets and aliases of a signal.
dbCreateUniqueNamedNet
dbNetId
dbCreateUniqueNamedNet( dbCellViewId cellViewId, String prefix, int numBits );
Creates a new net with a unique name. If numBits is one, the name is made of prefix suffixed by a unique number. If numBits is greater than one, the name is further suffixed by <0:numBits-1>. If numBits is less than negative one, the name is suffixed by <-numBits-1:0>.
Examples
dbCreateUniqueNamedNet(cvId, “N”, 4) ==> N<0:3>
dbCreateUniqueNamedNet(cvId, “N”, -4) ==> N<3:0>
dbDeleteNet
Boolean
dbDeleteNet( dbNetId netId );
dbDeleteEmptyNet
Boolean
dbDeleteEmptyNet( dbNetId netId );
Deletes the net if the net does not have any figures, instance terminals, terminals, instance pins, pins, or children. The function returns TRUE if the net is successfully deleted. Otherwise, the function returns FALSE.
dbGetNetName
String
dbGetNetName( dbNetId netId );
dbGetNetNumBit
int
dbGetNetNumBit( dbNetId netId );
Gets the total number of bits in this net.
dbGetMemNetName
String
dbGetMemNetName( dbNetId netId, int memIndex );
Gets the name for this member net.
dbGetMemNetSig
dbSigId
dbGetMemNetSig( dbNetId netId, int memIndex );
Gets the signal associated with this (bit) member net.
dbGetNetTerm
dbTermId
dbGetNetTerm( dbNetId netId );
Gets the terminal connected to this net, if any.
dbGetNetParent
dbNetId
dbGetNetParent( dbNetId netId );
dbGetNetRootNet
dbNetId
dbGetNetRootNet( dbNetId netId );
Gets the topmost parent net of this net. Returns the same net if it has no parent.
dbIsNetVoltageRangeSet
Boolean
dbIsNetVoltageRangeSet(
dbNetId netId
);
Description
Indicates whether a voltage range has been set on the net or its block.
Arguments
Return Value
|
TRUE if a voltage range has been set on the net or its block. FALSE if no voltage range has been set on the net and its block. |
dbGetNetVoltageRangeOnNet
Boolean
dbGetNetVoltageRangeOnNet( dbNetIdnetId, float*minVoltage, float*maxVoltage);
Description
Returns the min and max voltages on a net without inheriting it from the block.
Arguments
|
The minimum voltage value retrieved from the specified net ID. |
|
|
The maximum voltage value retrieved from the specified net ID. |
Return Value
|
TRUE if minimum and maximum voltage values are retrieved successfully. |
Example
dbGetNetVoltageRangeOnNet(netId, minVolt, maxVolt)
=> true
dbIsNetVoltageRangeSetOnNet
Boolean
dbIsNetVoltageRangeSetOnNet(
dbnetId netId
);
Description
Indicates whether a voltage range has been set on the specified net.
Arguments
Return Value
|
TRUE if a voltage range has been set on the specified net. FALSE if no voltage range has been set on the specified net. |
dbGetNetVoltageRangeSource
dbNetVoltageRangeSource
dbGetNetVoltageRangeSource(
dbNetId netId
);
Description
Returns the voltage range source of the specified net ID.
Arguments
|
The net ID of the voltage range source that must be returned. |
Return Value
|
A text string representing the voltage range source of the specified net ID. |
|
dbSetNetVoltageRangeSource
Boolean
dbSetNetVoltageRangeSource( dbNetId netId, dbNetVoltageRangeSource source );
Description
Sets the voltage range source on the specified net ID.
Arguments
Return Value
|
TRUE, if the voltage range source was set successfully on the specified net ID. |
|
|
FALSE, if the voltage range source was not set on the specified net ID. |
dbUnsetNetVoltageRangeSource
Boolean
dbUnsetNetVoltageRangeSource(
dbNetId netId
);
Description
Resets the voltage range source of the specified net ID to its default value.
Arguments
|
The net ID whose voltage range source must be set to its default value. |
Return Value
|
TRUE, if the default voltage range source was reset successfully on the specified net ID. |
|
|
FALSE, if the default voltage range source was not reset on the specified net ID. |
dbIsNetOptical
Boolean
dbIsNetOptical(
dbNetId netId
);
Description
Checks whether the specified net contains optical data.
Arguments
Return value
Example
dbMoveChildNet
Boolean
dbMoveChildNet( dbNetId childNetId, dbNetId parentNetId );
Moves the child net to a new parent. The old parent must exist. Only child nets can be moved.
dbMergeNet
dbNetId
dbMergeNet( dbNetId net1, dbNetId net2 );
Merges net2 into net1 and deletes net2. Merging refers to putting net2’s connections, figures, and member nets of the signals onto net1. Both nets must have the same number of bits. This is useful when a geometry is added that causes two different nets to become shorted. All of the operations of a merge can be done with separate database function calls, but dbMergeNet is more efficient.
dbNetHasGlobal
Boolean
dbNetHasGlobal( dbNetId netId );
Returns TRUE if at least one signal in the net is global. Otherwise, the function returns FALSE.
dbNetHasFig
Boolean
dbNetHasFig( dbNetId netId );
Returns TRUE if the net has at least one figure. Otherwise, the function returns FALSE.
dbNetHasTerm
Boolean
dbNetHasTerm( dbNetId netId );
Returns TRUE if the net is connected to at least one terminal. Otherwise, the function returns FALSE.
dbNetHasInstTerm
Boolean
dbNetHasInstTerm( dbNetId netId );
Returns TRUE if the net is connected to at least one instance terminal. Otherwise, the function returns FALSE.
dbNetHasPin
Boolean
dbNetHasPin( dbNetId netId );
Returns TRUE if the net is connected to at least one pin. Otherwise, the function returns FALSE.
dbNetHasChild
Boolean
dbNetHasChild( dbNetId netId );
Returns TRUE if the net has a child net. Otherwise, the function returns FALSE.
dbGetNetPriority
int
dbGetNetPriority( dbNetId netId );
Gets the priority of the net. The priority must be an integer between 0 and 127.
dbSetNetPriority
Boolean
dbSetNetPriority( dbNetId netId, int priority );
Sets the priority of the net. The priority must be an integer between 0 and 127.
dbGetNetConnStatus
dbConnStatusType
dbGetNetConnStatus( dbNetId netId );
Gets the connectivity status of this net’s connections. The table “Connection Status (dbConnStatusType)” gives the values for connection status.
dbSetNetConnStatus
Boolean
dbGetNetConnStatus( dbNetId netId, dbConnStatusType connStatus );
Sets the connectivity status of this net’s connections. The table “Connection Status (dbConnStatusType)” gives the values for connection status.
dbGetNetPowerDomain
Boolean
dbGetNetPowerDomain( dbNetId netId, unsigned int *numDomains, String **domains );
Returns the power domain attribute of a net. The power domain strings are set to the array for which memory is allocated by this function.
Arguments
Return Values
|
Returns TRUE if the power domain attribute is successfully returned. Returns FALSE otherwise. |
dbSetNetPowerDomain
Boolean
dbSetNetPowerDomain( dbNetId netId, unsigned int numDomains, String *domains );
Sets the power domain attribute of a net.
Arguments
Return Values
|
Returns TRUE if the power domain attribute is successfully set. Returns FALSE otherwise. |
dbStartGenNetToSig
dbGenStateId
dbStartGenNetToSig( dbNetId netId );
Starts the generator for signals in this net, ordered from left-most to right-most bit. Note the same signal can occur more than once in a net.
dbGenNetToSig
Boolean
dbGenNetToSig( dbGenStateId state, dbSigId pSigId );
Generates signals in this net, ordered from left-most to right-most bit. Note the same signal can occur more than once in a net.
dbStartGenNetToFig
dbGenStateId
dbStartGenNetToFig( dbNetId netId );
Starts the generator for shapes or instances in this net, if any.
dbGenNetToFig
Boolean
dbGenNetToFig( dbGenStateId state, dbFigId pFigId );
Generates shapes or instances in this net, if any.
dbStartGenNetToInstTerm
dbGenStateId
dbStartGenNetToInstTerm( dbNetId netId );
Starts the generator for instance terminals connected to this net, if any.
dbGenNetToInstTerm
Boolean
dbGenNetToInstTerm( dbGenStateId state, dbInstTermId pInstTermId );
Generates instance terminals connected to this net, if any.
dbStartGenNetToPin
dbGenStateId
dbStartGenNetToPin( dbNetId netId );
Starts the generator for pins connected to this net, if any.
dbGenNetToPin
Boolean
dbGenNetToPin( dbGenStateId state, dbPinId pPinId );
Generates pins connected to this net, if any.
dbStartGenNetToAllInstTerm
dbGenStateId
dbStartGenNetToAllInstTerm( dbNetId netId );
Starts the generator for instance terminals connected to this net and all of its child nets. The net hierarchy is traversed in a pre-ordering method.
dbGenNetToAllInstTerm
Boolean
dbGenNetToAllInstTerm( dbGenStateId state, dbInstTermId pInstTermId );
Generates instance terminals connected to this net and all of its child nets. The net hierarchy is traversed in a pre-ordering method.
dbStartGenNetToChild
dbGenStateId
dbStartGenNetToChild( dbNetId netId );Boolean
Starts the generator for child nets one level below this net, if any.
dbGenNetToChild
Boolean
dbGenNetToChild( dbGenStateId state, dbNetId pNetId );
Generates child nets one level below this net, if any.
dbStartGenNetToAllChild
dbGenStateId
dbStartGenNetToAllChild( dbNetId netId );
Starts the generator for all child nets under the specified net using a post-ordering traversal (starting with the bottom level children up to the parent).
dbGenNetToAllChild
Boolean
dbGenNetToAllChild( dbGenStateId state, dbNetId pNetId );
Generates all child nets under the specified net using a post-ordering traversal, starting with the bottom level children up to the parent.
dbGetNetRoutePattern
Boolean
dbGetNetRoutePattern( dbNetId netId, dbRoutePattern* routePattern );
Description
Populates the routePattern parameter with the current routePattern being used for the net.
Arguments
Return Values
|
Returns TRUE if the routePattern was successfully populated. Returns FALSE otherwise. |
dbSetNetRoutePattern
Boolean
dbSetNetRoutePattern( dbNetId netId, dbRoutePattern routePattern );
Description
Sets the routePattern for the specified net to the value specified with the routePattern parameter.
Arguments
Return Values
|
Returns TRUE if the routePattern for the specified net is successfully set. Returns FALSE otherwise. |
Signals
A signal is a database object that ties together all nets that implement the signal. Therefore, a signal can belong to several different nets. You can use a signal when netlisting to visit all the signal’s connections at a given hierarchy level. A signal is represented in a name by the sig part.
When you create or delete nets, signals are automatically created or deleted as well. Each signal has a unique name derived from one of the top-level nets that refers to the signal. Two distinct signals can be merged into one, creating a new alias for the surviving signal. This new alias refers to the merged signal.
Hierarchy for Signals
Parent and child nets refer to the same signals. Parent and child relationships for nets are conceptually different from parent and child relationships for figures. For details about parent and child relationships for figures, see Chapter 9, “CDBA Parent-Child Relationship Functions,”.
A global signal connects to other signals with the same name elsewhere in the hierarchy without requiring an explicit connection through the hierarchy. By convention, in Cadence® schematics (interpreted by the schematic extractor), a global signal’s name ends with an exclamation point (! ), such as gnd!.
Signal Types
The following table gives information on signal types. dbSigType is the C data type for signal type constants.
| Constant | Description |
|---|---|
Functions Acting on Signals
The following functions retrieve information about and act on signals.
dbGetSigName
String
dbGetSigName( dbSigId sigId );
Returns the name for this signal as a permanent string. The system creates the signal when you create a net carrying that signal. The name of the signal is set to the one implied by that net. This signal can have aliases after it is merged with other signals.
dbSetSigName
Boolean
dbSetSigName( dbSigId sigId, String name );
Sets the name of the specified signal to one of its aliases. The specified alias must be the name of one of the signal’s member nets, and the signal name must be valid and in a form required by the rules.
dbIsSigGlobal
Boolean
dbIsSigGlobal( dbSigId sigId );
Returns TRUE if the signal has a global attribute set.
dbIsSigOptical
Boolean
dbIsSigOptical(
dbSigId sigId
);
Description
Checks whether the specified signal contains is optical data.
Arguments
Return value
Example
dbIsSigOptical(sigId);
dbSetSigGlobal
Boolean
dbSetSigGlobal( dbSigId sigId );
Sets global attributes for the signal to TRUE.
dbResetSigGlobal
Boolean
dbResetSigGlobal( dbSigId sigId );
Resets global attributes for the signal to FALSE.
dbStartGenSigToAlias
dbGenStateId
dbStartGenSigToAlias( dbSigId sigId );
Starts the generator for alternative names for this signal. Currently, the names generated include the name of every member net that implements this signal.
dbGenSigToAlias
Boolean
dbGenSigToAlias( dbGenStateId state, String pAlias );
Generates alternative names for this signal. Currently the names generated include the name of every member net that implements this signal.
dbGetSigType
dbSigType
dbGetSigType( dbSigId sigId );
Starts the generator to get or set the type of this signal.
dbSetSigType
Boolean
dbSetSigType( dbSigId sigId, dbSigType sigType );
These two functions get or set the type of this signal. The following table lists valid signal types.
| Constant | Description |
|---|---|
dbStartGenSigToMemNet
dbGenStateId
dbStartGenSigToMemNet( dbSigId sigId );
Starts the generator for member nets that implement this signal.
dbGenSigToMemNet
Boolean
dbGenSigToMemNet( dbGenStateId state, dbNetId pNetId, int pMemIndex)
Generates member nets that implement this signal.
dbStartGenSigToMemTerm
dbGenStateId
dbStartGenSigToMemTerm( dbSigId sigId );
Starts the generator for member terminals connected to this signal through its nets.
dbGenSigToMemTerm
Boolean
dbGenSigToMemTerm( dbGenStateId state, dbTermId pTermId, int pMemIndex );
Generates member terminals connected to this signal through its nets.
dbStartGenSigToMemInstTerm
dbGenStateId
dbStartGenSigToMemInstTerm( dbSigId sigId );
Starts the generator for member instance terminals connected to this signal.
dbGenSigToMemInstTerm
Boolean
dbGenSigToMemInstTerm( dbGenStateId state, dbInstTermId pInstTermId, int pMemIndex );
Generates member instance terminals connected to this signal.
dbMergeSignal
dbSigId
dbMergeSignal( dbSigId sigId1, dbSigId sigId2 );
Merges two signals. Signal sigId1 survives the merge. Signal sigId2 is deleted after the merge. Also merges member nets of sigId2. After the merge, sigId1 can be referred to by the name and aliases of sigId2. If either signal is global, the merged signal is global. The merge is not allowed if each signal is already connected to a member terminal.
Terminals
A terminal is a database object that makes a net available for connection on instances in a cellview. Nets must have terminals to make connections using an instance of the cellview. This requirement implies that global signals must have a net and a terminal. The system currently does not enforce this relationship. A terminal is represented in a name by the term part.
Member Terminals
A member terminal refers to a specific member of a terminal. A member terminal is represented in a name by the memTerm part. When used in a function name, memTerm implies the presence of a termId and an integer index. The index specifies which bit of the terminal is of interest, with index zero referring to the left-most bit.
Terminal Names
Each terminal has a unique name that is usually the same as the net to which it connects (but it can be different). A member terminal with the same name can occur more than once within the same or distinct terminal. For example, a terminal named A, A, B can coexist within the same cellview as another terminal named B, A. This feature implies that a signal within a cellview can be accessible through one or many member terminals of the same name.
Terminal Connections
A terminal must contain only one top-level net and can contain pins. The pins of a terminal can be connected to either a top-level net or to a child of the top-level net, but the terminal for those pins can only connect to a top-level net.
Terminal Direction
A terminal has a direction attribute that specifies the drive direction for the terminal as viewed from outside the cellview. The following table illustrates the terminal directions associated with the dbTermDirectType C data type.
You can make visible on the terminal other attributes of the net that the terminal represents.
Terminal Position
You can create and reference terminals by position. Nets can connect to an instance terminal that is bound to a terminal position in the master rather than being bound to a terminal by name. You can set and query terminal position, find a terminal by position, and create an instTerm by position.
- Positions are numbered from 0 to n, where 0 corresponds to the first position in a module declaration.
- Assigning a terminal to a taken position is an error.
- Resetting a terminal assigned to a position is allowed.
Functions Acting on Terminals
The following functions retrieve information about or act on terminals.
dbCreateTerm
dbTermId
dbCreateTerm( dbNetId netId, String termName, dbTermDirectType direction, int nullInt );
Creates a terminal for a net. termName can be NULL, indicating that the name of the net is copied onto the terminal. The terminal name, if specified, must imply the number of bits equal to the number of bits in the net. direction is one of the values listed in the previous table.
A terminal can be created for a net that has signals already attached to other terminals. This means that one signal can be connected to more than one terminal through its nets. However, all member terminals connected to the same signal must have the same name.
dbCreateBlockTerm
dbTermId
dbCreateBlockTerm( dbNetId netId, const char *termName, dbTermDirectType direction, Boolean physOnly );
Creates a terminal for the net and specifies its visibility in the module (logical) domain.
The Embedded Module Hierarchy (EMH) status of the terminal is specified through physOnly. TRUE creates a terminal that is physical only. False creates a terminal that is both logical and physical.
dbDeleteTerm
Boolean
dbDeleteTerm( dbTermId termId );
Deletes the specified terminal.
dbGetTermDirect
dbTermDirectType
dbGetTermDirect( dbTermId termId );
Returns the drive direction for the terminal.
dbSetTermDirect
Boolean
dbSetTermDirect( dbTermId termId, dbTermDirectType direction );
Sets the drive direction for the terminal.
dbSetTermName
Boolean
dbSetTermName( dbTermId termId, String newTermName );
Modifies the terminal name. The number of bits implied by the new name must equal the number of bits in the net of the terminal.
If the new terminal type is different from the old terminal type, a new terminal is created. While doing so, the prop and pin information of the old terminal is preserved. Also, if the terminal has a textdisplay associated with it, a new textDisplay with the attributes of the original textDisplay is created on the new terminal, and the original textDisplay is deleted.
dbGetTermName
String
dbGetTermName( dbTermId termId );
dbGetMemTermName
String
dbGetMemTermName( dbTermId termId, int memIndex );
Returns the member terminal name.
dbGetTermNet
dbNetId
dbGetTermNet( dbTermId termId );
Returns the net to which this terminal connects internally.
dbGetTermNumBit
int
dbGetTermNumBit( dbTermId termId );
Returns the number of bits in this terminal. This is equivalent to asking for the number of bits in the corresponding net.
dbTermHasPin
Boolean
dbTermHasPin( dbTermId termId );
Returns TRUE if this terminal has at least one pin.
dbStartGenTermToPin
dbGenStateId
dbStartGenTermToPin( dbTermId termId );
Starts the generator for pins attached to this terminal, if any.
dbGenTermToPin
Boolean
dbGenTermToPin( dbGenStateId state, dbPinId pPinId );
Generates pins attached to this terminal, if any.
dbGetTermRouteMethod
Boolean
dbGetTermRouteMethod( dbTermId termId, dbRouteMethod* routeMethod );
Description
Returns the routeMethod of the specified Term.
Arguments
Return Values
|
Returns TRUE if the routeMethod was found. |
dbSetTermRouteMethod
Boolean
dbSetTermRouteMethod( dbTermId termId, dbRouteMethod routeMethod );
Description
Sets the routeMethod for the specified term to the value specified with the routeMethod parameter.
Arguments
Return Values
|
Returns TRUE if the routeMethod for the specified term is successfully set. Returns FALSE otherwise. |
dbGetTermPosition
unsigned int
dbGetTermPosition( dbTermId termId );
Description
Gets the position assigned to a specified terminal.
Arguments
Return Values
dbSetTermPosition
Boolean
dbGetTermPosition( dbTermId termId, unsigned int position );
Description
Assigns or changes the position of a specific terminal. A multi-bit terminal occupies a position similar to a scalar terminal.
Arguments
|
The position to which to assign the terminal. The position can be from 0 to n, where 0 is the first position. |
Return Values
|
Returns TRUE if the position is assigned. |
dbUnsetTermPosition
void
dbUnsetTermPosition( dbTermId term );
Description
Clears the position from the specified terminal.
Arguments
Return Values
|
Returns a void if the position is cleared. |
dbGetTermsWithPosition
Boolean
dbGetTermsWithPosition( dbCellViewId cvId, unsigned int *maxPosition, dbTermId **termIds );
Description
Gets a collection of terminals in the cellview that have positions assigned.
Arguments
Return Values
|
Returns TRUE if the cellview contains at least one terminal with an assigned position. |
dbFindTermByPosition
dbTermId
dbFindTermByPosition( dbCellViewId cvId, unsigned int position );
Description
Searches the cellview for a terminal assigned to the specified position.
Arguments
|
Returns the terminal. |
Functions Acting on Terminals
A softConnect terminal is a terminal that does not draw or carry any current.
A typical four terminal device has terminals for gate, drain, source, and the bulk node. The bulk node terminal is often not shown in a schematic representation. If the bulk node is shown, it is shown as connected to either power or ground. Similarly in a layout representation, the bulk node terminal is connected to either power or ground, but electrically it does not draw any current. Hence, it can be designated as a softConnect terminal.
Terminals are either explicit or implicit. Explicit terminals are explicitly created and managed by the user, whereas, implicit terminals are created and managed automatically by the database. An example of an implicit terminal would be one of the bit terminals associated with an explicit, multi-bit terminal.
You can use the dbSetTermSoftConnect function to designate a terminal as a softConnect terminal.
After you designate a terminal as softConnect, you have the option to specify the following two attributes on the terminal:
-
pinlessTerminalLayer: when the
softConnectterminal is not implemented by a shape, this layer is used to identify the area of the bulk node for thesoftConnectterminal. -
connectToLayer: when thesoftConnectterminal is not implemented by a shape, this identifies the top level layer to which the correspondinginstTermwill connect.
These attributes can be set independent of one another. When the softConnect terminal has an associated physical shape, the pinlessTerminalLayer and connectToLayer attributes are not needed.
softConnect.The following functions retrieve information about or act on terminals.
dbSetTermSoftConnect
void
dbSetTermSoftConnect( dbTermId term Boolean value );
Sets the softConnect attribute of the specified terminal to the given value.
The terminal must be an explicit, single-bit terminal. If you set the softConnect attribute on an implicit or multi-bit terminal, an error is reported.
If the softConnect attribute of the terminal is set to FALSE, the associated pinlessTerminalLayer and connectToLayer attributes are removed (if set).
dbIsTermSoftConnect
Boolean
dbIsTermSoftConnect( dbTermId term );
Checks the softConnect attribute value of the specified terminal
Since the softConnect attribute can only be set on explicit, single-bit terminals, using this query on an implicit or multi-bit terminal always returns FALSE.
dbSetSoftConnectTermPinlessLayer
void
dbSetSoftConnectTermPinlessLayer( dbTermId term dbLayer pinlessTermLayer );
Sets the pinlessTerminalLayer attribute of the specified softConnect terminal.
If you set this layer attribute on a terminal that is not designated as softConnect, an error is reported.
dbUnsetSoftConnectTermPinlessLayer
void
dbUnsetSoftConnectTermPinlessLayer( dbTermId term );
Removes the pinlessTerminalLayer attribute set on a terminal designated as softConnect.
dbGetSoftConnectTermPinlessLayer
dbLayer
dbGetSoftConnectTermPinlessLayer( dbTermId term );
Returns the pinlessTerminalLayer of the softConnect terminal as a dbLayer. If the pinlessTerminalLayer is not set for this terminal, an error is reported and dbcNullLayer is returned.
dbHasSoftConnectTermPinlessLayer
Boolean
dbHasSoftConnectTermPinlessLayer( dbTermId term );
Checks if the given softConnect terminal has the pinlessTerminalLayer attribute set. If the given terminal is not a softConnect terminal, FALSE is returned.
dbSetSoftConnectTermConnectToLayer
void
dbSetSoftConnectTermConnectToLayer( dbTermId term dbLayer connectToLayer );
Sets the connectToLayer attribute of the specified softConnect terminal.
If you set this layer attribute on a terminal that is not designated as softConnect, an error is reported.
dbGetSoftConnectTermConnectToLayer
dbLayer
dbGetSoftConnectTermConnectToLayer( dbTermId term );
Returns the connectToLayer of the softConnect terminal as a dbLayer. If the connectToLayer is not set for this terminal, an error is reported and dbcNullLayer is returned.
dbHasSoftConnectTermConnectToLayer
Boolean
dbHasSoftConnectTermConnectToLayer( dbTermId term );
Checks if the given softConnect terminal has the connectToLayer attribute set. If the given terminal is not a softConnect terminal, FALSE is returned.
dbGetAnyTermGroundSensitivity
dbTermId
dbGetAnyTermGroundSensitivity(
dbTermId termId
);
Description
Returns ground sensitivity terminal information for the specified terminal. This terminal can be a multi-bit terminal. When it is a multi-bit terminal, the value returned represents the ground sensitivity terminal on the majority of the bits of the terminal.
Arguments
Value Returned
|
Database ID of the ground sensitivity terminal.
Returns |
Examples
Suppose myTerm is a bus terminal of name "A[0:3]", and the ground sensitivity terminal on the four bits are "gnd, gnd, gnda, gnd".
dbTermId groundSensitivity = dbGetAnyTermGroundSensitivity(myTerm)
Returns "gnd" because it appears on three out of the four bits.
dbGetAnyTermSupplySensitivity
dbTermId
dbGetAnyTermSupplySensitivity(
dbTermId termId
);
Description
Returns supply sensitivity terminal information for the specified terminal. The terminal can be a multi-bit terminal. When it is a multi-bit terminal, the value returned represents the supply sensitivity terminal on the majority of the bits of the terminal.
Arguments
Value Returned
|
Database ID of the supply sensitivity terminal.
Returns |
Examples
Suppose myTerm is a bus terminal of name "A[0:3]", and the supply sensitivity terminal on the four bits are "vdd, vdd, vdda, vdd".
dbTermId supplySensitivity = dbGetAnyTermSupplySensitivity(myTerm)
Returns "vdd" because it appears on three out of the four bits.
dbGetAnyTermGroundSensitivityAll
Boolean
dbGetAnyTermGroundSensitivityAll( dbTermIdtermId, unsigned int *numTerms, dbTermId **groundSensitivityValues);
Description
Retrieves the ground sensitivity terminal on all bits of the specified terminal. This function fills the memory pointed by numTerms and groundSensitivityValues.
Arguments
Value Returned
Examples
Retrieves the ground sensitivity terminal on all bits of the terminal myTerm:
unsigned int numTerms = 0;
dbTermId *sensitivityTerms = NULL;
Boolean res = dbGetAnyTermGroundSensitivityAll (myTerm, &numTerms, &sensitivityTerms);
Free the memory pointed by sensitivityTerms using:
voFreeArray(numTerms, sensitivityTerms, dbTermId);
dbGetAnyTermSupplySensitivityAll
Boolean
dbGetAnyTermSupplySensitivityAll( dbTermIdtermId, unsigned int *numTerms, dbTermId **supplySensitivityValues);
Description
Retrieves the supply sensitivity terminal on all bits of the specified terminal. This function fills the memory pointed by numTerms and groundSensitivityValues.
Arguments
Value Returned
Example
Retrieves the supply sensitivity terminal on all bits of the terminal myTerm:
unsigned int numTerms = 0;
dbTermId *sensitivityTerms = NULL;
Boolean res = dbGetAnyTermSupplySensitivityAll (myTerm, &numTerms, &sensitivityTerms);
Free the memory pointed by sensitivityTerms using:
voFreeArray(numTerms, sensitivityTerms, dbTermId);
dbIsAnyTermGroundSensitivityConsistent
Boolean
dbIsAnyTermGroundSensitivityConsistent(
dbTermId termId
);
Description
Checks whether all the bits of the specified terminal have the same ground sensitivity terminal.
Argument
Value Returned
|
|
Example
Checks if all bits of the terminal myTerm have the same ground sensitivity terminal.
Boolean res = dbIsAnyTermGroundSensitivityConsistent(myTerm);
dbIsAnyTermSupplySensitivityConsistent
Boolean
dbIsAnyTermSupplySensitivityConsistent(
dbTermId termId
);
Description
Checks whether all the bits of the specified terminal have the same supply sensitivity terminal.
Argument
Value Returned
|
|
Example
Checks if all bits of the terminal myTerm have the same supply sensitivity terminal.
Boolean res = dbIsAnyTermSupplySensitivityConsistent(myTerm);
dbSetAnyTermGroundSensitivity
Boolean
dbSetAnyTermGroundSensitivity( dbTermIdtermId, dbTermIdgroundTermId);
Description
Sets the ground sensitivity value for each bit of the specified terminal. If the terminal is a multi-bit terminal, the function only sets the ground sensitivity value on implicit bits. The ground sensitivity values on explicit bits are not affected.
Arguments
Value Returned
Example
Suppose that the bus terminal myTerm named A[0:3], A[1] is an explicit bit terminal.
Boolean res = dbSetAnyTermGroundSensitivity(myTerm, groundTermId);
Sets the ground sensitivity of myTerm with a term "gnd" for A[0], A[2] and A[3].
dbSetAnyTermSupplySensitivity
Boolean
dbSetAnyTermSupplySensitivity( dbTermIdtermId, dbTermIdsupplyTermId);
Description
Sets the supply sensitivity value for each bit of the specified terminal. If the terminal is a multi-bit terminal, the function only sets the supply sensitivity value on implicit bits. The supply sensitivity value on explicit bits are not affected.
Arguments
Value Returned
Example
Suppose that the bus terminal myTerm named A[0:3], A[1] is an explicit bit terminal.
Boolean res = dbSetAnyTermSupplySensitivity(myTerm, supplyTermId);
Sets the supply sensitivity of myTerm with a term "gnd" for A[0], A[2] and A[3].
Terminal Antenna Functions
#define dbcMaxAntennaModel 4
#define dbcMaxAntennaData 8
constString dbvAntennaModelString[] = {
"defaultAntennaModel",
"secondAntennaModel",
"thirdAntennaModel",
"fourthAntennaModel"
};
typedef enum dbAntennaModelType {
dbcDefaultAntennaModel = oacDefaultAntennaModel,
dbcSecondAntennaModel = oacSecondAntennaModel,
dbcThirdAntennaModel = oacThirdAntennaModel,
dbcFourthAntennaModel = oacFourthAntennaModel
};
constString dbvAntennaDataString[] = {
"ANTENNAGATEAREA",
"ANTENNADIFFAREA",
"ANTENNAPARTIALMETALAREA",
"ANTENNAPARTIALMETALSIDEAREA",
"ANTENNAPARTIALCUTAREA",
"ANTENNAMAXAREACAR",
"ANTENNAMAXSIDEAREACAR",
"ANTENNAMAXCUTCAR"
};
typedef enum dbAntennaDataType {
dbcAntennaGateArea = 1, // "ANTENNAGATEAREA",
dbcAntennaDiffArea = 2, // "ANTENNADIFFAREA",
dbcAntennaPartialMetalArea = 3, // "ANTENNAPARTIALMETALAREA",
dbcAntennaPartialMetalSideArea = 4, // "ANTENNAPARTIALMETALSIDEAREA",
dbcAntennaPartialCutArea = 5, // "ANTENNAPARTIALCUTAREA",
dbcAntennaMaxAreaCAR = 6, // "ANTENNAMAXAREACAR",
dbcAntennaMaxSideAreaCAR = 7, // "ANTENNAMAXSIDEAREACAR",
dbcAntennaMaxCutCAR = 8, // "ANTENNAMAXCUTCAR"
} dbAntennaDataType;
Define dbUInt8 for area storage
typedef unsigned long long dbUInt8;
The following functions are used for value conversion between dbUInt8 and double. dbUserCoord is defined as double.
dbUUToDBUArea
dbUInt8
dbUUToDBUArea( dbUserCoord inputArea, dbUserCoord DBUPerUU );
dbUserToDBUArea
dbUInt8
dbUserToDBUArea( dbCellViewId cellViewId, dbUserCoord inputArea );
dbDBUAreaToUU
dbUserCoord
dbDBUAreaToUU( dbUInt8 area, dbUserCoord DBUPerUU );
Terminal Antenna Rules
dbDeleteAllTerminalAntennaRules
Boolean
dbDeleteAllTerminalAntennaRules( dbTermId termId, dbAntennaModelType modelEnum );
Deletes all antenna rules from the specified terminal.
dbHasTerminalAntennaRules
Boolean
dbHasTerminalAntennaRules( dbTermId termId, dbAntennaModelType modelEnum );
Checks if the terminal has antenna rules.
dbSetTerminalAntennaRules
Boolean
dbSetTerminalAntennaRules( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbPropType listType, dbPropValue listValue
);
Sets an antenna rule to a terminal according to model type and data type.
dbDeleteTerminalAntennaRules
Boolean
dbDeleteTerminalAntennaRules( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbPropType listType, dbPropValue listValue );
Sets an antenna rule to a terminal according to model type and data type.
dbGetTerminalAntennaRules
Boolean
dbGetTerminalAntennaRules( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbPropType *pListType, dbPropValue *pListValue );
Returns the terminal antenna rules.
dbStartGenTerminalAntennaRule
dbGenStateId
dbStartGenTerminalAntennaRule( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum );
Starts the generator for antenna rules attached to this terminal, if any.
dbGenTerminalAntennaRule
Boolean
dbGenTerminalAntennaRule( dbGenStateId state, dbPropType *pType, dbPropValue *pValue, dbLayer *layerNum );
Generates antenna rules attached to this terminal, if any.
dbSetTerminalAntennaRuleOnLayer
Boolean
dbSetTerminalAntennaRuleOnLayer( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbLayer layerNum, dbPropType type, dbPropValue value );
Sets an antenna rule to a specified terminal according to model name, data name, and layer.
dbGetTerminalAntennaRuleOnLayer
Boolean
dbGetTerminalAntennaRuleOnLayer( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbLayer layerNum, dbPropType *pType, dbPropValue *pValue );
Returns the antenna rule for the specified terminal according to model name, data name, and layer.
dbDeleteTerminalAntennaRuleOnLayer
Boolean
dbDeleteTerminalAntennaRuleOnLayer( dbTermId termId, dbAntennaModelType modelEnum, dbAntennaDataType dataEnum, dbLayer layerNum );
Deletes the antenna rule of the terminal according to the specified antenna model name, antenna data name, and layer.
Instance Terminals
An instance terminal is a database object that represents a terminal in the master of an instance. Instance terminals, along with instances and nets, are the mechanisms that implement hierarchy. An instance terminal is represented in a name by the instTerm part.
Connections for Instance Terminals
An instance terminal can be either connected or unconnected to a net. A connection is always to instance terminals. A connection is represented in a name by the conn part.
An instance terminal has one terminal and either one instance or one mosaic instance. A connected instance terminal must have one net. Nets and instances can have many or no connected instance terminals. An instance can have as many instance terminals as there are terminals on the master of the instance.
Instance terminals can be connected in a different order from the order of the terminals on the master of the instance. An instance terminal can have as many instance pins as there are pins on the terminal in the master of the instance.
A member instance terminal, represented in a name by the memInstTerm part, refers to a specific member of an instance terminal. A member connection refers to a specific member of a connected instance terminal. The member connection is represented in a name by the memConn part of the name. When used in a function name, the member connection implies the presence of an instance terminal ID (instTermId) and an integer index. This integer index specifies which bit of the instance terminal, from the left-most bit, is under consideration.
The order of connections between the member nets and the member terminals is significant and is preserved. As the index of a member connection increases, the index for the corresponding member terminal increases until it reaches the number of bits in the terminal. At that point, the index for the member terminal returns to zero, and the index for the corresponding member instance increases by one. This process continues until all bits of the connection have been enumerated.
Functions Acting on Instance Terminals
The following functions act on instance terminals. The Conn part of the name used in these functions means “connected instance terminal.”
dbCreateInstTerm
dbInstTermId
dbCreateInstTerm( dbNetId netId, dbAnyInstId anyInstId, dbTermId termId );
dbCreateConn
dbInstTermId
dbCreateConn( dbNetId netId, dbAnyInstId anyInstId, dbTermId termId );
dbCreateConnByName
dbInstTermId
dbCreateConnByName( dbNetId netId, dbAnyInstId anyInstId, String termName );
dbCreateConnByNewName
dbInstTermId
dbCreateConnByNewName( dbNetId netId, dbAnyInstId anyInstId, String newTermName );
The functions dbCreateInstTerm, dbCreateConn, dbCreateConnByName, and dbCreateConnByNewName create a new instance terminal and attach it to the specified cell instance. The instance must already exist and be bound to its master.
In the functions dbCreateInstTerm, dbCreateConn, and dbCreateConnByName, the terminal must already exist. In the function dbCreateConnByName, the named terminal can be a new terminal that does not yet exist in the associated master. This situation creates an unbound instance terminal.
In the functions dbCreateConn, dbCreateConnByName, and dbCreateConnByNewName, the net must already exist. The newly created instance terminal is then connected to the specified net. The number of bits in the net can differ from the number in the instance terminal. Instances attached to pins or nets are not allowed to have instance terminals.
In the functions dbCreateInstTerm, dbCreateConn, dbCreateConnByName, and dbCreateConnByNewName the parameters dbAnyInstId and InstId cannot be mosaic instances. InstTerms are not supported in mosaic instances.
dbCreateInstTerm, dbCreateConn, dbCreateConnByName, and dbCreateConnByNewName return dbcNullInstTermId if the instance is connected by position. Applications must have checks in place to handle instTerms connected by position.dbDeleteInstTerm
Boolean
dbDeleteInstTerm( dbInstTermId instTermId );
dbDeleteConn
Boolean
dbDeleteConn( dbInstTermId instTermId );
These two functions delete an instance terminal and its instance pins. The instance terminal and its instance pins are disconnected from their nets before being deleted. In the second function, the instance terminal is deleted only if it is connected to a net.
dbAddInstTermToNet
Boolean
dbAddInstTermToNet( dbInstTermId instTermId, dbNetId netId );
Connects an instance terminal to a specified net if it is not already connected. The number of bits in the net does not have to be the same as the number for the instance terminal.
dbSubInstTermFromNet
Boolean
dbSubInstTermFromNet( dbInstTermId instTermId );
Disconnects an instance terminal from its net, if any. The instance terminal is not deleted.
dbIsInstTermBound
Boolean
dbIsInstTermBound( dbInstTermId instTermId );
Tests if this instance terminal is bound to its master.
dbIsInstTermWidthOK
Boolean
dbIsInstTermWidthOK( dbInstTermId instTermId );
Returns TRUE if the number of bits in the instance terminal is equal to the instance terminal in the net connected to it. It returns TRUE if it is unconnected.
dbGetInstTermNet
dbNetId
dbGetInstTermNet( dbInstTermId instTermId );
Returns the net connected to this instance terminal, if any.
dbGetInstTermAnyInst
dbAnyInstId
dbGetInstTermAnyInst( dbInstTermId instTermId );
Returns the instance to which this instance terminal is attached.
dbGetInstTermTerm
dbTermId
dbGetInstTermTerm( dbInstTermId instTermId );
Returns the corresponding master terminal for this instance terminal. If unbound, binding is attempted.
dbGetInstTermNetName
String
dbGetInstTermNetName( dbInstTermId instTermId );
Returns the name of the net of the instance terminal.
dbGetInstTermInstName
String
dbGetInstTermInstName( dbInstTermId instTermId );
Returns the name of the instance of the instance terminal.
dbGetInstTermTermName
String
dbGetInstTermTermName( dbInstTermId instTermId );
Returns the name of the terminal of the instance terminal.
dbGetMemInstTermMemInst
Boolean
dbGetMemInstTermMemInst( dbInstTermId instTermId, int index, dbAnyInstId pAnyInstId, int pInstIndex );
Returns the corresponding member instance for this member instance terminal.
dbGetMemInstTermMemTerm
Boolean
dbGetMemInstTermMemTerm( dbInstTermId instTermId, int index, dbTermId pTermId, int pTermIndex );
Returns the corresponding master member terminal for this member instance terminal.
dbGetInstTermNumBit
int
dbGetInstTermNumBit( dbInstTermId instTermId );
Returns the number of bits in this instance terminal. This is equivalent to the number of bits in the master terminal multiplied by the number of instances (numInst) represented by the instance to which this instance terminal is attached.
dbCreateInstTermByPosition
Boolean
dbCreateInstTermByPosition( dbNetId net, dbAnyInstId anyInstId, unsigned int position );
Description
Creates an instTerm that connects to a terminal. The terminal connects to the net at the specified position in the instance master.
The instTerms associated with the instance must all be connected by name or by position.
Arguments
|
The position of the terminal in the instance master to which to connect the instTerm. |
Return Values
|
Returns TRUE if the instTerm is created. Returns FALSE otherwise. |
dbGetInstTermTermPosition
unsigned int
dbGetInstTermTermPosition( dbInstTermId instTermId );
Description
Gets the position of the terminal to which the instTerm is bound.
Arguments
Return Values
|
Returns the position of the terminal. |
Pins
This section describes functions affecting pin objects. Creating a pin requires a net and a pin name. A figure and a terminal are optional.
The figure below illustrates the OpenAccess pin model.

In the model, term 1 and term 3 know to connect to each other. The model illustrates the following connections.
- Figures on the same pin are strongly connected, such as fig 1 and fig 2.
- Figures on different pins on the same terminal are weakly connected, such as fig 2 and fig 3.
-
Figures on terminals that are on different nets, but the terminals know to connect to each other are must connect, such as fig 3 and fig 4. Set the
must joinattribute on terminals to indicate a must connect relationship. - Fig 5 does not connect to any other figure because term 4 does not must connect to any other terminal.
- Terminals on the same net are shorted terminals. Figures on shorted terminals are shorted to figures on other terminals of the same net. Shorted figures are not strongly or weakly connected. An application interprets the meaning of the shorted terminal.
- Pins are created without figures. You can add 0 to N figures once a pin exists. You can also remove figures from a pin. You can add vias, instances, and shapes to a pin. Via, instance, and shape objects are part of the OpenAccess abstract class oaPinFig. You cannot add blockages, boundaries, markers, rows, guides, steiners, or routes to a pin.
dbCreatePin
dbPinId
dbCreatPin( dbNetId netId , dbFigId figId, const char *pinName );
Description
The function searches the net for terminals. If the search finds more than one terminal, an error results, as the function does not know on which terminal to create the pin. In this case, use dbCreatePinOnTerm and specify the terminal Id.
The figure gets a trigger with the dbcConnModifyAction type.
Arguments
Return Values
dbCreatePinOnTerm
dbPinId
dbCreatPinOnTerm( dbNetId netId , dbFigId figId, const char *pinName, dbTermId termId );
Description
Creates a pin on the specified terminal.
The figure gets a trigger with the dbcConnModifyAction type.
Arguments
Return Values
dbDeletePin
Boolean
dbDeletePin( dbPinId pinId );
Deletes this pin. The figure of the pin is detached from the pin, not deleted.
dbGetPinName
String
dbGetPinName( dbPinId pinId );
dbSetPinName
Boolean
dbSetPinName( dbPinId pinId, String pinName)
Sets the pin name. The new pin name must be unique among the pins of the same terminal. If NULL is specified for the pinName, a unique name is generated and assigned to this pin.
dbGetPinTerm
dbTermId
dbGetPinTerm( dbPinId pinId );
Returns the terminal containing this pin.
dbGetPinNet
dbNetId
dbGetPinNet( dbPinId pinId );
Returns the net to which this pin connects internally. Pins and terminals can point to different nets, but they must be related as parent and child. This relationship can occur with hierarchical nets.
dbMovePinToNet
Boolean
dbMovePinToNet( dbPinId pinId, dbNetId netId );
Moves the specified pin to the specified net. If the destination net is not in the same net hierarchy as the net currently connected to the pin (that is, they have a different root net), the root of the destination net must have a terminal. Corresponding instance pins are not unbound if the pin is moved within the same net hierarchy.
dbGetPinFig
dbFigId
dbGetPinFig( dbPinId pinId );
Returns the first figure generated on the pin.
dbAddFigToPin
Boolean
dbAddFigToPin( dbPinId pinId , dbFigId figId );
Description
Add the figure to the pin. If the figure is already part of another pin, the function removes the figure from the original pin and adds the figure to the new pin.
When figures are added or removed from a pin, fig triggers are invoked. Application triggers must handle fig triggers, as it is not possible to differentiate between a pin with multiple figures and a pin with only one figure. The figure gets a trigger with the dbcConnModifyAction type.
Arguments
Return Values
|
Returns TRUE if the figure is added successfully. |
dbSubFigFromPin
Boolean
dbSubFigFromPin( dbPinId pinId , dbFigId figId );
Description
Removes the figure from the pin.
When figures are added or removed from a pin, fig triggers are invoked. Application triggers must handle fig triggers, as it is not possible to differentiate between a pin with multiple figures and a pin with only one figure. The figure gets a trigger with the dbcConnModifyAction type.
Arguments
Return Values
|
Returns TRUE if the figure is removed successfully. |
dbStartGenPinToFig
dbGenStateId
dbStartGenPinToFig( dbPinId pinId );
Description
Starts generating all the figures on the pin one at a time.
Arguments
Return Values
|
The generator |
dbGenPinToFig
Boolean
dbGenPinToFig( dbGenStateId state, dbFigId *figId );
Description
Generates all the figures on the pin one at a time.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if a fig object is generated successfully. |
dbStartGenNetToTerm
dbGenStateId
dbStartGenNetToTerm( dbNetId netId );
Description
Starts generating all the terminals on the net one at a time.
Arguments
Return Values
|
The generator |
dbGenNetToTerm
Boolean
dbGenNetToTerm( dbGenStateId state, dbTermId *termId );
Description
Generating all the terminals on the net one at a time.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if a term object is generated successfully. |
dbSetTermMustJoin
Boolean
dbSetTermMustJoin( dbTermId termId, dbTermId mustJoinTermId );
Description
Sets the must join attribute for the two termIds. The two terms then must connect to each other.
The must join attribute is transitive. If termA is must join to termB, and termB is must join to termC, then termA is must join to termC also.
Arguments
Return Values
|
Returns TRUE if the must join attribute is set for the two terminals. |
dbUnsetTermMustJoin
Boolean
dbUnsetTermMustJoin( dbTermId termId );
Description
Removes the terminal from the must join terminal set.
Arguments
Return Values
|
Returns TRUE if the must join attribute is removed from the terminal. |
dbStartGenTermToMustJoinTerm
dbGenStateId
dbStartGenTermToMustJoinTerm( dbTermId termId );
Description
Starts returning all the terminals that are in the must join set of the specified terminal.
Arguments
Return Values
|
The generator |
dbGenTermToMustJoinTerm
Boolean
dbGenTermToMustJoinTerm( dbGenStateId state, dbTermId *mustJoinTermId );
Description
Returns all the terminals that are in the must join set of the specified terminal.
Arguments
|
The generator |
|
Return Values
|
Returns TRUE if the term object in the must join set is returned. |
dbTermHasMustConnectAllPins
Boolean
dbTermHasMustConnectAllPins(
const dbTermId termId
);
Description
Checks whether the mustConnectAllPins attribute is set on the specified terminal.
Arguments
Return Values
|
Returns TRUE if
Returns FALSE if |
dbSetTermMustConnectAllPins
void dbSetTermMustConnectAllPins( dbTermIdtermId, BooleanmustConnectAllPins);
Description
Indicates whether to set the mustConnectAllPins attribute on the specified terminal. The terminal must be a single-bit terminal.
Arguments
|
Specifies whether the |
Return Value
Access Directions of a Pin
Access directions can be associated with a pin. The access direction is represented by a four-bit wide bit-field. The values are shown in the following table.
| Enumerated constant | Description for type dbDirection |
|---|---|
When a pin is created, it has no access directions specified. Typically the Abstract Generator (abgen) program or the data translators (used by Place and Route) specify pin access directions. A pin can have more than one access direction represented as the logical OR of the bits. For example, a pin that is accessible from both the top and bottom has an access direction of (dbbTop | dbbBottom).
An inaccessible pin is a pin that has an access direction specified, but the access direction has a value of dbbNone. The prefix dbb identifies a field constant, which is similar to a dbc constant except these values can be logically “ORed” together.
dbGetPinAccessDirection
Boolean
dbGetPinAccessDirection( dbPinId pinId, dbDirection pDir );
Returns FALSE if the pin has no access direction specified. Otherwise, the function returns TRUE and Dir is the logical OR of the access directions set for the pin.
dbPinHasAccessDirection
Boolean
dbPinHasAccessDirection( dbPinId pinId );
Returns TRUE if pin access directions are specified.
dbSetPinAccessDirection
Boolean
dbSetPinAccessDirection( dbPinId pinId, dbDirection dir );
Sets access directions for the pin. If an access direction of dbbNone is specified, then the pin is inaccessible. For dbDirection values, see “Pins”.
dbDeletePinAccessDirection
Boolean
dbDeletePinAccessDirection( dbPinId pinId );
Removes any specifications for access directions for the pin.
dbTransformAccessDirection
dbDirection
dbTransformAccessDirection( dbDirection direction, dbOrient orient );
Transforms the access direction based on the specified orientation.
BusDef and BitOrder
This section describes the functions affecting bus definition and bit order objects.
There are three bus definition classes, oaBusNetDef, oaBusTermDef, and oaVectorInstDef. These three bus definition objects define a vectored object such as busNet, busTerm, or vectorInst. The definition includes base name, bit range, and bit order. The same bus definition manages all vectored objects in a cellview with the same base name.
The bus definition class tracks the minimum and maximum indexes referred to by all the corresponding bus and busBit objects. A bus definition can have missing bits. Buses need not start or end at zero, but the indexes must be greater than or equal to zero.
A bus definition object can be implicit or explicit.
If a bus definition object does not already exist when a bus object is created, the database automatically creates an implicit bus definition object. The database adds vectored objects with the same base name to the vector definition.
You can explicitly create a bus definition to specify a bit order. The database does not automatically destroy explicit bus definitions even after the last vectored object with the same base name is destroyed. The database does automatically destroy implicit bus definitions when the last vectored object with the same base name is destroyed. To destroy an explicit bus definition, applications must destroy it explicitly.
The three bus definition classes, oaBusNetDef, oaBusTermDef, and oaVectorInstDef support a bitOrder attribute. You can set a bitOrder attribute when creating a bus definition object or by using the setBitOrder method.
The database implicitly creates vector definitions, if they do not exist. Implicit vector definitions have a bitOrder value of none.
Three ids support the functions.
typedef dbId dbBusNetDefId;
typedef dbId dbBusTermDefId;
typedef dbId dbVectorInstDefId;
The following validation functions check whether the database bus definition Id maps to a valid OpenAccess bus definition object.
inline oaBusNetDef *
dbiValidateBusNetDef (dbBusNetDefId id);
inline oaBusTermDef *
dbiValidateBusTermDef (dbBusTermDefId id);
inline oaVectorInstDef *
dbiValidateVectorInstDef (dbVectorInstDefId id);
The following enumeration type supports bitOrder.
typedef enum dbBitOrder {
dbcNoBitOrder = 0,
dbcAscendingBitOrder = 1,
dbcDescendingBitOrder = 2
} dbBitOrder;
dbCreateBusNetDef
dbBusNetDefId
dbCreateBusNetDef( dbCellViewId cvId, const char* baseName, dbBitOrder order );
Description
Creates a busNet definition in the cellview using the bitOrder and baseName, if a busNet definition does not already exist.
Arguments
Return Values
|
Returns the ID of the created busNetDef. |
dbCreateBusTermDef
dbBusTermDefId
dbCreateBusTermDef( dbCellViewId cvId, const char* baseName, dbBitOrder order );
Description
Creates a busTerm definition in the cellview using the bitOrder and baseName, if a busTerm definition does not already exist.
Arguments
Return Values
|
Returns the ID of the created busTermDef. |
dbCreateVectorInstDef
dbVectorInstDefId
dbCreateVectorInstDef( dbCellViewId cvId, const char* baseName, dbBitOrder order );
Description
Creates a vectorInst definition in the cellview using the bitOrder and baseName, if a vectorInst definition does not already exist.
Arguments
Return Values
|
Returns the ID of the created vectorInstDef. |
dbFindBusNetDef
dbBusNetDefId
dbFindBusNetDef( dbCellViewId cvId, const char* baseName );
Description
Searches the cellview for an oaBusNetDef with the specified baseName.
Arguments
Return Values
|
Returns the ID of the busNetDef. |
dbFindBusTermDef
dbBusTermDefId
dbFindBusTermDef( dbCellViewId cvId, const char* baseName );
Description
Searches the cellview for an oaBusTermDef with the specified baseName.
Arguments
Return Values
|
Returns the ID of the busTermDef. |
dbFindVectorInstDef
dbVectorInstDefId
dbFindVectorInstDef( dbCellViewId cvId, const char* baseName );
Description
Searches the cellview for an oaVectorInstDef with the specified baseName.
Arguments
Return Values
|
Returns the ID of the vectorInstDef. |
dbDeleteBusNetDef
Boolean
dbDeleteBusNetDef( dbBusNetDefId busNetDefId );
Description
Deletes the busNetDef from the cellview.
Arguments
Return Values
|
Returns TRUE if the busNetDef is deleted. |
dbDeleteBusTermDef
Boolean
dbDeleteBusTermDef( dbBusTermDefId busTermDefId );
Description
Deletes the busTermDef from the cellview.
Arguments
Return Values
|
Returns TRUE if the busTermDef is deleted. |
dbDeleteVectorInstDef
Boolean
dbDeleteVectorInstDef( dbVectorInstDefId vectorInstDefId );
Description
Deletes the vectorInstDef from the cellview.
Arguments
Return Values
|
Returns TRUE if the vectorInstDef is deleted. |
Attribute Access Functions
dbGetBusNetDefMinIndex
int
dbGetBusNetDefMinIndex( dbBusNetDefId busNetDefId );
Description
Gets the smallest bit number used for the busNetDef object. This is the smallest index used across all busNets associated with this busNetDef object.
Arguments
Return Values
|
Returns the smallest bit number used for the busNetDef object. |
dbGetBusNetDefMaxIndex
int
dbGetBusNetDefMaxIndex( dbBusNetDefId busNetDefId );
Description
Gets the largest bit number used for the busNetDef object. This is the largest index used across all busNets associated with this busNetDef object.
Arguments
Return Values
|
Returns the largest bit number used for the busNetDef object. |
dbGetBusNetDefBaseName
String
dbGetBusNetDefBaseName( dbBusNetDefId busNetDefId );
Description
Gets the base name of the busNetDef object.
Arguments
Return Values
dbGetBusNetDefNumBits
int
dbGetBusNetDefNumBits( dbBusNetDefId busNetDefId );
Description
Gets the number of bits covered by the busses in this busNetDef object. The number is equal to abs(maxIndex-minIndex) + 1.
Arguments
Return Values
|
Returns the number of bits covered by the busses in this busNetDef object. |
dbGetBusNetDefNumBitsUsed
int
dbGetBusNetDefNumBitsUsed( dbBusNetDefId busNetDefId );
Description
Gets the number of bits used by the busses in this busNetDef object. The number is equal to the number of busNetBits in this busNetDef.
Arguments
Return Values
|
Returns the number of bits used by the busses in this busNetDef object. |
dbGetBusNetDefBitOrder
dbBitOrder
dbGetBusNetDefBitOrder( dbBusNetDefId busNetDefId );
Description
Gets the bitOrder of the busNetDef object.
Arguments
Return Values
dbSetBusNetDefBitOrder
Boolean
dbSetBusNetDefBitOrder( dbBusNetDefId busNetDefId, dbBitOrder order );
Description
Sets the bitOrder on the busNetDef object. The busNetDef must be explicit.
Arguments
Return Values
|
Returns TRUE if the bitOrder is set. |
dbGetBusTermDefMinIndex
int
dbGetBusTermDefMinIndex( dbBusTermDefId busTermDefId );
Description
Gets the smallest bit number used for the busTermDef object. This is the smallest index used across all busTerms associated with this busTermDef object.
Arguments
Return Values
|
Returns the smallest bit number used for the busTermDef object. |
dbGetBusTermDefMaxIndex
int
dbGetBusTermDefMaxIndex( dbBusTermDefId busTermDefId );
Description
Gets the largest bit number used for the busTermDef object. This is the largest index used across all busTerms associated with this busTermDef object.
Arguments
Return Values
|
Returns the largest bit number used for the busTermDef object. |
dbGetBusTermDefBaseName
String
dbGetBusTermDefBaseName( dbBusTermDefId busTermDefId );
Description
Gets the base name of the busTermDef object.
Arguments
Return Values
dbGetBusTermDefNumBits
int
dbGetBusTermDefNumBits( dbBusTermDefId busTermDefId );
Description
Gets the number of bits covered by the busses in this busTermDef object. The number is equal to abs(maxIndex - minIndex) + 1.
Arguments
Return Values
|
Returns the number of bits covered by the busses in this busTermDef object. |
dbGetBusTermDefNumBitsUsed
int
dbGetBusTermDefNumBitsUsed( dbBusTermDefId busTermDefId );
Description
Gets the number of bits used by the busses in this busTermDef object. The number is equal to the number of busTermBits.
Arguments
Return Values
|
Returns the number of bits used by the busses in this busTermDef object. |
dbGetBusTermDefBitOrder
bitOrder
dbGetBusTermDefBitOrder( dbBusTermDefId busTermDefId );
Description
Gets the bitOrder of the busTermDef.
Arguments
Return Values
dbSetBusTermDefBitOrder
Boolean
dbSetBusTermDefBitOrder( dbBusTermDefId busTermDefId, dbBitOrder order );
Description
Sets the bitOrder of the busTermDef.
Arguments
Return Values
|
Returns TRUE if the bitOrder is set. |
dbGetVectorInstDefMinIndex
int
dbGetVectorInstDefMinIndex( dbVectorInstDefId vectorInstDefId );
Description
Gets the smallest bit number used for the vectorInst object. This is the smallest index used across all vectorInsts associated with the busNetDef object.
Arguments
Return Values
|
Returns the smallest bit number used for the vectorInst object. |
dbGetVectorInstDefMaxIndex
int
dbGetVectorInstDefMaxIndex( dbVectorInstDefId vectorInstDefId );
Description
Gets the largest bit number used for the vectorInst object. This is the largest index used across all vectorInsts associated with the busNetDef object.
Arguments
Return Values
|
Returns the largest bit number used for the vectorInst object. |
dbGetVectorInstDefBaseName
String
dbGetVectorInstDefBaseName( dbVectorInstDefId vectorInstDefId );
Description
Gets the base name of the vectorInst object.
Arguments
Return Values
dbGetVectorInstDefNumBits
int
dbGetVectorInstDefNumBits( dbVectorInstDefId vectorInstDefId );
Description
Gets the number of bits covered by the busses in the vectorInstDef object. The number is equal to abs(maxIndex - minIndex) +1.
Arguments
Return Values
|
Returns the number of bits covered by the busses in the vectorInstDef object. |
dbGetVectorInstDefNumBitsUsed
int
dbGetVectorInstDefNumBitsUsed( dbVectorInstDefId vectorInstDefId );
Description
Gets the number of bits used by the busses in the vectorInstDef object. The number is equal to the number of vectorInstBits.
Arguments
Return Values
|
Returns the number of bits used by the busses in the vectorInstDef object. |
dbGetVectorInstDefBitOrder
dbBitOrder
dbGetVectorInstDefBitOrder( dbVectorInstDefId vectorInstDefId );
Description
Gets the bitOrder for the vectorInstDef.
Arguments
Return Values
dbSetVectorInstDefBitOrder
Boolean
dbSetVectorInstDefBitOrder( dbVectorInstDefId vectorInstDefId, dbBitOrder order );
Description
Sets the bitOrder for the vectorInstDef.
Arguments
Return Values
|
Returns TRUE if the bitOrder is set. |
Cellview Information
The following functions perform operations and retrieve information on objects found in cellviews.
dbCellViewHasOpticalData
Boolean
dbCellViewHasOpticalData(
dbCellViewId cvId
);
Description
Checks whether the specified cellview has optical data.
Arguments
Return value
Example
dbCellViewHasOpticalData(cv_id)
dbDeleteAllNet
Boolean
dbDeleteAllNet( dbCellViewId cellViewId)
Deletes all nets in a cellview.
dbFindNetByName
dbNetId
dbFindNetByName( dbCellViewId cellViewId, String name );
Finds a net in a cellview by name. The net must be a top-level net.
dbFindSigByName
dbSigId
dbFindSigByName( dbCellViewId cellViewId, String name );
Finds a signal in a cellview by name.
dbFindSigByAlias
dbSigId
dbFindSigByAlias( dbCellViewId cellViewId, String alias );
Finds a signal in a cellview by its alias.
dbFindAnyInstByName
dbAnyInstId
dbFindAnyInstByName( dbCellViewId cellViewId, String name)
Finds any instance in a cellview by name.
dbFindMemInstByName
Boolean
dbFindMemInstByName( dbCellViewId cellViewId, String memName, dbAnyInstId pAnyInstId, unsigned int pInstIndex );
Finds a member instance in a cellview by member name.
dbFindTermByName
dbTermId
dbFindTermByName( dbCellViewId cellViewId, String name)
Finds a terminal in a cellview by name.
dbHasTerm
Boolean
dbHasTerm( dbCellViewId cellViewId );
Returns TRUE if the specified cellview has at least one terminal. Otherwise, the function returns FALSE.
dbStartGenTerm
dbGenStateId
dbStartGenTerm( dbCellViewId cellViewId );
Starts the generator for terminals of the cellview.
dbGenTerm
Boolean
dbGenTerm( dbGenStateId state, dbTermId pTermId );
Generates terminals of the cellview.
dbStartGenMemTermByName
dbGenStateId
dbStartGenMemTermByName( dbCellViewId cellViewId, String memName );
dbGenMemTermByName
Boolean
dbGenMemTermByName ( dbGenStateId state, dbTermId pTermId, unsigned int pTermIndex );
Generates terminals containing the specified member name.
dbStartGenNet
dbGenStateId
dbStartGenNet( dbCellViewId cellViewId );
Starts the generator for top-level nets.
dbGenNet
Boolean
dbGenNet( dbGenStateId state, dbNetId pNetId );
dbStartGenMemInst
dbGenStateId
dbStartGenMemInst( dbCellViewId cellViewId );
Starts the generator for member instances.
dbGenMemInst
Boolean
dbGenMemInst( dbGenStateId state, dbAnyInstId pAnyInstId, int pInstIndex );
dbStartGenSig
dbGenStateId
dbStartGenSig( dbCellViewId cellViewId );
Starts the generator for unique signals in this cellview.
dbGenSig
Boolean
dbGenSig( dbGenStateId state, dbSigId pSigId );
Generates unique signals in this cellview.
dbStartGenConn
dbGenStateId
dbStartGenConn( dbCellViewId cellViewId );
Starts the generator for all connected instance terminals contained in this cellview.
dbGenConn
Boolean
dbGenConn( dbGenStateId state, dbInstTermId pInstTermId );
Generates all connections (all connected instance terminals) contained in this cellview.
Equivalent Connectivity Time Functions
The following functions perform operations like setting, retrieving, and removing equivalent connectivity time on a cellview.
dbCellViewHasEquivalentConnectivityTime
Boolean
dbCellViewHasEquivalentConnectivityTime(
dbCellViewId cvId
)
Description
Checks whether the equivalent connectivity time is set on the specified cellview.
Arguments
Return Value
|
|
|
|
|
Example
dbCellViewHasEquivalentConnectivityTime(cvId) => true
Confirms that a valid equivalent connectivity time is set on the cellview cvId.
dbGetCellViewEquivalentConnectivityTime
Boolean
dbGetCellViewEquivalentConnectivityTime dbCellViewIdcvIdtime_t*equivalentTime)
Description
Retrieves the equivalent connectivity time that is set on the specified cellview.
Arguments
|
Pointer for a time type to store the retrieved equivalent time. |
Return Value
Example
dbGetCellViewEquivalentConnectivityTime(cvId, equivalentTime) => true
Successfully retrieved the equivalent connectivity time that is set on the specified cellview.
dbSetCellViewEquivalentConnectivityTime
Boolean
dbSetCellViewEquivalentConnectivityTime dbCellViewIdcvIdtimeStringtime_t)
Description
Sets the equivalent connectivity time on the specified cellview.
Arguments
Return Value
|
|
|
Example
dbSetCellViewEquivalentConnectivityTime(cvId, currentTime) => true
Successfully retrieved the equivalent connectivity time that is set on the specified cellview.
dbUnsetCellViewEquivalentConnectivityTime
Boolean
dbUnsetCellViewEquivalentConnectivityTime(
dbCellViewId cvId
)
Description
Removes equivalent connectivity time information from the specified cellview
Arguments
Return Value
|
|
|
Example
dbUnsetCellViewEquivalentConnectivityTime(cvId) => true
Equivalent connectivity time information is removed from the cellview cvId. Name Information
The following functions retrieve information about or act on names of nets, terminals, or instances.
dbGetMemName
String
dbGetMemName( String name, int memIndex );
Retrieves the name of the indexed member from the specified name and returns it as a permanent string. For example, given a name (A<15:0>,CLK) and a member index 2, this function returns the member A<13>.
In case of an error, the specified member name returned is composed of the specified name suffixed by the specified <memIndex>. For example, if a member index is 17, a warning message is produced and the string returned is (A<15:0>,CLK)<17>.
dbGetNameNumBit
int
dbGetNameNumBit( String name );
Evaluates the specified name and returns the number of bits implied by the name. The function returns zero if the name specified is not expressed in legal syntax.
The function dbGetInstNameNumInst is documented in Chapter 7, “Instance and Hierarchy Functions.”
dbProduceMemName
Boolean
dbProduceMemName( String name, FuncBooleanPtr myMemNameConsumer, unsigned char pConsumerData );
Produces the names of members from the specified name. For each member name produced, the consumer function is called with the specified consumer data and a pointer to a static buffer that contains the member name.
The consumer data is a pointer to a data structure that you define. The consumer data can also be a NULL pointer. If the consumer function returns TRUE, the producer continues to produce member names. If the consumer function returns FALSE, the producer stops the member name production and returns TRUE.
myMemNameConsumer
The consumer function for the dbProduceMemName function is declared as follows:
Boolean
myMemNameConsumer( String memName, myData pMyData );
Net and Terminal Name Syntax
The name syntax for both nets and terminals is shown below in BNF format (Backus Naur Format) notation. For more information on BNF format, see Design Data Translator’s Reference.
Square brackets ([ ]) indicate that the item enclosed is optional. Either zero or at most one item can be enclosed in brackets. Items enclosed in curly braces ({ }) are also optional, but zero or more items can be enclosed. The vertical bar (|) implies the relationship or. The word number represents a nonnegative integer less than 65536.
nameExpr ::= [ < * number > ] nameTerm { , nameExpr }
nameTerm ::= baseName [ < vectExpr > ] | < nameExpr >
vectExpr ::= vectTerm [ * number ] { , vectExpr }
vectTerm ::= number [ : number [ : number ] ] | < vectExpr >
nameExpr
A string consisting of a name term that is optionally prefixed with the <*N> construct (not shown in the example syntax). This construct is also referred to as a prefix repeat operator, indicating that the name term is repeated (enumerated) N times. The value of N must be larger than zero. Name expressions can be concatenated to form a comma-separated list.
nameTerm
A base name optionally followed by a vector expression contained in angle brackets. A name term can also be a name expression enclosed in parentheses (not shown in the example syntax).
baseName
A string of printable ASCII characters that does not include reserved special characters, such as angle brackets (< >), parentheses (( )), commas (,), slashes (/) or white space. Parentheses (( )) are allowed in a base name only if they are enclosing a number.
vectExpr
A single or repeated vector term. The optional *N suffix on a vector term (not shown in the example syntax) is called a suffix repeat operator and indicates N repetitions of each bit of the vector term. The value of N must be greater than zero. Vector expressions can also be concatenated to form a comma-separated list.
vectTerm
A single number or a range of numbers. A range of numbers can be expressed by a starting, ending, and number increments separated by colons. For example, the range <3:0:2> indicates a starting number of 3 decremented by 2 to member 0, indicating two member numbers 3 and 1 in the expanded form.
A vector term can also be a vector expression enclosed in parentheses (not shown in the example syntax). In this case, the innermost term is expanded first, then the repeat operator is applied to repeat the entire expanded term enclosed in parentheses.
Name and Vector Expression Expansion
The following table gives examples of how name and vector expressions are expanded. The expanded form of a name is semantically equivalent to the original name. You create the expanded form by expanding the range specifications, applying repeat operators, and removing parentheses in the original name.
Use a zero-based counting scheme to find the Nth member in the expanded form. For example, member zero of <*2>(a,<*2>b) is a, member one is b, and member two is b. If the name contains a vector expression, such as b<0:1,2:2>, then member zero in this case is called b<0>, member one is b<1>, and member two is b<2>.
| Name | Number of members | Expanded form |
|---|---|---|
Automatic Database Deletions
Some actions occur automatically within the database to maintain consistency of the data. These actions are associated with deleting the following objects:
- If a net is deleted, its terminal and pins are deleted because these objects cannot exist without a net.
- If a net is deleted, its instance pins and instance terminals are disconnected from that net.
- If a pin or a net is deleted, its figures become disconnected from that pin or net but remain as figures in the cellview.
- If an instance is deleted, the instance terminals and instance pins associated with that instance are disconnected from their nets and deleted.
- If a terminal is deleted, the instance terminals that refer to this terminal from other cellviews are unbound, and the pins attached to this terminal are deleted.
- If a pin is deleted, the instance pins that refer to this pin from other cellviews are unbound.
- If a figure belonging to a pin is deleted, the corresponding pin is deleted.
Constraints on Database Objects
The following rules are additional constraints on the usage and relationships between objects in the database. These constraints are imposed in addition to those implied by the structure of the schema presented in “CDBA Database Objects”.
- A net cannot have the same name as any other net, unless both or all nets have the same root net (that is, both or all nets are logically carrying the same electrical signals).
- Two nets that have the same root net are logically equivalent. If they have different names, both names are aliases for the net. The name of the root net is the preferred name for the net.
- A signal that has a global scope must have a terminal and a net. This is not currently enforced by the system.
- The system makes connections automatically between signals occurring in different nets according to the names of the signals.
Restrictions to the Interface
The following is a list of restrictions on the interface due to the current physical data model.
- A terminal cannot be created for a net that has a signal already attached to a member terminal with a different name. A signal can be connected to more than one member terminal through its nets as long as those member terminals have the same name.
-
The
globalDownOnescope for nets is not implemented. It is defined in EDIF as global. - Terminals for global signals are not automatically created.
- Net names only support one-dimensional indexing.
- Modifying connectivity while using generators can be hazardous.
Connectivity Example Function
The following example program implements connectivity between an inverter and two terminals. The program uses some of the functions described in this chapter.
/*
* Simple schematic containing one inverter and two
* terminals.
*/
#include "db.h" createExample1(dbCellViewId cellViewId)
{
dbCellViewId invCellViewId;
dbInstId instId;
dbNetId netId;
dbInstTermId connId;
dbPoint origin;
/*
* Leave out error status check for clarity.
* Create an inverter instance and hook it up to nets
* and terminals.
*/
invCellViewId = dbOpenCellViewByType("inv", "symbol", "r",
dbcNullCellViewId, "r", NULL);
origin.x = origin.y = 0;
instId = dbCreateInst(cellViewId, invCellViewId, "inv1",
origin,dbcR0, 1);
netId = dbCreateNet(cellViewId, "N1", dbcNullNetId);
termId = dbCreateTerm(netId, "TI", dbcInput, NULL);
dbCreateTerm(netId, "TI", dbcInput, NULL);
connId = dbCreateConnByName(netId, (dbAnyInstId) instId,
"A");
netId = dbCreateNet(cellViewId, "N2", dbcNullNetId);
termId = dbCreateTerm(netId, "TO", dbcOutput, NULL);
dbCreateTerm(netId, "TO", dbcOutput, NULL);
connId = dbCreateConnByName(netId, (dbAnyInstId) instId,
"Y");
}
Return to top