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

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

The class hierarchy for figures is shown in the following table.

Class Hierarchy for Figure

Name

Enumerated constant

ID type for type dbType

Instance

dbcInstType

dbInstId

Shape

-

dbShapeId

Rectangle

dbcRectType

dbRectId

Polygon

dbcPolygonType

dbPolygonId

Line

dbcLineType

dbLineId

Path

dbcPathType

dbPathId

Arc

dbcArcType

dbArcId

Ellipse

dbcEllipseType

dbEllipseId

Label

dbcLabelType

dbLabelId

Donut

dbcDonutType

dbDonutId

Dot

dbcDotType

dbDotId

TextDisplay

dbcTextDisplayType

dbTextDisplayId

Mosaic

dbcMosaicType

dbMosaicId

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

blockageId

The database identifier of the blockage object.

Return Values

Boolean

Returns TRUE if the blockageId refers to a valid blockage object. Returns FALSE otherwise.

dbDeleteBlockage

Boolean 
dbDeleteBlockage( 
dbBlockageId      blockageId 
);

Description

Deletes the blockage object specified by blockageId.

Arguments

blockageId

The database identifier of the blockage to be deleted.

Return Values

Boolean

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

blockageId

The database identifier of the blockage object.

Return Values

Boolean

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

blockageId

The database identifier of the blockage object.

Return Values

Boolean

Returns TRUE if the blockage specified by blockageId is a rectangle. Returns FALSE otherwise.

dbIsBlockagePushedDown

Boolean 
dbIsBlockagePushedDown( 
dbBlockageId      blockageId 
);

Description

Checks that the blockage specified by the database blockageId is pushed down from a higher cellview.

Arguments

blockageId

The database identifier of the blockage object.

Return Values

Boolean

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

blockageId

The database identifier of the blockage object.

pushedDown

Sets the pushedDown field for the specified blockage.

Return Values

Boolean

Returns TRUE if the pushedDown field for the specified blockage was successfully set. Returns FALSE otherwise.

dbGetBlockageType

dbBlockageType
dbGetBlockageType( 
dbBlockageId      blockageId 
);

Description

Gets the blockage type specified by the database blockageId.

Arguments

blockageId

The database identifier of the blockage object.

Return Values

dbBlockageType

Gets the type field for the specified blockage. The default is unknown. The valid enum choices are:

dbcRoutingBlockage
dbcViaRoutingBlockage
dbcPlacementBlockage
dbcWiringBlockage
dbcFillBlockage
dbcSlotBlockage

dbLayerBlockageHasEffectiveWidth

Boolean 
dbLayerBlockageHasEffectiveWidth( 
dbLayerBlockageId      layerBlockageId 
);

Description

Checks that the effective width is set for the layer blockage.

Arguments

layerBlockageId

The database identifier of the layer blockage object.

Return Values

Boolean

Returns TRUE if the effective width is set for the blockage specified by layerBlockageId. Returns FALSE otherwise.

dbGetLayerBlockageEffectiveWidth

dbDistance 
dbGetLayerBlockageEffectiveWidth( 
dbBlockageId      blockageId 
);

Description

Gets the effective width in database units (DBU) of the layer blockage specified by the database blockageId.

Arguments

blockageId

The database identifier of the layer blockage object.

Return Values

dbDistance

Returns the effective width in DBU of the layer blockage.

dbGetBlockageDensity

float 
dbGetBlockageDensity( 
dbBlockageId      blockageId 
);

Description

Gets the density of the blockage specified by the database blockageId.

Arguments

blockageId

The database identifier of the blockage object.

Return Values

float

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

blockageId

The database identifier of the blockage object.

density

The density of the blockage. The density value must be in [0, 100.0].

Return Values

Boolean

Returns TRUE if the blockage density is set successfully.
Returns FALSE otherwise.

dbGetBlockageOwner

dbId 
dbGetBlockageOwner( 
dbBlockageId      blockageId 
);

Description

Gets the owner for the blockage specified by the database blockageId.

Arguments

blockageId

The database identifier of the blockage object.

Return Values

dbId

Returns the owner of the blockage specified by blockageId.

dbSetBlockageOwner

Boolean 
dbSetBlockageOwner( 
dbBlockageId      blockageId, 
dbId          ownerId 
);

Description

Sets the owner for the blockage specified by the database blockageId.

Arguments

blockageId

The database identifier of the blockage object.

ownerId

The owner to be set for the blockage specified by blockageId.

Return Values

Boolean

Returns TRUE if the owner is successfully set for the blockage specified by blockageId. Returns FALSE otherwise.

dbGetBlockage

Boolean 
dbGetBlockage( 
dbBlockageId      blockageId, 
unsigned int      *nPoints, 
dbPoint           **pointArray 
);

Description

Gets the points for the blockage specified by the database blockageId.

Arguments

blockageId

The database identifier of the blockage object.

*nPoints

The pointer to integer to be filled with the number of points for the blockage.

**pointArray

The pointer to dbPoint array to be filled with the points for the blockage.

Return Values

Boolean

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

blockageId

The database identifier of the blockage object.

Return Values

double

Returns the area in DBU squared of the blockage specified by blockageId.

dbIsAreaBlockageId

Boolean 
dbIsAreaBlockageId( 
dbId      objId 
);

Description

Verifies that the objId refers to a valid area blockage object.

Arguments

objId

The database identifier of the blockage object.

Return Values

Boolean

Returns TRUE if the objId is a valid area blockage object.
Returns FALSE otherwise.

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

cvId

The database identifier of the cellview.

ownerId

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.

nPoints

The number of points in the area blockage.

*pointArray

The points that define the area blockage.

Return Values

dbAreaBlockageId

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

areaBlockageId

The database identifier of the area blockage.

npoints

The number of points in the area blockage.

*pointArray

The points that define the area blockage.

Return Values

Boolean

Returns TRUE if the points are set successfully.
Returns FALSE otherwise.

dbTransformAreaBlockage

Boolean 
dbTransformAreaBlockage( 
dbAreaBlockageId      areaBlockageId,
double                scale,
double                angle
);

Description

Transforms the area blockage by the scale and angle.

Arguments

areaBlockageId

The database identifier of the area blockage.

scale

The scale to which to magnify the area blockage.

angle

The angle at which to rotate the area blockage.

Return Values

Boolean

Returns TRUE if the area blockage is transformed successfully.
Returns FALSE otherwise.

dbIsLayerBlockageId

Boolean 
dbIsLayerBlockageId( 
dbId      objId
);

Description

Verifies that the objId refers to a valid layer blockage object.

Arguments

objId

The database identifier of the layer blockage.

Return Values

Boolean

Returns TRUE if the objId refers to a valid layer blockage object.
Returns FALSE otherwise.

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

cvId

The database identifier of the cellview.

layerNum

The layer number of the blockage. If the layer number is unknown or dbcNullLayer, an error results.

type

The type of the layer blockage. If the blockage type is placement, the function creates the layer blockage, but issues a warning.

ownerId

The owner of the layer 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.

nPoints

The number of points in the area blockage.

*pointArray

The points that define the area blockage.

Return Values

dbLayerBlockageId

Returns the dbLayerBlockageId of the created layer blockage object.

dbGetLayerBlockageLayerNum

dbLayer 
dbGetLayerBlockageLayerNum( 
dbLayerBlockageId      layerBlockageId 
);

Description

Gets the layer number of the layer blockage.

Arguments

layerBlockageId

The database identifier of the layer blockage object.

Return Values

dbLayer

Returns the layer number of the layer blockage.

dbSetLayerBlockageLayerNum

Boolean 
dbSetLayerBlockageLayerNum( 
dbLayerBlockageId      layerBlockageId,
dbLayer                layerNum
);

Description

Sets the layer number of the layer blockage.

Arguments

layerBlockageId

The database identifier of the layer blockage object.

dbLayer

The layer number of the layer blockage.

Return Values

Boolean

Returns TRUE if the layer number is set successfully.
Returns FALSE otherwise.

dbGetLayerBlockageLayerHeader

dbLayerHeaderId 
dbGetLayerBlockageLayerHeader( 
dbLayerBlockageId      layerBlockageId 
);

Description

Gets the layerHeader for the layer of the layerBlockageId.

Arguments

layerBlockageId

The database identifier of the layer blockage object.

Return Values

dbLayerHeaderId

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

layerBlockageId

The database identifier of the layer blockage object.

nPoints

Number of points in the layer blockage.

*pointArray

Points that define the layer blockage.

Return Values

Boolean

Returns TRUE if the points are set successfully.
Returns FALSE otherwise.

dbTransformLayerBlockage

Boolean 
dbTransformLayerBlockage( 
dbLayerBlockageId     layerBlockageId,
double                scale,
double                angle
);

Description

Transforms the layer blockage by the scale and angle.

Arguments

layerBlockageId

The database identifier of the layer blockage.

scale

Scale to which to magnify the layer blockage.

angle

Angle at which to rotate the layer blockage.

Return Values

Boolean

Returns TRUE if the layer blockage is transformed successfully.
Returns FALSE otherwise.

dbStartGenBlockage

dbGenStateId 
dbStartGenBlockage( 
dbCellViewId      cvId 
);

Description

Starts generating all the blockages for a cellview.

Arguments

cvId

The database identifier of the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of blockage generation.

dbGenBlockage

Boolean 
dbGenBlockage( 
dbGenStateId      pState, 
dbBlockageId      *blockageId 
);

Description

Generates the next blockage in the cellview.

Arguments

pState

The generator dbGenStateId which keeps track of the state of blockage generation.

*blockageId

A pointer to the blockage ID. Returned if a blockage is generated.

Return Values

Boolean

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

blockageId

The database identifier of the blockage object.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of point generation for the blockage.

dbGenBlockageToPoint

Boolean 
dbGenBlockageToPoint( 
dbGenStateId      pState, 
dbPoint           *point 
);

Description

Generates the next point in the blockage.

Arguments

pState

The generator dbGenStateId which keeps track of the state of point generation.

*point

A pointer to the point. Returned if a point is generated.

Return Values

Boolean

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.

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

id

The database identifier of the area halo object to verify.

Return Values

Boolean

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

ownerId

The owner of the area halo. Value must be either instance or PR boundary.

topOffset

Top offset of the area halo.

bottomOffset

Bottom offset of the area halo.

leftOffset

Left offset of the area halo.

rightOffset

Right offset of the area halo.

Return Values

dbAreaHaloId

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

Deletes the area halo.

Arguments

areaHaloId

The database identifier of the area halo object to delete.

Return Values

Boolean

Returns TRUE if the area halo is deleted.
Returns FALSE if the areaHaloId is invalid.

dbFindAreaHalo

dbAreaHaloId 
dbFindAreaHalo( 
dbId               ownerId
); 

Description

Finds the placement area halo on the owner.

Arguments

ownerId

The database identifier of the area halo owner.

Return Values

Boolean

Returns the database identifier of the area halo.
Returns a NULL database identifier if an area halo does not exist on the owner.

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

areaHaloId

The database identifier of the area halo.

*topOffset

Top offset of the area halo.

*bottomOffset

Bottom offset of the area halo.

*leftOffset

Left offset of the area halo.

*rightOffset

Right offset of the area halo.

Return Values

Boolean

Returns TRUE if the area halo offset pointers are filled successfully.
Returns FALSE otherwise.

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

areaHaloId

The database identifier of the area halo.

topOffset

Top offset of the area halo.

bottomOffset

Bottom offset of the area halo.

leftOffset

Left offset of the area halo.

rightOffset

Right offset of the area halo.

Return Values

Boolean

Returns TRUE if the area halo offsets are set successfully.
Returns FALSE otherwise.

dbStartGenClusterToBlockage

dbGenStateId 
dbStartGenClusterToBlockage( 
dbClusterId      clusterId 
);

Description

Starts generating all the blockage objects owned by the cluster.

Arguments

clusterId

The database identifier of the cluster object.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of the blockage generation.

dbGenClusterToBlockage

Boolean
dbGenClusterToBlockage( 
dbGenStateId      pState, 
dbBlockageId      *blockageId 
); 

Description

Generates the next blockage from the cluster.

Arguments

pState

The generator dbGenStateId which keeps track of the state of the blockage generation.

*blockageId

A pointer to the blockage ID. Returned if a blockage is generated.

Return Values

Boolean

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

clusterId

The database identifier of the cluster object.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of the blockage generation.

dbGenInstToBlockage

Boolean
dbGenInstToBlockage( 
dbGenStateId      pState, 
dbBlockageId      *blockageId 
); 

Description

Generates the next blockage from the instance.

Arguments

pState

The generator dbGenStateId which keeps track of the state of the blockage generation.

*blockageId

A pointer to the dbBlockageID. Returned if a blockage is generated.

Return Values

Boolean

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

clusterId

The database identifier of the cluster object.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of the blockage generation.

dbGenPRBoundaryToBlockage

Boolean
dbGenPRBoundaryToBlockage( 
dbGenStateId      pState, 
dbBlockageId      *blockageId 
); 

Description

Generates the next blockage from the PR boundary.

Arguments

pState

The generator dbGenStateId which keeps track of the state of the blockage generation.

*blockageId

A pointer to the dbBlockageId. Returned if a blockage is generated.

Return Values

Boolean

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:

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.

Object Type

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

objectId

The object Id.

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

ownerId

The owner of the layerHalo. Can only be an instance or a PR boundary.

A warning will be generated if the owner type is wrong. This is enforced by OpenAccess.

type

The type of the layerHalo. The type cannot be “placement”. A warning will be generated if the type is wrong. This is also enforced by OpenAccess.

layNum

The layer to assign to the layerHalo.

topOffset

The top offset of the layerHalo.

bottomOffset

The bottom offset of the layerHalo.

leftOffset

The left offset of the layerHalo.

rightOffset

The right offset of the layerHalo.

dbGetLayerHaloLayerNum

dbLayer
dbGetLayerHaloLayerNum(
dbLayerHaloId      layerHaloId
);

Description

This function returns the layer number of the given layerHalo.

Arguments

layerHaloId

The Id of the layerHalo.

dbSetLayerHaloLayerNum

dbSetLayerHaloLayerNum(
dbLayerHaloId     layerHaloId,
dbLayer           layerNum
);

Description

This function moves the layerHalo to the specified layer.

Arguments

layerHaloId

The Id of the layerHalo.

layerNum

The layer to assign to the layerHalo.

dbGetLayerHaloLayerHeader

dbLayerHeaderId
dbGetLayerHaloLayerHeader(
dbLayerHaloId     layerHaloId
);

Description

This function returns the layer header for the layer of the given layerHalo.

Arguments

layerHaloId

The Id of the layerHalo.

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

layerHaloId

The Id of the layerHalo.

topOffset

The top offset of the layerHalo.

bottomOffset

The bottom offset of the layerHalo.

leftOffset

The left offset of the layerHalo.

rightOffset

The right offset of the layerHalo.

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

layerHaloId

The Id of the layerHalo.

topOffset

The top offset of the layerHalo.

bottomOffset

The bottom offset of the layerHalo.

leftOffset

The left offset of the layerHalo.

rightOffset

The right offset of the layerHalo.

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

boundaryId

The database dbBoundaryId for the boundary object to be verified.

Return Values

Boolean

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

objId

The database ID for the object to be verified.

Return Values

Boolean

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

boundaryId

The database dbboundaryId for the cluster boundary object to be verified.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId for the PR boundary object to be verified.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId for the snap boundary object to be verified.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

*name

Name of the area boundary. Optional.
If not specified, the database assigns using the format B__n, where n is a number that makes the boundary name unique.

nPoints

Specifies the number of points for the boundary.

*pointArray

Pointer to an array of points for the boundary.
A point array with fewer than 3 points is an error. A NULL is returned and a warning issued.
If the point array contains co-linear points, the array is compressed and the extra points removed.

**edgeNames

Contains the name of each edge. Optional.
If specified, the number of names is assumed to be the same as the number of edges.
If not specified, the database generates a name for each edge using the format EDGE_n, where n is a number starting at 0 and incrementing by 1 for each edge.

Return Values

dbAreaBoundaryId

Returns the database ID of the area boundary created.
Returns a NULL ID, if the area boundary creation fails.

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

clusterId

The database dbClusterId for the cluster.

*name

The name of the boundary.

nPoints

Specifies the number of points for the boundary.

*pointArray

Pointer to an array of points for the boundary.

**edgeNames

Contains the name of each edge. If given, the number of names is assumed to be the same as the number of edges. Otherwise, a name for each edge is automatically generated. Names take the form of EDGE_n, where n is an integer starting from 0 and incrementing by 1. Names are optional.

Return Values

dbClusterBoundaryId

Returns the database dbClusterBoundaryId for the cluster boundary created.

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

cvId

The database dbCellViewId for the cellview.

nPoints

Specifies the number of points for the boundary.

*pointArray

Pointer to an array of points for the boundary.

**edgeNames

Contains the name of each edge. If given, the number of names is assumed to be the same as the number of edges. Otherwise, a name for each edge is automatically generated. Names take the form of EDGE_n, where n is an integer starting from 0 and incrementing by 1. Names are optional.

Return Values

dbPRBoundaryId

Returns the database dbPRBoundaryId for the PR boundary created.

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

cvId

The database dbCellViewId for the cell view.

nPoints

Specifies the number of points for the boundary.

*pointArray

Points to an array of points for the boundary.

**edgeNames

A string array containing the name of each edge. If given, the number of names is assumed to be the same as the number of edges. Otherwise, a name for each edge is automatically generated. Names take the form of EDGE_n, where n is an integer starting from 0 and incrementing by 1. Names are optional.

Return Values

dbSnapBoundaryId

Returns the database dbSnapBoundaryId for the snap boundary created.

dbDeleteBoundary

Boolean 
dbDeleteBoundary( 
dbBoundaryId      boundaryId 
); 

Description

Deletes the boundary object specified by boundaryId.

Arguments

boundaryId

The database dbBoundaryId for the boundary object to be deleted.

Return Values

Boolean

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

cvId

The cellview to search for the area boundary.

*name

A text string containing the area boundary name.

Return Values

dbAreaBoundaryId

Returns the ID of the area boundary.

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

clusterId

The database dbClusterId to search for a boundary by name.

*name

A text string containing the boundary name.

Return Values

dbBoundaryId

Returns a dbClusterBoundaryId found in the specified cluster.

dbGetAreaBoundary

String 
dbGetAreaBoundaryName( 
dbAreaBoundaryId      boundaryId 
); 

Description

Gets the name of the area boundary.

Arguments

boundaryId

The database ID of the area boundary.

Return Values

String

Returns the name of the area boundary object.

dbSetAreaBoundary

Boolean
dbSetAreaBoundaryName( 
dbAreaBoundaryId      boundaryId, 
const char            *name
); 

Description

Sets the name of the area boundary.

Arguments

boundaryId

The database ID of the area boundary.

*name

Pointer to the area boundary name.

Return Values

Boolean

Returns TRUE if the area boundary name is set.
Returns FALSE otherwise.

dbGetPRBoundary

dbPRBoundaryId 
dbGetPRBoundary( 
dbCellViewId      cvId 
); 

Description

Gets the place and route (PR) boundary in the given cellview.

Arguments

cvId

The database dbCellViewId for the cellview to be searched for a PR boundary.

Return Values

dbBoundaryId

Returns the dbPRBoundaryId for the PR boundary object found.

dbGetPRBoundaryCoreBoxSpec

Boolean 
dbGetPRBoundaryCoreBoxSpec( 
dbPRBoundaryId      prBoundaryId, 
dbCoreBoxSpec       *coreBoxSpec
); 

Description

Gets the coreBoxSpec of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

*coreBoxSpec

Pointer to the coreBoxSpec.

Return Values

Boolean

Returns TRUE if the function successfully gets the coreBoxSpec.
Returns FALSE otherwise.

dbSetPRBoundaryCoreBoxSpec

Boolean 
dbGetPRBoundaryCoreBoxSpec( 
dbPRBoundaryId      prBoundaryId, 
const dbCoreBoxSpec       *coreBoxSpec
); 

Description

Sets the coreBoxSpec of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

*coreBoxSpec

Pointer to the coreBoxSpec.

Return Values

Boolean

Returns TRUE if the function successfully sets the coreBoxSpec.
Returns FALSE otherwise.

dbRemovePRBoundaryCoreBoxSpec

Boolean 
dbRemovePRBoundaryCoreBoxSpec( 
dbPRBoundaryId      prBoundaryId
); 

Description

Removes the coreBoxSpec of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

Return Values

Boolean

Returns TRUE if the function successfully removes the coreBoxSpec.
Returns FALSE otherwise.

dbGetPRBoundaryIOBox

dbBBox *
dbGetPRBoundaryIOBoxSpec( 
dbPRBoundaryId      prBoundaryId 
); 

Description

Gets the IO box of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

Return Values

dbBBox *

Returns the IO box of the PR boundary.

dbSetPRBoundaryIOBox

Boolean 
dbSetPRBoundaryIOBox( 
dbPRBoundaryId      prBoundaryId, 
const dbBBox       *bBox
); 

Description

Sets the IO box of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

*bBox

Pointer to the IO box.

Return Values

Boolean

Returns TRUE if the function successfully sets the IO box.
Returns FALSE otherwise.

dbRemovePRBoundaryIOBox

Boolean 
dbRemovePRBoundaryIOBox( 
dbPRBoundaryId      prBoundaryId
); 

Description

Removes the IO box of the PR boundary.

Arguments

prBoundaryId

The PR boundary ID.

Return Values

Boolean

Returns TRUE if the function successfully removes the IO box.
Returns FALSE otherwise.

dbStartGenPRBoundaryToBlockage

dbGenStateId 
dbStartGenPRBoundaryToBlockage( 
dbPRBoundaryId      prBoundaryId 
); 

Description

Starts generating all blockages owned by the PR boundary.

Arguments

prBoundaryId

The database ID of the PR boundary.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of the blockage generation.

dbGetCoreBoxSpecNumRows

int 
dbGetCoreBoxSpecNumRows( 
const dbCoreBoxSpec      *coreBoxSpec
); 

Description

Gets the number of rows in the PR boundary coreBoxSpec.

Arguments

*coreBoxSpec

Pointer to the coreBoxSpec.

Return Values

int

Returns the number of rows in the coreBoxSpec.

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

*coreBoxSpec

Pointer to the coreBoxSpec.

int

The row number index.

Return Values

dbBBox *

Returns the bounding box of the row indexed.

dbGetSnapBoundary

dbSnapBoundaryId 
dbGetSnapBoundary( 
dbCellViewId      cvId 
); 

Description

Gets the snap boundary in the given cellview.

Arguments

cvId

The database dbCellViewId for the cellview to be searched for a snap boundary.

Return Values

dbBoundaryId

Returns the dbSnapBoundaryId for the snap boundary object found.

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

boundaryId

The database dbBoundaryId for the boundary to be transformed.

scale

Scale to which to magnify.

angle

Angle at which to rotate in radians.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId to search for a cluster boundary name.

Return Values

String

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

boundaryId

The database dbBoundaryId for the boundary object.

*name

The name to be given to the cluster boundary.

Return Values

Boolean

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

boundaryId

The database dbClusterBoundaryId for the boundary object.

Return Values

dbClusterId

Returns the clusterId of the specified cluster boundary.

dbIsBoundaryOrthogonal

Boolean 
dbIsBoundaryOrthogonal( 
dbBoundaryId      boundaryId 
); 

Description

Checks that the point array for a boundary is orthogonal.

Arguments

boundaryId

The database dbBoundaryId for the boundary object.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId for the boundary object.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId for the boundary object.

Return Values

double

Returns the area in DBU squared for the boundary specified by BoundaryId.

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

boundaryId

The database dbBoundaryId for the boundary object.

nPoints

Pointer to integer to be filled with the number of points for the boundary.

*pointArray

Pointer to dbPoint array to be filled with the points for the boundary.

**edgeNames

Pointer to String array to be filled with the names for the edges of the boundary.

Return Values

Boolean

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

boundaryId

The database dbBoundaryId for the boundary object.

nPoints

Pointer to integer to be filled with the number of points for the boundary.

*pointArray

Pointer to dbPoint array to be filled with the points for the boundary.

**edgeNames

A string array containing the name of each edge. If given, the number of names is assumed to be the same as the number of edges. Otherwise, a name for each edge is automatically generated. Names take the form of EDGE_n, where n is an integer starting from 0 and incrementing by 1. Names are optional.

Return Values

Boolean

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.

A cellview can contain only one PR boundary and one snap boundary. This function does not return either. Clusters own cluster boundaries. To generate cluster boundaries, first generate clusters in the cellview, then generate cluster boundaries for each cluster.

Arguments

cvId

The database ID of the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of area boundary generation.

dbGenAreaBoundary

Boolean 
dbGenAreaBoundary( 
dbGenStateId      pState, 
dbAreaBoundaryId *areaBoundaryId
); 

Description

Generates all the area boundaries in the cellview.

Arguments

pState

The generator dbGenStateId used to track the state of area boundary generation.

*areaBoundaryId

The dbAreaBoundaryId pointer, filled if an area boundary is generated.

Return Values

Boolean

Returns TRUE if an area boundary is generated.
Returns FALSE otherwise.

dbStartGenClusterToBoundary

dbGenStateId 
dbStartGenClusterToBoundary( 
dbClusterId      clusterId 
); 

Description

Starts generating all the boundaries in a cluster.

Arguments

clusterId

The database dbClusterId for the cluster object.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of boundary generation.

dbGenClusterToBoundary

Boolean
dbGenClusterToBoundary( 
dbGenStateId             pState, 
dbClusterBoundaryId      *boundaryId 
); 

Description

Generates the next boundary in the cluster.

Arguments

pState

The generator dbGenStateId used to track the state of boundary generation.

*boundaryId

The pointer to the dbClusterBoundaryId. Returned if a boundary is generated.

Return Values

Boolean

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

boundaryId

The database dbMarkerId for the boundary object.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of boundary generation.

dbGenBoundaryToPoint

Boolean 
dbGenBoundayToPoint( 
dbGenStateId      pState, 
dbPoint           *point 
);

Description

Generates the next point in the boundary.

Arguments

pState

The generator dbGenStateId used to track the state of point generation.

*point

A pointer to dbPoint. Returned if a point is generated.

Return Values

Boolean

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

cvId

The cellview ID in which to generate the cluster objects.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of cluster generation.

dbGenCluster

Boolean
dbGenCluster( 
dbGenStateId      pState, 
dbCluster*        clusterId 
); 

Description

Generates the next cluster in the cellview.

Arguments

pState

The generator dbGenStateId used to track the state of cluster generation.

clusterId

The dbCluster pointer. Returned by the function if a cluster is generated.

Return Values

Boolean

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

id

The database identifier of the layer header.

Return Values

Boolean

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

cvId

The database identifier of the cellview.

layerNum

The layer number on which to find the layer header.

Return Values

dbLayerHeaderId

Returns the identifier of the layer header.

dbGetLayerHeaderLayerNum

dbLayer 
dbGetLayerHeaderLayerNum( 
dbLayerHeaderId      layerHeaderId 
); 

Description

Gets the layer number of the layer header.

Arguments

layerHeaderId

The database identifier of the layer header.

Return Values

dbLayer

Returns the layer number of the specified layer header.

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

layerHeaderId

The database identifier of the layer header.

Return Values

Boolean

Returns TRUE if the layer header is bound to a technology database layer.
Returns FALSE otherwise.

dbGetLayerSteinerBBox

dbBBox *
dbGetLayerSteinerBBox( 
dbCellViewId      cvId,
dbLayer           layerNum 
); 

Description

Gets the combined BBox of the steiners from the layer header of the layer.

Arguments

cvId

The database identifier of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbBBox *

Returns the combined BBox of the steiners from the layer header of the layer.
Returns FALSE or NULL if no layer header is found.

dbGetLayerGuideBBox

dbBBox *
dbGetLayerGuideBBox( 
dbCellViewId      cvId,
dbLayer           layerNum 
); 

Description

Gets the combined BBox of the guides from the layer header of the layer.

Arguments

cvId

The database identifier of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbBBox *

Returns the combined BBox of the guides from the layer header of the layer.
Returns FALSE or NULL if no layer header is found.

dbGetLayerBlockageBBox

dbBBox *
dbGetLayerBlockageBBox( 
dbCellViewId      cvId,
dbLayer           layerNum 
); 

Description

Gets the combined BBox of the blockages from the layer header of the layer.

Arguments

cvId

The database identifier of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbBBox *

Returns the combined BBox of the blockages from the layer header of the layer.
Returns FALSE or NULL if no layer header is found.

dbGetLPPHeaderLayerHeader

dbLayerHeaderId 
dbGetLPPHeaderLayerHeader( 
dbLPPHeaderId          lppHeaderId 
); 

Description

Gets the layerHeader with which the lppHeader associates.

Arguments

lppHeaderId

The database dbLPPHeaderId of the layer header.

Return Values

dbLayerHeaderId

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

cvId

The database dbCellViewId of the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of layerHeader generation.

dbGenLayerHeader

Boolean 
dbGenLayerHeader( 
dbGenStateId         pState, 
dbLayerHeaderId      *layerHeaderId 
); 

Description

Generates the layer headers in the cellview.

Arguments

pState

The generator dbGenStateId which keeps track of the state of layer header generation.

*layerHeaderId

A pointer to the dbLayerHeaderId. Returned if a layer header is generated.

Return Values

Boolean

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

cvId

The database dbCellViewId of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of steiner generation.

dbGenLayerToSteiner

Boolean 
dbGenLayerToSteiner( 
dbGenStateId     pState, 
dbSteinerId      *steinerId 
); 

Description

Generates the steiners on the layer header of the specified layer.

Arguments

pState

The generator dbGenStateId which keeps track of the state of steiner generation.

*steinerId

The dbSteinerId pointer. Returned if a steiner is generated.

Return Values

Boolean

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

cvId

The database dbCellViewId of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of guide generation.

dbGenLayerToGuide

Boolean 
dbGenLayerToGuide( 
dbGenStateId     pState, 
dbGuideId        *guideId 
); 

Description

Generates the guides on the layer header of the specified layer.

Arguments

pState

The generator dbGenStateId which keeps track of the state of guide generation.

*guideId

The dbSteinerId pointer. Returned if a guide is generated.

Return Values

Boolean

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

cvId

The database dbCellViewId of the cellview.

layerNum

The layer number. The function uses the layer number to obtain the layer header in the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of blockage generation.

dbGenLayerToBlockage

Boolean 
dbGenLayerToBlockage( 
dbGenStateId       pState, 
dbBlockageId      *blockageId 
); 

Description

Generates the blockages on the layer header of the specified layer.

Arguments

pState

The generator dbGenStateId which keeps track of the state of blockage generation.

*blockageId

The dbSteinerId pointer. Returned if a blockage is generated.

Return Values

Boolean

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

layerHeaderId

The database dbLayerHeaderId of the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId which keeps track of the state of lppHeader generation.

dbGenLayerHeaderToLPPHeader

Boolean 
dbGenLayerHeaderToLPPHeader( 
dbGenStateId       pState, 
dbLPPHeaderId      *lppHeaderId 
); 

Description

Generates the lppHeaders that contain the layer of the specified layerHeader.

Arguments

pState

The generator dbGenStateId which keeps track of the state of lppHeader generation.

*lppHeaderId

The dbSteinerId pointer. Returned if an lppHeader is generated.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

*msg

String of the message associated with the marker.

*shortMsg

String of the short message associated with the marker.

*tool

String of the tool associated with the marker.

isVisible

Boolean setting the isVisible field for the specified object.

isClosed

Boolean indicating the point array associated with the marker as closed.

severity

Sets the severity field for the specified marker. The valid enum choices are:
dbcMarkerAnnotation
dbcMarkerInfo
dbcMarkerAcknowledgedWarning
dbcMarkerWarning
dbcMarkerSignedOffError
dbcMarkerError
dbcMarkerSignedOffCriticalError
dbcMarkerCriticalError
dbcMarkerFatalError

deleteWhen

The enum value indicates when the database automatically deletes the marker. The valid enum choices are:
dbcDeleteNever
dbcDeleteFirst
dbcDeleteLast
dbcDeleteModify

nPoints

The number of Points for this marker.

*pointArray

Pointer to an array that containing the points for the marker.

nObjects

The number of objects associated with the marker.

*objectIds

An array of object ids that are associated with the marker.

Return Values

dbMarkerId

Returns the database dbMarkerId for the marker if a marker object is created. Returns FALSE otherwise.

dbDeleteMarker

Boolean 
dbDeleteMarker( 
dbMarkerId      markerId 
); 

Description

Deletes the marker object specified by markerId.

Arguments

markerId

The database dbMarkerId for the marker to be deleted.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker to be transformed.

scale

Scale to be magnified to.

angle

Angle to be rotated in radians.

Return Values

Boolean

Returns TRUE if the marker object was successfully transformed. Returns FALSE otherwise.

dbAddObjectToMarker

Boolean 
dbAddObjectToMarker( 
dbMarkerId      markerId, 
dbId            objectId 
); 

Description

Adds an object to the marker.

Arguments

markerId

The database dbMarkerId for the marker.

objectId

The ID of the object to be added to the marker.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker.

objectId

The ID of the object to be removed from the marker.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

Boolean

Returns TRUE if the marker specified by markerId is visible. Returns FALSE otherwise.

dbSetMarkerVisible

Boolean 
dbSetMarkerVisible( 
dbMarkerId      markerId, 
Boolean         isVisible 
); 

Description

Sets the isVisible field for the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

isVisible

Sets the isVisible field for the specified marker.

Return Values

Boolean

Returns TRUE if the isVisible field for the specified marker is successfully set. Returns FALSE otherwise.

dbIsMarkerClosed

Boolean 
dbIsMarkerClosed( 
dbMarkerId      markerId 
); 

Description

Verifies that the marker specified by the database markerId is closed.

Arguments

markerId

The database dbMarkerId for the marker object.

Return Values

Boolean

Returns TRUE if the marker specified by markerId is closed. Returns FALSE otherwise.

dbSetMarkerClosed

Boolean 
dbSetMarkerClosed( 
dbMarkerId      markerId, 
Boolean         isClosed 
); 

Description

Sets the isClosed field for the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

isClosed

Sets the isClosed field for the specified marker.

Return Values

Boolean

Returns TRUE if the isClosed field of the specified marker is successfully set. Returns FALSE otherwise.

dbGetMarkerSeverity

dbMarkerSeverity 
dbGetMarkerSeverity( 
dbMarkerId      markerId, 
); 

Description

Gets the severity of the violation shown by the given marker, defaults to info.

Arguments

markerId

The database dbMarkerId for the marker object.

Return Values

dbMarkerSeverity

Gets the severity field for the specified marker. The default is info. The valid enum choices are:
The valid enum choices are:
dbcMarkerAnnotation
dbcMarkerInfo
dbcMarkerAcknowledgedWarning
dbcMarkerWarning
dbcMarkerSignedOffError
dbcMarkerError
dbcMarkerSignedOffCriticalError
dbcMarkerCriticalError
dbcMarkerFatalError

dbSetMarkerSeverity

Boolean 
dbSetMarkerSeverity( 
dbMarkerId               markerId, 
dbMarkerSeverity         severity 
); 

Description

Sets the severity field for the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

severity

Sets the severity field for the specified marker. The valid enum choices are:
The valid enum choices are:
dbcMarkerAnnotation
dbcMarkerInfo
dbcMarkerAcknowledgedWarning
dbcMarkerWarning
dbcMarkerSignedOffError
dbcMarkerError
dbcMarkerSignedOffCriticalError
dbcMarkerCriticalError
dbcMarkerFatalError

Return Values

Boolean

Returns TRUE if the severity field of the specified marker is successfully set. Returns FALSE otherwise.

dbMarkerSeverityToString

String 
dbMarkerSeverityToString(
dbMarkerSeverity    severity
); 

Description

Converts an enumerated value to a string for the severity attribute of a marker object.

Arguments

severity

The enumerated value of the severity attribute of the specified marker object. The valid enum choices are:
dbcMarkerAnnotation
dbcMarkerInfo
dbcMarkerAcknowledgedWarning
dbcMarkerWarning
dbcMarkerSignedOffError
dbcMarkerError
dbcMarkerSignedOffCriticalError
dbcMarkerCriticalError
dbcMarkerFatalError

Return Values

String

Returns the name of the severity attribute of a marker object. The valid string values are:
"annotation"
"info"
"acknowledgedWarning"
"warning"
"signedOffError"
"error"
"signedOffCriticalError"
"criticalError"
"fatalError"

dbStringToMarkerSeverity

dbMarkerSeverity
dbStringToMarkerSeverity(
constString    s
); 

Description

Converts a string to an enumerated value for the severity attribute of a marker object.

Arguments

s

The name of the severity attribute of the specified marker object.

The valid string values are:
"annotation"
"info"
"acknowledgedWarning"
"warning"
"signedOffError"
"error"
"signedOffCriticalError"
"criticalError"
"fatalError"

Return Values

dbMarkerSeverity

Returns the enumerated value of the severity attribute of a marker object. The valid enum values are:
dbcMarkerAnnotation
dbcMarkerInfo
dbcMarkerAcknowledgedWarning
dbcMarkerWarning
dbcMarkerSignedOffError
dbcMarkerError
dbcMarkerSignedOffCriticalError
dbcMarkerCriticalError
dbcMarkerFatalError

dbGetMarkerMsg

String 
dbGetMarkerMsg( 
dbMarkerId      markerId, 
); 

Description

Gets the message associated with the marker given in the database markerId

Arguments

markerId

The database dbMarkerId for the marker object.

Return Values

String

Returns the message associated with the marker.

dbSetMarkerMsg

Boolean 
dbSetMarkerMsg( 
dbMarkerId      markerId, 
const char      *msg 
); 

Description

Associates the message with the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

*msg

Message to be associated with the specified marker.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

String

Returns the short message associated with the marker.

dbSetMarkerShortMsg

Boolean 
dbSetMarkerShortMsg( 
dbMarkerId      markerId, 
const char      *shortMsg 
); 

Description

Associates the short message with the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

*shortMsg

Short message to be associated with the specified marker.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

String

Returns the tool name associated with the marker.

dbSetMarkerTool

Boolean 
dbSetMarkerTool( 
dbMarkerId      markerId, 
const char      *tool 
); 

Description

Sets the tool name Associated with the specified marker.

Arguments

markerId

The database dbMarkerId for the marker to be set.

*tool

Tool name to be associated with the specified marker.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

dbDeleteWhenType

Returns the value of the deleteWhen marker. The valid enum choices are:
dbcDeleteNever
dbcDeleteFirst
dbcDeleteLast
dbcDeleteModify

dbSetMarkerDeleteWhen

Boolean 
dbSetMarkerDeleteWhen( 
dbMarkerId            markerId, 
dbDeleteWhenType      deleteWhen 
); 

Sets the deleteWhen attribute for the marker specified by markerId.

Arguments

markerId

The database dbMarkerId for the marker object.

deleteWhen

The value of the deleteWhen attribute. The valid enum choices are:
dbcDeleteNever
dbcDeleteFirst
dbcDeleteLast
dbcDeleteModify

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

*nPoints

A pointer to the number of marker points. Returned by the function if points are retrieved.

**pointArray

The pointer to the marker points array. Returned by the function if points are retrieved.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

nPoints

The number of marker points to be set for the marker.

*pointArray

The points array to be set for the marker.

Return Values

Boolean

Returns TRUE if the point field of the specified marker is set. Returns FALSE otherwise.

dbStartGenMarker

dbGenStateId 
dbStartGenMarker( 
dbCellViewId      cvId 
); 

Description

Starts generating all the markers for a cellview.

Arguments

cvId

The database dbCellViewId for the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of marker generation.

dbGenMarker

Boolean 
dbGenMarker( 
dbGenStateId      pState, 
dbMarkerId        *pMarkerId 
); 

Description

Generates the next marker in the cellview.

Arguments

pState

The generator dbGenStateId used to track the state of marker generation.

*pMarkerId

The dbMarkerId pointer. Returned by the function if a marker is generated.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of point generation.

dbGenMarkerToPoint

Boolean 
dbGenMarkerToPoint( 
dbGenStateId      pState, 
dbPoint           *point 
); 

Description

Generates the next point in the marker.

Arguments

pState

The generator dbGenStateId used to track the state of point generation.

*point

The dbPoint pointer. Returned by the function if a point is generated.

Return Values

Boolean

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

markerId

The database dbMarkerId for the marker object.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of object generation.

dbGenMarkerToObject

Boolean 
dbGenMarkerToObject( 
dbGenStateId      pState, 
dbId              *objId 
); 

Description

Generates the next object for the given marker.

Arguments

pState

The generator dbGenStateId used to track the state of object generation.

*objId

The objId pointer. Returned by the function if an object is generated.

Return Values

Boolean

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

objId

The database dbId for the object.

Return Values

dbGenStateId

The generator dbGenStateId used to track the state of marker generation.

dbGenObjectToMarker

Boolean 
dbGenObjectToMarker( 
dbGenStateId      pState, 
dbMarkerId        *markerId 
); 

Description

Generates the next marker on the object.

Arguments

pState

The generator dbGenStateId used to track the state of marker generation.

*markerId

The dbMarkerId pointer. Returned by the function if a marker is generated.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

siteDefName

A text string containing the name of the siteDef.

Return Values

dbRowHeaderId

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

Return Values

dbSiteDefId

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

*siteDefName

The name of the siteDef associated with the rowHeader. A string pointer which is assigned to the siteDefName returned.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

siteDefWidth

The width of the siteDef associated with the rowHeader. The siteDefWidth pointer is filled by the function.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

siteDefHeight

The height of the siteDef associated with the rowHeader. The siteDefHeight pointer is filled by the function.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

rowHeaderBBox

The bBox of all the rows that refer to the row Header. The rowHeaderBBox pointer is filled by the function.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

numRows

The number of rows that refer to the rowHeader. The numRows pointer is filled by the function.

Return Values

Boolean

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

rowHeaderId

The database dbRowHeaderId for the rowHeader object.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of rowHeader generation.

dbGenRowHeader

Boolean 
dbGenRowHeader( 
dbGenStateId       pState, 
dbRowHeaderId*     pRowHeaderId 
); 

Description

Generates the next rowHeader in the cellview.

Arguments

pState

The generator dbGenStateId used to track the state of rowHeader generation.

pRowHeaderId

The dbRowHeaderId pointer. Filled by the function if a rowHeader is generated.

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
);

Description

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

objId

The database ID of the steiner object.

Return Values

Boolean

Returns TRUE if the dbId is a valid steiner object.
Returns FALSE otherwise.

dbDeleteSteiner

Boolean 
dbDeleteSteiner( 
dbSteinerId            steinerId 
); 

Description

Deletes the dbSteinerId object.

Arguments

steinerId

The database ID of the steiner object.

Return Values

Boolean

Returns TRUE if the steinerId is deleted.
Returns FALSE otherwise.

dbCreateSteiner

dbSteinerId 
dbCreateSteiner( 
dbCellViewId            cvId,
dbBBox                  *bBox,
dbLayer                 layerNum
); 

Description

Creates a steiner object with the specified attributes.

Arguments

cvId

The database ID of the cellview.

*bBox

A pointer to the bounding box for the steiner.

layerNum

The layer with which to associate the steiner. If layerNum is dbcNullLayer, the steiner is not on a specific layer.

Return Values

Boolean

Returns dbSteinerId if the steiner is created.
Returns FALSE otherwise.

dbGetSteinerBBox

dbBBox * 
dbGetSteinerBBox( 
dbSteinerId            steinerId
); 

Description

Gets the bounding box of the steiner object.

Arguments

steinerId

The database ID of the steiner.

Return Values

dbBBox *

Returns the bounding box of the steiner.

dbSetSteinerBBox

Boolean 
dbSetSteinerBBox( 
dbSteinerId            steinerId, 
const dbBBox           *bBox
); 

Description

Sets the bounding box of the steiner object.

Arguments

steinerId

The database ID of the steiner.

*bBox

The bounding box of the steiner.

Return Values

Boolean

Returns TRUE if the steiner bounding box is set successfully.
Returns FALSE otherwise.

dbGetSteinerLayerHeader

dbLayerHeaderId 
dbGetSteinerLayerHeader( 
dbSteinerId            steinerId
); 

Description

Gets the layer header of the steiner object.

Arguments

steinerId

The database ID of the steiner.

Return Values

dbLayer

Returns the layer header of the steiner object.
Returns dbcNullId if the steiner is not on a specific layer.

dbGetSteinerLayerNum

dbLayer 
dbGetSteinerLayerNum( 
dbSteinerId            steinerId
); 

Description

Gets the layer number on which the steiner object resides.

Arguments

steinerId

The database ID of the steiner.

Return Values

dbLayer

Returns the layer on which the steiner object resides.
Returns dbcNullLayer if the steiner is not on a specific layer.

dbSetSteinerLayerNum

Boolean 
dbSetSteinerLayerNum( 
dbSteinerId            steinerId, 
dbLayer                layerNum
); 

Description

Sets the layer number on which the steiner resides.

Arguments

steinerId

The database ID of the steiner.

layerNum

The layer number to associate with the steiner.

Return Values

Boolean

Returns TRUE if the steiner layer is set successfully.
Returns FALSE otherwise.

dbStartGenSteiner

dbGenStateId 
dbStartGenSteiner( 
dbCellViewId      cvId 
) 

Description

Starts generating all the steiners in the cellview.

Arguments

cvId

The cellview ID for which to generate the steiner objects.

Return Values

dbGenStateId

The generator dbGenStateId which keeps track of the state of steiner generation.

dbGenSteiner

Boolean 
dbGenSteiner( 
dbGenStateId      pState, 
dbSteinerId       *steinerId 
) 

Description

Generates the next steiner in the cellview.

Arguments

pState

The generator dbGenStateId used to keep track of the state of steiner generation.

*steinerId

Pointer to be filled with the next steiner in the cellview.

Return Values

Boolean

Returns TRUE if the steiner object is generated.
Returns FALSE otherwise.

dbStartGenSteinerToRoute

dbGenStateId 
dbStartGenSteinerToRoute( 
dbSteinerId      steinerId 
) 

Description

Starts generation of the routes associated with the specified steiner object.

Arguments

steinerId

The steiner ID for which to generate the routes.

Return Values

dbGenStateId

The generator dbGenStateId which keeps track of the state of route generation for the steiner object.

dbGenSteinerToRoute

Boolean 
dbGenSteinerToRoute( 
dbGenStateId      pState, 
dbRouteId       *routeId 
) 

Description

Generates the next route for the specified steiner.

Arguments

pState

The generator dbGenStateId which keeps track of the state of route generation for the steiner objects.

routeId

Pointer to be filled with the next route for the steiner.

Return Values

Boolean

Returns TRUE if the route is generated.
Returns FALSE otherwise.

dbCreateTapSteiner

dbSteinerId
dbCreateTapSteiner(
dbCellViewId cvId,
const dbBBox *bbox,
dbLayer layerNum
)

Description

Creates a Tap Steiner object with the specified bounding box in the given cellview.

Arguments

cvId

Database ID of a cellview.

bbox

List of bBox for the Tap Steiner object that will be created.

layerNum

Layer associated with the created Tap Steiner object that will be created.

Return Value

d_steinerId

ID of the created Tap Steiner.

dbIsTapSteiner

Boolean
dbIsTapSteinerId(
dbSteinerId steinerId
)

Description

Checks whether the specified ID is a Tap Steiner ID.

Arguments

steinerId

ID of an object.

Return Value

Boolean

TRUE, if the object is a Tap Steiner object.

FALSE, if the object is not a Tap Steiner object.

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

trackPatternId

The database dbTrackPatternId for the track pattern to be verified.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

isHorizontal

TRUE if the tracks should be horizontal, otherwise FALSE (vertical).

startCoord

The starting coordinate for the trackPattern.

numTracks

The number of lines for the trackPattern.

trackSpace

The space value between two track lines.

layer

The layer to be associated with the trackPattern. If the trackPattern is not assigned to ny layer, the parameter should be dbcNullLayer.

Return Values

dbTrackPatternId

Returns the database dbTrackPatternId for the track pattern if a track pattern is created. Returns FALSE otherwise.

dbDeleteTrackPattern

Boolean 
dbDeleteTrackPattern( 
dbTrackPatternId      tpId 
); 

Description

Deletes the track pattern specified by tpId.

Arguments

tpId

The database dbTrackPatternId for the track pattern to be deleted.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the track pattern to be verified.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

*start

A pointer to the start coordinate of the trackPattern. Returned if the start coordinate is retrieved.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

start

The start coordinate value to be set for the trackPattern specified by tpId.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the track pattern.

*numTracks

A pointer to the number of track lines of the trackPattern. Returned if the number of track lines is retrieved.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

num

The number of track lines to be set for the trackPattern.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

*space

A pointer to the tracking space of the trackPattern. Returned if the tracking space is retrieved.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

space

The tracking space between two track lines to be set for the trackPattern specified by tpId.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

*layer

A pointer to the routing layer for the trackPattern. Returned if the layer is retrieved.

Return Values

Boolean

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

tpId

The database dbTrackPatternId for the trackPattern.

layer

The routing layer to be set for the trackPattern specified by tpId.

Return Values

Boolean

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

cvId

The database dbCellViewId for the cellview.

Return Values

dbGenStateId

Returns the generator dbGenStateId used to track the state of track pattern generation.

dbGenTrackPattern

Boolean 
dbGenTrackPattern( 
dbGenStateId          pState, 
dbTrackPatternId      *tpId 
); 

Description

Generates the next track pattern in the subject cellview.

Arguments

pState

The generator dbGenStateId used to track the state of trackPattern generation.

*tpId

A pointer to the trackPattern ID. Returned if a trackPattern is successfully generated.

Return Values

Boolean

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.

Class Hierarchy for Shape
Name Enumerated constant ID Type for type dbType

Shape

dbShapeId

Rectangle

dbcRectType

dbRectId

Polygon

dbcPolygonType

dbPolygonId

Line

dbcLineType

dbLineId

Path

dbcPathType

dbPathId

Label

dbcLabelType

dbLabelId

Ellipse

dbcEllipseType

dbEllipseId

Arc

dbcArcType

dbArcId

Donut

dbcDonutType

dbDonutId

Dot

dbcDotType

dbDotId

TextDisplay

dbcTextDisplayType

dbTextDisplayId

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
);

Sets the layer of the shape.

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.

The specified via must be a custom cdsVia.

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.

Path Display Styles
End type Enumerated constants corner type in type dbPathStyle

Truncate, Extend

dbcTruncateExtend (SquareFlush)

Extend, Extend

dbcExtendExtend (SquareOffset)

varExtend, varExtend

dbcVarExtendExtend (varSquareOffset)

Round, Round

dbcRoundRound (OctagonEnded)

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
);

Sets the width of the path.

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
);

Sets the origin of the label.

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
);

Returns the label type.

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.

Font Styles
Name Enumerated constants in type dbFontStyle

European style

dbcEuroStyleFont

Gothic

dbcGothicFont

Mathematics

dbcMathFont

Roman

dbcRomanFont

Script

dbcScriptFont

Stick

dbcStickFont

Fixed

dbcFixedFont

Swedish

dbcSwedishFont

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.

Label Justifications
Enumerated constants for type dbLabelJustify
Left Center Right

Upper

dbcUpperLeft

dbcUpperCenter

dbcUpperRight

Center

dbcCenterLeft

dbcCenterCenter

dbcCenterRight

Lower

dbcLowerLeft

dbcLowerCenter

dbcLowerRight

Label Type

Label type controls whether or not and how a label must be evaluated. The following table shows the three possible types.

Label Types
Label type Enumerated constants in type dbLabelType

Normal label

dbcNormalLabel

NLP label

dbcNLPLabel

IL label

dbcILLabel

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 Rotations
Label orientation Enumerated constants in type dbOrient

No rotation

dbcR0

Rotate 90 degrees

dbcR90

Rotate 180 degrees

dbcR180

Rotate 270 degrees

dbcR270

Mirror about the Y axis

dbcMY

Mirror about the Y axis, then rotate 90 degrees

dbcMYR90

Mirror about the X axis

dbcMX

Mirror about the X axis, then rotate 90 degrees

dbcMXR90

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
);

Sets the center of the donut.

dbSetDonutRadius

Boolean
dbSetDonutRadius(
dbDonutId donutId, dbDistance outerRadius, dbDistance holeRadius
);

Sets the radii of the donut.

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
);

Sets the point of the dot.

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
);

Retrieves the dot.

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

shapeId

The database ID of the shape object.

routeStatus

The routeStatus can be normalRouteStatus, fixedRouteStatus, or lockedRouteStatus.

Return Values

Boolean

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

shapeId

The database ID of the shape object.

routeStatus

The current route status can be normalRouteStatus, fixedRouteStatus, or lockedRouteStatus.

Return Values

Boolean

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.

TextDisplay Types
Associate types Enumerated constants in type dbTextDisplayAssocType

Label

dbcLabelAssocType

Property

dbcPropAssocType

Attribute

dbcAttrAssocType

Parameter

dbcParamAssocType

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.

Orientations of Instances
Mirroring and rotation Enumerated constant in type dbOrient

No rotation

dbcR0

Rotate 90 degrees

dbcR90

Rotate 180 degrees

dbcR180

Rotate 270 degrees

dbcR270

Mirror about the Y axis

dbcMY

Mirror about the Y axis, then rotate 90 degrees

dbcMYR90

Mirror about the X axis

dbcMX

Mirror about the X axis, then rotate 90 degrees

dbcMXR90

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.

Instance Placement Status
Placement status of instance Enumerated constants in type dbPlacementStatus

Unplaced instance

dbcUnplaced

Unplaced with suggested location

dbcSuggested

Placed instance

dbcPlaced

Placed and locked into position

dbcLocked

Cannot be changed

dbcFirm

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.

It will not change the default params they will remain the same.

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:

I<7:3>

becomes I<8:3>

if numInst is set to 6

I<7:3>

becomes I<4:3>

if numInst is set to 2

I<7:3>

becomes I<7>

if numInst is set to 1

I<7>

becomes I<7:8>

if numInst is set to 2

I1

becomes I<0:7>

if numInst is set to 8

If the new name overlaps members of other instances, the function returns FALSE and no change is made.

Connections on the instance terminals attached to this instance are not automatically updated.

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

None

Return Value

dbFlattenOptions

Pointer to the allocated memory area.

NULL, in case of failure.

dbFreeFlattenOptions

Boolean
dbFreeFlattenOptions(
dbFlattenOptions    *flattenOptions
);

Deallocates the memory allocated for the dbFlattenOptions pointer.

Arguments

flattenOptions

Pointer to the memory area to deallocate.

Return Value

Boolean

TRUE, if the memory is deallocated.

FALSE, in case of failure.

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

objId

Database ID of the instance to flatten. To flatten a mosaic, specify the mosaicId.

level

Number of levels of hierarchy through which to flatten the instance.
Valid Values: an integer between 0 and 32.

flattenPCells

Specifies whether pcells should be flattened. TRUE indicates that pcells should be flattened.
Default values: FALSE.
Valid Values: TRUE or FALSE.

preservePins

Specifies whether pin information should be preserved when flattening. When set to TRUE, flattenInst preserves the connectivity information, which includes pin properties, such as placement status, access direction and pin figures. In addition, to avoid conflicts, this function prefixes the hierarchical name to the original pin names instead of preserving the original pin names. The preservePins is supported for mosaics as well.
Default values: FALSE.
Valid Values: TRUE or FALSE.

preserveRODobjects

Specifies whether ROD properties should be preserved.
Default values: FALSE.
Valid Values: TRUE or FALSE.

delDetachedBlockages

Specifies whether the detached blockages should be deleted.
Default: FALSE.
Valid Values: TRUE or FALSE.

preservePinFigs

Specifies whether the pin figures shouldbe preserved. If set to TRUE, the function preserves the pin figures.
Default: TRUE.
Valid Values: TRUE or FALSE.

dbFlattenInst2

Boolean 
dbFlattenInst2(
dbId               objId,
unsigned int       level,
dbFlattenOptions   *options
dbExcludePCells excludeObj
);

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 dbAllocFlattenOptions and dbFreeFlattenOptions functions.

Arguments

objId

Database ID of the instance to flatten.

level

Number of levels of hierarchy through which to flatten the instance.
Valid Values: an integer between 0 and 32.

options

Specifies a C Struct with the following fields:

  • flattenPCells: Specifies whether Pcells are flattened. Default: FALSE. Valid Values: TRUE or FALSE.

  

  • preservePins: Specifies whether pin information is preserved. Default: FALSE. Valid Values: TRUE or FALSE.

  • preserveConn: Specifies whether to preserve only nets and not terminals or pins. Default: FALSE. Valid Values: TRUE or FALSE.

  • preserveTermName: Specifies whether terminal name is preserved. Default: FALSE. Valid Values: TRUE or FALSE.

  • preserveRodObjs: Specifies whether ROD properties are preserved. Default: FALSE. Valid Values: TRUE or FALSE.

  

  • delDetachedBlockages: Specifies whether detached blockages are deleted. Default: FALSE. Valid Values: TRUE or FALSE.

  

  • preservePinFigs: Specifies whether pin figures are preserved. Default: TRUE. Valid Values: TRUE or FALSE.

  

  • flattenVias: Specifies whether vias are flattened. Default: TRUE Valid Values: TRUE or FALSE.

  

  • hierSeparator: A string of characters specifying value of hierarchy separator as a string. Default: none.

  • callbackOnFigCopy: Callback function pointer (dbOnFigCopyPtr) on Fig copy with the following signature:
    typedef    void (*dbOnFigCopyPtr) (dbFigId    srcFig, dbFigId  dstFig);

Example:

void FigCallback(dbFigId srcFig,dbFigId dstFig);
options->callbackOnFigCopy = figCallback;

  • callbackOnMosaicInstCopy: Callback function pointer (dbOnMosaicInstCopyPtr) on Mosaic instance copy with the following signature:
    typedef    void (*dbOnMosaicInstCopyPtr) (ddbMosaicId    oMosaic, dbInstId      nInst, int           row, int column);
    Example:
    void mosaicInstCallback(dbMosaicId    oMosaic, dbInstId nInst, int row, int column);
    options->callbackOnMosaicInstCopy = mosaicInstCallback;

  • skipSteiners: When specified, skips Steiners while flattening an instance. Default: FALSE. Valid Values: TRUE or FALSE.

  • skipFluidShapes: When specified, skips fluid shapes while flattening an instance. Default: FALSE. Valid Values: TRUE or FALSE.

  • useViaPurpose: Sets the purpose of the copied shapes to the purpose of the parent via. Default: FALSE. Valid Values: TRUE or FALSE.
  • preserveNetsWithNoTerms: Specifies whether nets that are not connected to any terminal are to be preserved. Valid Values: TRUE or FALSE.
  • preservePinFigLabels: Specifies whether pin figure labels are preserved during flattening. If set to FALSE, the labels are not flattened.
    Default: TRUE Valid Values: TRUE or FALSE.
    This option will have no effect if option preservePins is set to FALSE.

excludeObj

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 flattenPCells option is TRUE.

For more information, see dbCreateExcludePCellsFromFile.

Return Value

Boolean

TRUE, if the instance is successfully flattened.

FALSE, in case of failure.

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

char* filePath

Path to a file that contains the library, cell, and view name of the Pcells to be excluded during flattening, provided in the following SKILL list format:

(t_libName [t_cellName [t_viewName]])

Where:

  • t_libName Name of a libary. This is a mandatory value.
  • t_cellName Name of a cell. This value is optional and cannot be specified without t_libName.
  • t_viewName Name of a view. This value is optional and cannot be specified without t_cellName.

The contents of a sample exclude Pcells file are as follows:

("libA" "cellA" "viewA") 
("libB" "cellB")
("libC")

Here, the following instances of Pcells are not flatted:

  • All instances with master cellview as libA/cellA/viewA.
  • All instances for which master is any view in libB/CellB.
  • All instances for which master is any cellview in libC.

Return Value

dbExcludePCells

A dbExcludePCell object containing Pcell information

Returns nullptr in case of error.

dbExcludePCellsContain

Boolean 
dbExcludePCellsContain(
dbExcludePCells dbPCells,
dbCellViewId cvId
);

Description

Checks whether the cellview ID of the specified Pcells is to be excluded during Pcell flattening.

Arguments

dbPCells

Database IDs of the related dbExcludePCells object.

cvId

Database ID of Pcell master to be searched.

Return Value

Boolean

TRUE if the specified Pcells exist in the dbExcludePcells object.

FALSE if the specified Pcells do not exist in the dbExcludePcells object.

dbDeleteExcludePCells

void 
dbDeleteExcludePCells(
dbExcludePCells pcells
);

Description

Deletes the dbExcludePCells object.

Arguments

pcells

The dbExcludePCells to the object to be deleted from memory.

Return Values

None

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.

For example:

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.

Shapes that overlap the bounding box are ignored.

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.

id

Maintains a history of all hierarchical references traversed. The hierarchical references can be anyInsts or vias. Set by dbProduceOverlap2.

row

Indicates the row on which mosaicInst exists. Set by dbProduceOverlap2.

columns

Indicates the column on which mosaicInst exists. Set by dbProduceOverlap2.

memInst

Indicates the member instance on which mosaicInst exists. Set by dbProduceOverlap2.

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.

topCellViewId

Specifies the ID of the top view where the production starts. Must be initialized by the caller.

layer

Produces only the shapes on this layer. Must be initialized by the caller.

purpose

Produces only the shapes with this purpose. Must be initialized by the caller.

bBox

Produces any shape that overlaps with it. Must be initialized by the caller.

usrConsumer

Invoked when a shape gets produced. Must be initialized by the caller.

pCArg

Must be initialized by the caller.

usrSwitcher

Invoked when it encounters an anyInst. Must be initialized by the caller.

pSArg

Must be initialized by the caller.

cellViewId

Specifies the ID of the view being switched to. This member is updated by usrSwitcher.

id

An anyInst ID can be used by usrSwitcher.

A mosaic ID can be used by mosaicSwitcher.

A via ID can be used by viaSwitcher.

Because it is a valid database object ID, you can use it to do the necessary acquisition. This member is set by dbProduceOverlap2.

threshold

Sets up the minimum size of the bounding box of the shape to produce. Can be initialized by the caller.

bordersOnly

Ignored by OpenAccess.

toExpand

If set to TRUE, makes dbProduceOverlap2 continue to traverse down the current hierarchy. This member is updated by usrSwitcher/mosaicSwitcher/viaSwitcher.

toProduce

If set to TRUE, makes dbProduceOverlap2 continue to produce the shapes of the current hierarchy. This member is updated by usrSwitcher/mosaicSwitcher/viaSwitcher.

transform

The concatenated transformation to the top-cell coordinate system. This member is updated by dbProduceOverlap2.

depth

Indicates the level of the current hierarchy. This member is updated by dbProduceOverlap2.

hierPath[dbcMaxHierDepth]

The path to the current object. It is an array with a size of 32. It is set by dbProduceOverlap2 and must not be altered by the user.

mosaicSwitcher

Called when a mosaic is encountered. Must be initialized by the caller.

pMArg

Must be initialized by the caller.

useThresholdOnDot

Ignored by OpenAccess.

doNeighbor

Internal. No meaning to users.

direction

Internal. No meaning to users.

distance

Internal. No meaning to users.

closePoint

Internal. No meaning to users.

pruneByLayer

If set to TRUE, skips the switcher when the master of the instance has no layer or purpose specified.

pNeighborInfo

Internal. No meaning to users.

borderRows

Ignored by OpenAccess.

borderColumns

Ignored by OpenAccess.

abortCounter

Defaults to -1 if you signal an abort. Otherwise, it is internal. No meaning to users.

rectThreshold

A shape whose size exceeds the threshold returns as a shape other than a rectangle.

pinOnly

Ignored by OpenAccess.

toCheckAbort

If TRUE, catches an abort signal (^C) and stops traversing the hierarchy.

Defaults to FALSE, which ignores an abort signal.

trueOverlap

OpenAccess always produces objects based on true overlaps. Part of a figure must overlap the search box to produce the figure. If the bbox overlaps the search box, but no part of the figure overlaps the search box, no figure is produced.

viaSwitcher

Invoked when a via is encountered. Must be initialized by the caller.

pVArg

Must be initialized by the caller.

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.

OpenAccess always produces objects based on true overlaps. It means that if a figure 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:

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:

anyInstId

Keeps the history of all anyInsts members that get traversed. This member is set by CDBA.

memIndex

Specifies the member index. This member is set by CDBA.

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.

usrConsumer

Called when any sigId is produced. Must be initialized by the caller.

pCArg

Specifies a pointer to a user-defined structure. Must be initialized by the caller.

usrSwitcher

Called when CDBA needs to go down to another level in the hierarchy. If the traversal is successful, usrSwitcher updates the toExpand member to TRUE and updates the member childCellViewId with a valid cellViewId. This cellViewId is the ID of the view to be switched to. If the traversal is unsuccessful, the usrSwitcher updates the toExpand member to FALSE and returns to CDBA. If usrSwitcher is NULL, it assumes you only want to traverse the top level. Must be initialized by the caller.

pSArg

Must be initialized by the caller.

childCellViewId

Specifies the ID of the view to be switched to. This member is updated by usrSwitcher.

sigId

Starts the traversal as the top-level sigId. After a new signal is traversed (produced), CDBA updates this member with the new sigId and calls usrConsumer. Must be initialized by the caller.

toExpand

Traverses down the current hierarchy if toExpand is set to TRUE. CDBA automatically updates this member to FALSE if the traversal reaches the stopLevel. This member is updated by usrSwitcher.

toProduceMemInst

Produces the signals during traversal if set to TRUE. This member is updated by usrSwitcher.

startLevel

Must be initialized by the caller.

stopLevel

Stops the traversal when this level is reached. Must be initialized by the caller.

depth

Updates depth to tell which level of the hierarchy the current hierarchy is in. CDBA Initializes depth to zero at the top level.

hierPath

Keeps the history of the traversing path to the current object. This member is an array with size 20. It is set by dbProduceOverlap2 and must not be touched by the user.

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.  

You must allocate and free the space of dbSigHierInfo.

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.

Object type

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

Boolean

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.

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

cellViewId

Root of the design hierarchy for the query to traverse.

layer

Layer number for the blockage query. Pass dbcAllLayer as the layer number value to produce blockages on any layer.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Blockage filter size. The query produces only blockages with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

blockageConsumer

Call this client application defined function for each blockage produced during the region query. If called, the blockage consumer function receives:

  • the dbBlockageId of the blockage produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

layer

Layer number for the blockage query. Pass dbcAllLayer as the layer number value to produce blockages on any layer.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Blockage filter size. The query produces only blockages with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

blockageConsumer

Call this client application defined function for each blockage produced during the region query. If called, the blockage consumer function receives:

  • the dbBlockageId of the blockage produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Boundary filter size. The query produces only boundaries with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

boundaryConsumer

Call this client application defined function for each boundary produced during the region query. If called, the boundary consumer function receives:

  • the dbBoundaryId of the boundary produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Guide filter size. The query produces only guides with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

guideConsumer

Call this client application defined function for each guide produced during the query. If called, the guide consumer function receives:

  • the dbGuideId of the guide produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Instance filter size. The query produces only instances with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

instConsumer

Call this client application defined function for each instance produced during the query. If called, the instance consumer function receives:

  • the dbInstId of the instance produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Marker filter size. The query produces only markers with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

markerConsumer

Call this client application defined function for each marker produced during the query. If called, the marker consumer function receives:

  • the dbMarkerId of the marker produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Row filter size. The query produces only rows with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

rowConsumer

Call this client application defined function for each row produced during the query. If called, the row consumer function receives:

  • the dbRowId of the row produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Shape filter size. The query produces only shapes with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

shapeConsumer

Call this client application defined function for each shape produced during the query. If called, the shape consumer function receives:

  • the dbShapeId of the shape produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Steiner filter size. The query produces only steiners with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

steinerConsumer

Call this client application defined function for each steiner produced during the query. If called, the steiner consumer function receives:

  • the dbSteinerId of the steiner produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

cellViewId

Root of the design hierarchy for the query to traverse.

*region

Pointer to the bounding box specifying the region of the design relative to the top cellview to use as the basis of the query.

transform

Initial transform to use.

filterSize

Via filter size. The query produces only vias with a size larger than the filterSize.

startLevel

Level of the design hierarchy at which to start the query.

stopLevel

Level of the design hierarchy at which to start the query.

viaConsumer

Call this client application defined function for each via produced during the query. If called, the via consumer function receives:

  • the dbViaId of the via produced
  • the dbQueryStateId.

preExpander

Client application defined pre-hierarchy expansion function. Optional. Pass a NULL value if no pre design expansion function is provided.

postExpander

Client application defined post-hierarchy expansion function. Optional. Pass a NULL value if no post design expansion function is provided.

*clientData

Pointer to a client data structure. Consumer, pre and post-hierarchy expansion functions can access and modify the data structure.

Return Values

void

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

stateId

The region query state ID.

Return Values

void

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

stateId

The region query state Id.

Return Values

dbLayer

Returns the layer number defined by the client.

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

stateId

The region query state Id.

Return Values

dbPurpose

Returns the purpose number defined by the client.

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

stateId

The region query state I.

*clientData

Pointer to the client data, typecast to (void*).

Return Values

Boolean

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

stateId

The region query state Id.

Return Values

void*

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

stateId

The region query state Id.

Return Values

dbCellViewId

Returns the top cellivew database Id.

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

stateId

The region query state Id.

Return Values

dbBBox*

Pointer to the query region defined by the client.

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

stateId

The region query state Id.

Return Values

dbTransform

Returns the transform defined by the client.

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

stateId

The region query state Id.

Return Values

dbBBox*

Returns a pointer to the current query region.

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

dbQueryHierPath*

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

*hierPath

Pointer to the hierarchical path data.

Return Values

void

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

stateId

The region query state Id.

**hierPath

Pointer to the hierarchical path data defined by the client.

Return Values

void

dbCopyQueryHierPath

dbQueryHierPath* 
dbCopyQueryHierPath( 
dbQueryHierPath      *hierPath 
); 

Description

Creates an exact copy of the passed in hierPath object.

Arguments

*hierPath

Pointer to the original hierarchical path data object.

Return Values

dbRegionQueryHierPath*

A pointer to the duplicate hierarchical path object.

dbCompareQueryHierPaths

Boolean 
dbCompareQueryHierPaths( 
dbQueryHierPath*      *hierPath1, 
dbQueryHierPath*      *hierPath2 
); 

Description

Compares two hierPath objects.

Arguments

*hierPath1

Pointer to the first hierarchical path.

*hierPath2

Pointer to the second hierarchical path.

Return Values

Boolean

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

*hierPath

Pointer to the hierarchical path object.

Return Values

void

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

*hierPath

Pointer to the hierarchical path object.

Return Values

dbTransform

Returns the current transform.

dbGetQueryHierPathDepth

unsigned int
dbGetQueryHierPathDepth( 
dbQueryHierPath      *hierPath 
); 

Description

Returns the value of the depth parameter from the hierarchical path data structure.

Arguments

hierPath

Pointer to the hierarchical path object.

Return Values

unsigned int

Returns the current depth of the hierPath.

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

*hierPath

Pointer to the hierarchical path object.

level

The level at which to get the instId or viaId.
The specified level should be less than the depth of the hierPath.

*Id

Pointer to the database ID of the instance or via to populate.

row

If the ID is an arrayInst, a pointer to the unsigned integer () to populate as the row value.

col

If the ID is an arrayInst, a pointer to the unsigned integer to populate as the column value.

Return Values

void

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

*hierPath

Pointer to the hierarchical path object.

id

The database ID of the instance or via.

row

The row if the inst is an arrayInst, 0 otherwise.

col

The column if the inst is an arrayInst, 0 otherwise.

Return Values

Boolean

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

*hierPath

Pointer to the hierarchical path object.

Return Values

void

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.

Dumping parameterized cell devices defined in a technology file is not supported in this function.

Arguments

cvId

The Id of the cellview to be dumped. Must be a parameterized cell.

cvFile

Output file name for the file that can be used to recreate the given cellview.

pCellFile

Output file name for the parameterized cell SKILL procedure.

Return Values

Boolean

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:

  1. 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)
  2. Write a SKILL procedure named pcGenCell to 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)
       )
    )
  3. In CDBA, associate the SKILL procedure with the nfet layout 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.il into the database and associates it with the nfet layout. The un-encrypted SKILL procedure is no longer needed by the database.
  4. In CDBA, create an instance of the nfet layout:
    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 );
    }
    nfet layout and the instance of nfet layout appear as

Warnings about Parameterized Cells

Be aware of the following when building and using parameterized cells:

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:

Arguments

fig

The database identifier of the dbPinFig to which you want to assign a name.

name

The abutment name to be assigned to the dbPinFig.

Return Values

Boolean

Returns TRUE if the name is successfully assigned; FALSE otherwise.

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:

Arguments

fig

The database identifier of the dbPinFig to which you want to assign a reference name.

name

The reference name to be assigned to the dbPinFig.

Return Values

Boolean

Returns TRUE if the reference name is successfully assigned; FALSE otherwise.

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:

Arguments

fig

The database identifier of the dbPinFig for which you want to retrieve the abutName.

Return Values

String

The abutName of the dbPinFig associated with the given dbFigId. If no abutName is assigned to the dbPinFig associated with the given dbFigId, an empty string is returned.

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:

Arguments

fig

The database identifier of the dbPinFig for which you want to retrieve the reference name.

Return Values

String

The reference name of the dbPinFig associated with the given dbFigId. If no reference name is assigned to the dbPinFig associated with the given dbFigId, an empty string is returned.

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

fig

The database identifier of the dbPinFig for which you want to confirm if a name was set.

Return Values

Boolean

Returns TRUE if a name was set for the dbPinFig associated with the given dbFigId. Returns FALSE if no name was set for the specified dbPinFig or if the dbPinFig does not exist in a Pcell.

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

fig

The database identifier of the dbPinFig for which you want to confirm if a reference name was set.

Return Values

Boolean

Returns TRUE if a reference name was set for the dbPinFig associated with the given dbFigId. Returns FALSE if no reference name was set for the specified dbPinFig or if the dbPinFig does not exist in a Pcell.

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

subMasterId

The database identifier of the submaster cell in which you want to search for the dbPinFig with the specified name.

name

The name the dbPinFig that you want to search for.

Return Values

dbFigId

The database identifier of the dbPinFig that you are searching for. Returns dbcNullId if the specified name is not that of a dbPinFig or if the dbPinFig does not exist in a Pcell.

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
);

Changes the name of a mosaic.

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
);

Returns the mosaic type.

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

mosaicId

ID of a mosaic.

Return Value

unsigned int

Number of rows in the specified mosaic.

dbGetMosaicNumColumns

unsigned int
dbGetMosaicNumColumns(
dbMosaicId    mosaicId
);

Description

Returns the number of columns in the specified mosaic.

Arguments

mosaicId

ID of a mosaic.

Return Value

unsigned int

Number of columns in the specified mosaic.

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

guideId

The database identifier of the guide object.

Return Values

Boolean

TRUE if the guideId is a guide object.
FALSE if it is not.

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

cvId

The database identifier of the cellview.

startPoint

The starting point of the guide.

endPoint

The ending point of the guide. The end point can be the same as the start point.

startLayerNum

The layer on which the guide starts. You can set a starting layer without setting an ending layer.

Optional argument. The default layerNum is dbcNullLayer.

endLayerNum

The layer on which the guide ends. You can set an ending layer without setting a starting layer.

Optional argument. The default layerNum is dbcNullLayer.

Return Values

dbGuideId

The ID of the new guide.

dbDeleteGuide

Boolean 
dbDeleteGuide( 
dbGuideId          guideId 
); 

Description

Deletes the guideId from the database.

Arguments

guideId

The database identifier of the guide object.

Return Values

Boolean

TRUE if the guideId is deleted.
FALSE if it is not.

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

guideId

The database identifier of the guide object.

*startPoint

Pointer to the starting point of the guide.

*endPoint

Pointer to the ending point of the guide.

Return Values

Boolean

TRUE if the points are returned successfully.
FALSE if they are not.

dbSetGuidePoints

Boolean 
dbSetGuidePoints( 
dbGuideId        guideId,
dbPoint          startPoint,
dbPoint          endPoint
); 

Description

Changes the start and end points of the guide.

Arguments

guideId

The database identifier of the guide object.

startPoint

Starting point of the guide.

endPoint

Ending point of the guide.

Return Values

Boolean

TRUE if the new points are set successfully.
FALSE if they are not.

dbGetGuideRoute

dbRouteId
dbGetGuideRoute( 
dbGuideId        guideId
); 

Description

Obtains the route to which the guide is attached.

Arguments

guideId

The database identifier of the guide object.

Return Values

dbRouteId

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

guideId

The database identifier of the guide object.

Return Values

Boolean

TRUE if following the guide layers is mandatory.
FALSE if following the guide layers is not mandatory.

dbSetGuideFollowLayers

Boolean
dbSetGuideFollowLayers( 
dbGuideId        guideId,
Boolean          followLayer
); 

Description

Changes the followLayer attribute to specify whether routing must follow the guide layers.

Arguments

guideId

The database identifier of the guide object.

followLayer

The attribute specifying whether routing must follow the guide layers.

Return Values

Boolean

TRUE if the setting operation is successful.
FALSE if it is not.

dbStartGenGuide

dbGenStateId
dbStartGenGuide( 
dbCellViewId       cellViewId
); 

Description

Starts guide generation in the cellview. Works in conjunction with dbGenGuide.

Arguments

cellViewId

The database identifier of the cellview.

Return Values

dbGenStateId

The identifier used to track the state of guide generation.

dbGenGuide

Boolean
dbGenGuide( 
dbGenStateId       pState,
dbGuideId          *pGuideId
); 

Description

Generates the guides in the cellview. Works in conjunction with dbStartGenGuide.

Arguments

pState

The state of the guide generation.

*pGuideId

Pointer to the guide object identifier in the cellview.

Return Values

Boolean

TRUE if the guide is generated.
FALSE if it is not.

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

pathSegId

The database identifier of the pathSeg object.

Return Values

Boolean

TRUE if the pathSegID is a pathSeg object.
FALSE if it is not.

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

cvId

The database identifier of the cellview.

layerNum

The layer number of the pathSeg object.

purposeNum

The purpose number of the pathSeg object.

beginPoint

Beginning point of the segment.

endPoint

Ending point of the segment.

*segStyle

Pointer to the dbSegStyle structure. The structure corresponds to the oaSegStyle class. The parameters for dbSegStyle are the following.

typedef struct dbSegStyle{ 
unsigned int   width;
dbEndStyle     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
}

Return Values

dbPathSegId

The identifier of the pathSeg.

dbDeletePathSeg

Boolean 
dbDeletePathSeg( 
dbPathSegId          pathSegId 
); 

Description

Deletes the pathSegId from the database.

Arguments

pathSegId

The database identifier of the pathSeg object.

Return Values

Boolean

TRUE if the pathSegId is deleted.
FALSE if it is not.

dbConvertPathSegToPolygon

dbPolygonId
dbConvertPathSegToPolygon( 
dbPathSegId          pathSegId 
); 

Description

Converts the pathSeg to a polygon. If the conversion fails, the function returns a NULL pointer.

Arguments

pathSegId

The database identifier of the pathSeg object.

Return Values

dbPolygonId

The database identifier of the converted polygon.

dbGetPathSegPoints

Boolean 
dbGetPathSegPoints( 
dbPathSegId          pathSegId, 
dbPoint*             beginPoint, 
dbPoint*             endPoint
); 

Description

Obtains the beginning and ending points of the segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

beginPoint

The beginning point of the segment.

endPoint

The endpoint of the segment.

Return Values

Boolean

TRUE if the points are obtained successfully.
FALSE if they are not.

dbGetPathSegBoundary

Boolean 
dbGetPathSegBoundary( 
dbPathSegId          pathSegId, 
unsigned int*        numPoints, 
dbPoint**            pointArray
); 

Description

Obtains the boundary points of the segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

numPoints

The number of points in the segment boundary.

pointArray

The array containing the points of the boundary.

Return Values

Boolean

TRUE if the boundary is obtained successfully.
FALSE if it is not.

dbGetPathSegRecBoundary

Boolean 
dbGetPathSegRecBoundary( 
dbPathSegRec         *rec, 
unsigned int*        numPoints, 
dbPoint**            pointArray
); 

Description

Obtains the boundary points of the segment described in the dbPathSegRec structure.

Arguments

dbPathSegRec

Pointer to the dbPathSegRec structure. Following are the data members of 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;

You must specify beginPt, endPt, and style. The rest of the data members are not required by dbGetPathSegRecBoundary.

numPoints

The number of points in the segment boundary.

pointArray

The array containing the points of the boundary.

Return Values

Boolean

TRUE if the boundary is obtained successfully.
FALSE if it is not.

dbGetPathSegStyle

Boolean
dbGetPathSegStyle( 
dbPathSegId        pathSegId,
dbSegStyle         *style 
); 

Description

Obtains the segStyle of the pathSeg.

Arguments

pathSegId

The database identifier of the pathSeg object.

dbSegStyle*

Pointer to the dbSegStyle structure. The structure corresponds to the oaSegStyle class. The parameters of dbSegStyle are the following.

typedef struct dbSegStyle{
unsigned int width;
dbEndStyle 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
}

dbGetPathSegRouteTopology

dbRouteTopology 
dbGetPathSegRouteTopology( 
dbPathSegId          pathSegId 
); 

Description

Obtains the route topology of the segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

Return Values

dbRouteTopology

Returns the enum value of the route topology. The enum values are the following.
dbcUnknownRouteTopology (0)
dbcNoneRouteTopology (1)
dbcStripeRouteTopology (2)
dbcStandardCellWireRouteTopology (3)
dbcIOWireRouteTopology (4)
dbcBlockWireRouteTopology (5)
dbcRingRouteTopology (6)
dbcPadRingRouteTopology (7)
dbcBlockRingRouteTopology (8)
dbcCoreWireRouteTopology (9)

dbIsPathSegOrthogonal

Boolean 
dbIsPathSegOrthogonal( 
dbPathSegId          pathSegId 
); 

Description

Determines if the pathSeg is orthogonal.

Arguments

pathSegId

The database identifier of the pathSeg object.

Return Values

Boolean

TRUE if the pathSeg is orthogonal.
FALSE if it is not.

dbSetPathSegPoints

Boolean 
dbSetPathSegPoints( 
dbPathSegId         pathSegId, 
dbPoint             beginPoint, 
dbPoint             endPoint
); 

Description

Updates the beginning and ending points of the segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

beginPoint

The beginning point of the segment.

endPoint

The ending point of the segment.

Return Values

Boolean

TRUE if the ending points update successfully.
FALSE if they do not.

dbSetPathSegStyle

Boolean 
dbSetPathSegStyle( 
dbPathSegId         pathSegId, 
const dbSegStyle    *segStyle 
); 

Description

Sets the segStyle of the segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

*segStyle

Pointer to the dbSegStyle structure. The structure corresponds to the oaSegStyle class.

Return Values

Boolean

TRUE if the segStyle is set successfully.
FALSE if it is not.

dbSetPathSegTopology

Boolean 
dbSetPathSegTopology( 
dbPathSegId          pathSegId,
dbRouteTopology      routeTopology
); 

Description

Sets the route topology of the segment to the specified topology.

Arguments

pathSegId

The database identifier of the pathSeg object.

routeTopology

The enum value of the route topology. The enum values are the following.
dbcUnknownRouteTopology (0)
dbcNoneRouteTopology (1)
dbcStripeRouteTopology (2)
dbcStandardCellWireRouteTopology (3)
dbcIOWireRouteTopology (4)
dbcBlockWireRouteTopology (5)
dbcRingRouteTopology (6)
dbcPadRingRouteTopology (7)
dbcBlockRingRouteTopology (8)
dbcCoreWireRouteTopology (9)

Return Values

Boolean

TRUE if the topology is set correctly.
False if it is not.

dbGetPathSegRoute

dbRouteId 
dbGetPathSegRoute( 
dbPathSegId          pathSegId 
); 

Description

Obtains the route of the path segment.

Arguments

pathSegId

The database identifier of the pathSeg object.

Return Values

dbRouteId

The routeID of the pathSeg.

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

viaId

The database identifier of the via object.

Return Values

Boolean

TRUE if the viaId is a via object.
FALSE if it is not a via object.

dbDeleteVia

Boolean 
dbDeleteVia( 
dbViaId      viaId 
); 

Description

Deletes the viaId from the database.

Arguments

viaId

The database identifier of the via object.

Return Values

Boolean

TRUE if the viaId is deleted.
FALSE if it is not.

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

viaId

The database identifier of the via object.

Return Values

dbViaHeaderId

The viaHeader associated with the via.

dbGetViaViaDef

techViaDefId
dbGetViaViaDef( 
dbViaId      viaId 
); 

Description

Returns the via definition associated with the viaId.

Arguments

viaId

The database identifier of the via object.

Return Values

techViaDefId

The via definition associated with the via.

dbGetViaViaDefName

String
dbGetViaViaDefName( 
dbViaId      viaId 
); 

Description

Returns the name of the via definition associated with the viaId.

Arguments

viaId

The database identifier of the via object.

Return Values

String

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

viaId

The database identifier of the via object.

Return Values

dbRouteId

The route to which the via belongs.

dbGetViaRouteStatus

dbRouteStatus
dbGetViaRouteStatus( 
dbViaId      viaId 
); 

Description

Returns the current route status of the viaId.

Arguments

viaId

The database identifier of the via object.

Return Values

dbRouteStatus

Returns the enum value of the route status. The enum values are the following.
dbcUnknownRouteStatus
dbcNormalRouteStatus
dbcFixedRouteStatus
dbcLockedRouteStatus

dbGetViaDirection

dbViaDirection
dbGetViaDirection( 
dbViaId      viaId 
); 

Description

Returns the routing direction of the viaId.

Arguments

viaId

The database identifier of the via object.

Return Values

dbViaDirection

The routing direction of the via object. The values are the following.
dbcUnknownViaDirection
dbcLayer1ToLayer2Direction
dbcLayer2ToLayer1Direction

dbSetViaRouteStatus

Boolean 
dbSetViaRouteStatus( 
dbViaId          viaId, 
dbRouteStatus    routeStatus
); 

Description

Sets the routing status of the viaId.

Arguments

viaId

The database identifier of the via object.

routeStatus

The enum value of the route status. The enum values are the following.
dbcUnknownRouteStatus (0)
dbcNormalRouteStatus (1)
dbcFixedRouteStatus (2)
dbcLockedRouteStatus (3)

Return Values

Boolean

TRUE if the routing status is set successfully.
FALSE if it is not.

dbSetViaDirection

Boolean 
dbSetViaDirection( 
dbViaId          viaId, 
dbViaDirection   viaDirection
); 

Description

Sets the routing direction of the viaId.

Arguments

viaId

The database identifier of the via object.

viaDirection

The routing direction of the via object. The values are the following.
dbcUnknownViaDirection
dbcLayer1ToLayer2Direction
dbcLayer2ToLayer1Direction

Return Values

Boolean

TRUE if the routing direction is set successfully.
FALSE if it is not.

dbStartGenViaHeaderToVia

dbGenStateId 
dbStartGenViaHeaderToVia( 
dbViaHeaderId      viaHeaderId
); 

Description

Starts via generation for the specified via header. Works in conjunction with function dbGenViaHeaderToVia.

Arguments

viaHeaderId

The database identifier of the via header.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of via generation.

*pviaId

The viaId generated by the function.

Return Values

Boolean

TRUE if the vias successfully generate.
FALSE if it does not.

dbIsCustomViaId

Boolean 
dbIsCustomViaId( 
dbId      viaId 
); 

Description

Verifies that the given viaId is a custom via object.

Arguments

viaId

The database identifier of the via object.

Return Values

Boolean

TRUE if the viaId refers to a custom via object.
FALSE if it is not a custom via object.

dbCreateCustomVia

dbViaId
dbCreateCustomVia( 
dbCellViewId       cvId, 
techViaDefId       viaDefId,
dbTransform        transform,
unsigned int       numParams,
const dbParamRec*  params
); 

Description

Creates a new custom via.

Arguments

cvId

The database cellview identifier of the custom via object.

viaDefId

The identifier of the viaDef associated with the via.

transform

The transform to use to create the via.

numParams

The number of custom via parameters.

params

A pointer to the populated parameter array.

Return Values

dbViaId

The database ID of the new custom via.

dbGetCustomViaParams

Boolean 
dbGetCustomViaParams( 
dbViaId        viaId
unsigned int*  numParams,
dbParamRec**   params
); 

Description

Returns the custom via parameters for the custom via.

Arguments

viaId

The database identifier of the via object.

numParams

The number of custom via parameters.

params

A pointer to the populated custom parameter array.

Return Values

Boolean

TRUE if the custom via parameters are successfully obtained.
FALSE if they are not.

dbSetCustomViaParams

Boolean 
dbSetCustomViaParams( 
dbViaId            viaId
unsigned int       numParams,
const dbParamRec*  params
); 

Description

Sets the custom via parameters for the custom via.

Arguments

viaId

The database identifier of the via object.

numParams

The number of custom via parameters.

params

A pointer to the populated custom parameter array.

Return Values

Boolean

TRUE if the parameters are set successfully.
FALSE if they are not.

dbIsStdViaId

Boolean 
dbIsStdViaId( 
dbId      viaId 
); 

Description

Verifies that the viaId is a standard via object.

Arguments

viaId

The database identifier of the via object.

Return Values

Boolean

TRUE if the viaId refers to a standard via object.
FALSE if it is not a standard via object.

dbCreateStdVia

dbViaId
dbCreateStdVia( 
dbCellViewId       cvId, 
techViaDefId       viaDefId,
dbTransform        transform,
unsigned int       numParams,
const dbViaParam   *viaParam
); 

Description

Creates a new standard via.

Arguments

cvId

The database cellview identifier of the custom via object.

viaDefId

The identier of the via definition associated with the via.

transform

The transform to use to create the via.

numParams

The number of custom via parameters.

*viaParam

A pointer to the populated parameter array.

Return Values

dbViaId

The database identifier of the new standard via.

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

viaId

The database identifier of the via object.

Return Values

dbViaParam*

A pointer to the standard via parameter array.

dbSetStdViaParam

Boolean 
dbSetStdViaParam
dbViaId            viaId< 
const dbViaParam   *viaParam
); 

Description

Sets the standard via parameters for the standard via.

Arguments

viaId

The database identifier of the via object.

numParams

The number of custom via parameters.

*viaParam

A pointer to the populated standard parameter array.

Return Values

Boolean

TRUE if the parameters are set successfully.
FALSE if they are not.

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

objId

The database identifier of the route object.

Return Values

Boolean

TRUE if the objId is a route object.
FALSE if it is not.

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

cvId

The database identifier of the cellview.

netId

The database identifier of the net.

isGlobal

TRUE if the route is a global route.
FALSE if it is not.

dbRouteStatus

The enum value of the route status. The enum values are the following.
dbcUnknownRouteStatus (0)
dbcNormalRouteStatus (1)
dbcFixedRouteStatus (2)
dbcLockedRouteStatus (3)

Return Values

dbRouteId

The identifier of the new route.

dbDeleteRoute

Boolean 
dbDeleteRoute( 
dbRouteId          routeId 
); 

Description

Deletes the routeId from the database.

Arguments

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if the routeId is deleted.
FALSE if it is not.

dbGetRouteObjects

Boolean
dbGetRouteObjects( 
dbRouteId        routeId,
unsigned int*    numObjects,
dbId**           routeObjects
); 

Description

Returns the objects of the route in a dbId array.

Arguments

routeId

The database identifier of the route object.

numObjects

The number of objects in the array.

routeObjects

The array containing the objects of the route.

Return Values

Boolean

TRUE if the route objects are returned successfully.
FALSE if they are not.

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

routeId

The database identifier of the route object.

Return Values

unsigned int

The number of objects in the route object.

dbGetRouteStatus

dbRouteStatus
dbGetRouteStatus( 
dbRouteId        routeId
); 

Description

Obtains the route status of the route.

Arguments

routeId

The database identifier of the route object.

Return Values

dbRouteStatus

The enum value of the route status. The enum values are the following.
dbcUnknownRouteStatus (0)
dbcNormalRouteStatus (1)
dbcFixedRouteStatus (2)
dbcLockedRouteStatus (3)

dbGetRouteStartConn

dbId
dbGetRouteStartConn( 
dbRouteId        routeId
); 

Description

Obtains the identifier of the connection object at which the route starts.

Arguments

routeId

The database identifier of the route object.

Return Values

dbId

The database identifier of the object at which the route starts.
The identifier is dbcNullId if no connection object exists.

dbGetRouteEndConn

dbId
dbGetRouteEndConn( 
dbRouteId        routeId
); 

Description

Obtains the identifier of the connection object at which the route ends.

Arguments

routeId

The database identifier of the route object.

Return Values

dbId

The database identifier of the object at which the route ends.
The identifier is dbcNullId if no connection object exists.

dbIsRouteGlobal

Boolean
dbIsRouteGlobal( 
dbRouteId        routeId
); 

Description

Verifies whether the route is a global route.

Arguments

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if the route is marked as a global route.
FALSE if it is not.

dbIsRouteHasGuide

Boolean
dbIsRouteHasGuide ( 
dbRouteId        routeId
); 

Description

Verifies whether the route contains one or more guides.

Arguments

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if the route contains one or more guides.
FALSE if it does not.

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

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if all objects in the route are contiguous.
FALSE if they are not.

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

routeId

The database identifier of the route object.

dbRouteStatus

The enum value of the route status. The enum values are the following.
dbcUnknownRouteStatus (0)
dbcNormalRouteStatus (1)
dbcFixedRouteStatus (2)
dbcLockedRouteStatus (3)

Return Values

Boolean

TRUE if the route status is set successfully.
FALSE if it is not.

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

routeId

The database identifier of the route object.

numObjects

The number of objects in the array.

routeObjects

The array of new route objects.

Return Values

Boolean

TRUE if the new route objects are passed in successfully.
FALSE if they are not.

dbSetRouteGlobal

Boolean
dbSetRouteGlobal( 
dbRouteId        routeId,
Boolean          global
); 

Description

Sets or resets the global attribute of the route.

Arguments

routeId

The database identifier of the route object.

Boolean

The global attribute value to set for the route.

Return Values

Boolean

TRUE if the global attribute is set successfully.
FALSE if it is not.

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

routeId

The database identifier of the route object.

objectId

The database identifier of the object to connect.

Return Values

Boolean

TRUE if the object connects successfully.
FALSE if it does not.

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

routeId

The database identifier of the route object.

objectId

The database identifier of the object to connect.

Return Values

Boolean

TRUE if the object connects successfully.
FALSE if it does not.

dbUnsetRouteStartConn

Boolean
dbUnsetRouteStartConn( 
dbRouteId        routeId
); 

Description

Disconnects the route from its starting connection object.

Arguments

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if the route disconnects successfully.
FALSE if it does not.

dbUnsetRouteEndConn

Boolean
dbUnsetRouteEndConn( 
dbRouteId        routeId
); 

Description

Disconnects the route from its ending connection object.

Arguments

routeId

The database identifier of the route object.

Return Values

Boolean

TRUE if the route disconnects successfully.
FALSE if it does not.

dbGetNumRoutes

unsigned int* numRoutes
dbGetNumRoutes( 
dbCellViewId        cvId,
); 

Description

Obtains the number of routes in the cellview.

Arguments

cvId

The database identifier of the cellview.

Return Values

numRoutes

The number of routes in the cellview.

dbStartGenRoute

dbGenStateId 
dbStartGenRoute( 
dbCellViewId      cvId
); 

Description

Starts generating all the routes in the cellview. Works in conjunction with function dbGenRoute.

Arguments

cvId

The database identifier of the cellview.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation in the cellview.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

dbStartGenNetToRoute

dbGenStateId
dbStartGenNetToRoute( 
dbNetId      netId
); 

Description

Starts generating all the routes for the net. Works in conjunction with function dbGenNetToRoute.

Arguments

netId

The database identifier of the net.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation for the net.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

dbStartGenShapeToConnRoute

dbGenStateId
dbStartGenShapeToConnRoute( 
dbShapeId      shapeId
); 

Description

Starts generating all the routes that connect to the shape. Works in conjunction with function dbGenShapeToConnRoute.

Arguments

shapeId

The database identifier of the shape.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation for the shape.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

dbStartGenPinToConnRoute

dbGenStateId
dbStartGenPinToConnRoute( 
dbPinId      pinId
); 

Description

Starts generating all the routes that connect to the pin. Works in conjunction with function dbGenPinToConnRoute.

Arguments

pinId

The database identifier of the pin.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation for the pin.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

dbStartGenTermToConnRoute

dbGenStateId
dbStartGenTermToConnRoute( 
dbTermId      termId
); 

Description

Starts generating all the routes that connect to the term. Works in conjunction with function dbGenTermToConnRoute.

Arguments

termId

The database identifier of the term.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation for the term.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

dbStartGenInstTermToConnRoute

dbGenStateId
dbStartGenInstTermToConnRoute( 
dbInstTermId      instTermId
); 

Description

Starts generating all the routes that connect to the instTerm. Works in conjunction with function dbGenInstTermToConnRoute.

Arguments

instTermId

The database identifier of the instTerm.

Return Values

dbGenStateId

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

pState

The identifier used to track the state of route generation for the instTerm.

routeId

The identifier of each newly generated route.

Return Values

Boolean

TRUE if the routes generate successfully.
FALSE if they do not.

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

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.

Object Classes Used in Connectivity
Name Enumerated constant ID type

Signal

dbcSigType

dbSigId

Net

dbcNetType

dbNetId

Any Instance

dbAnyInstId

Instance

dbcInstType

dbInstId

Mosaic Instance

dbcMosaicInstType

dbMosaicInstId

Figure

dbFigId

Shape

dbShapeId

Mosaic

dbcMosaicType

dbMosaicId

Terminal

dbcTermType

dbTermId

Instance Terminal

dbcInstTermType

dbInstTermId

Pin

dbcPinType

dbPinId

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”.

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.

Connection Status (dbConnStatusType)
Constant Description

dbcConnected

The connections of this net are physically implemented by the objects of this net (for example, abutting).

dbcEdgeConnected

The connections of this net are physically implemented, but one or more connections are made through edge-assigned pins.

dbcNeedToConnect

The connections of this net are not physically implemented and need to be.

dbcConnectOutside

One or more of the connections of this net are not implemented and need to be connected above them in the hierarchy to implement them.

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(
dbNetId    parentNetId,
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:

Arguments

parentNetId

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.

subNetName

Name for the new subnet.

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");

Create subnet sn1.

 dbNetId   subNet1 = dbCreateNet(cvId, "sn1", rootNet); 

Create subnet sn2.

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
);

Deletes the specified net.

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
);

Gets the name of this net.

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
);

Gets the parent net, if any.

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

netId

Database ID of a net.

Return Value

Boolean

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(
dbNetId    netId,
float      *minVoltage,
float      *maxVoltage
);

Description

Returns the min and max voltages on a net without inheriting it from the block.

Arguments

netId

Database ID of a net.

minVoltage

The minimum voltage value retrieved from the specified net ID.

maxVoltage

The maximum voltage value  retrieved from the specified net ID.

Return Value

Boolean

TRUE if minimum and maximum voltage values are retrieved successfully.

FALSE if the operation fails.

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

netId

Database ID of a net.

Return Value

Boolean

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

netId

The net ID of the voltage range source that must be returned.

Return Value

dbNetVoltageRangeSource

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

netId

The net ID whose voltage range source must be set.

source

The voltage range source to be set on the specified net ID.

Return Value

Boolean

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

netId

The net ID whose voltage range source must be set to its default value.

Return Value

Boolean

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

dbNetId

The database ID of a net.

Return value

Boolean

TRUE, if the net contains optical data.

FALSE, if the net does not contain optical data.

Example

dbIsNetOptical (netId);

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
);

Description

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

netId

The database ID of the net object.

numDomains

Number of power domain strings in the array.

domains

An array of power domain strings.

Return Values

Boolean

Returns TRUE if the power domain attribute is successfully returned. Returns FALSE otherwise.

dbSetNetPowerDomain

Boolean 
dbSetNetPowerDomain(
dbNetId netId, 
unsigned int numDomains,
String *domains
);

Description

Sets the power domain attribute of a net.

Arguments

netId

The database ID of the net object.

numDomains

Number of power domain strings in the array.

domains

An array of power domain strings.

Return Values

Boolean

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

netId

The database ID of the net object.

routePattern

The pointer to the dbRoutePattern data to be populated.

Return Values

Boolean

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

netId

The database ID of the net object.

routePattern

The value to be set for the nett’s routePattern.

Return Values

Boolean

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.

Signal Types (dbSigType)
Constant Description

dbcSignal

Carries an ordinary signal.

dbcGround

Carries the reference signal for the cellview.

dbcSupply

Provides power for the cellview.

dbcClock

Carries timing-critical clocking for the cellview.

dbcTestLatch

Carries part of a test scan chain.

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

sigId

The database ID of a signal type.

Return value

Boolean

TRUE, if the signal has optical data.

FALSE, if the signal does not contain optical data.

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.

Signal Types (dbSigType)
Constant Description

dbcSignal

Is an ordinary signal.

dbcGround

Is the reference signal for the cellview.

dbcSupply

Provides power for the cellview.

dbcClock

Carries timing critical clocking.

dbcTestLatch

Is part of a test scan chain.

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.

Terminal Direction (dbTermDirectType)
Constant Description

dbcInput

Signals flow into the instance. Can have a value assigned to it from above in the hierarchy.

dbcOutput

Signals flow out of the instance.

dbcInputOutput

Signals flow out of and into the instance, but at different times. Can be either input or output (but not both simultaneously).

dbcSwitch

Signals flow out of and into the instance, both possibly at the same time (as in a bidirectional switch). Can simultaneously be both input and output.

dbcJumper

Signals can flow through the cellview but are not used within the cellview. Can only be used above in the hierarchy.

dbcUnused

This terminal is not used and must not be used. Must not be used in this cellview, below or above.

dbcTriState

In addition to being able to drive a logical 0 or a 1, this terminal is able to assume a high impedance state effectively removing the terminal from an active connection.

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.

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
);

Returns the terminal name.

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

termId

The database ID of the Term object.

routeMethod

Returns the routeMethod of the term.

Return Values

Boolean

Returns TRUE if the routeMethod was found.
Returns FALSE otherwise.

dbSetTermRouteMethod

Boolean 
dbSetTermRouteMethod( 
dbTermId           termId, 
dbRouteMethod      routeMethod 
); 

Description

Sets the routeMethod for the specified term to the value specified with the routeMethod parameter.

Arguments

termId

The database ID of the term object.

routeMethod

The value to be set for the routeMethod.

Return Values

Boolean

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

termId

The database ID of the Term object.

Return Values

unsigned int

Returns the position assigned to the terminal. Positions are numbered from 0 to n, where 0 corresponds to the first position in a module declaration.
Returns dbcNullIndex if the terminal has no position assigned.

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

termId

The database ID of the term object.

position

The position to which to assign the terminal. The position can be from 0 to n, where 0 is the first position.

Return Values

unsigned int

Returns TRUE if the position is assigned.
Returns FALSE if the position is already assigned to another terminal or if a negative position is specified.

dbUnsetTermPosition

void
dbUnsetTermPosition( 
dbTermId            term 
); 

Description

Clears the position from the specified terminal.

Arguments

term

The database ID of the Term object.

Return Values

void

Returns a void if the position is cleared.
Nothing is done if the terminal has no position assigned.

dbGetTermsWithPosition

Boolean
dbGetTermsWithPosition( 
dbCellViewId           cvId,
unsigned int           *maxPosition,
dbTermId               **termIds
); 

Description

Gets a collection of terminals in the cellview that have positions assigned.

Arguments

cvId

The database ID of the cellview.

maxPosition

Returns the highest assigned position in the cellview. The position number is also the maximum index in the array.

termIds

Returns an array of terminals in the cellview that have assigned positions. The position of a terminal in the array reflects its assigned position. The array can contain a NULL dbTermId if a specific position has no terminal assigned.

Return Values

Boolean

Returns TRUE if the cellview contains at least one terminal with an assigned position.
Returns FALSE if no terminals have assigned positions.

dbFindTermByPosition

dbTermId
dbFindTermByPosition( 
dbCellViewId           cvId,
unsigned int           position
); 

Description

Searches the cellview for a terminal assigned to the specified position.

Arguments

cvId

The cellview to search.

position

The position at which to find the terminal.

Return Values

dbTermId

Returns the terminal.
Returns a dbcNullTermId if no terminal is found.

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.

Only explicit, single-bit terminals can be designated as softConnect terminals.

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:

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.

It is an error to try to set either of these two attributes on a terminal that is not designated as 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

termId

Database ID of the specified terminal.

Value Returned

dbTermId

Database ID of the ground sensitivity terminal.

Returns NULL if all or most of the bits of a multi-bit terminal do not have a ground sensitivity terminal set, or an error occurs.

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

termId

Database ID of the specified terminal.

Value Returned

dbTermId

Database ID of the supply sensitivity terminal.

Returns NULL if all or most of the bits of a multi-bit terminal do not have a supply sensitivity terminal set, or an error occurs.

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(
dbTermId termId, 
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

termId

Database ID of the specified terminal.

*numTerms

The number of ground sensitivity terminals in the array.

**groundSensitivityValues

The array containing the ground sensitivity terminals.

Value Returned

Boolean

TRUE if the ground sensitivity terminal is retrieved successfully.

FALSE if the numTerms and ground sensitivity values are not correctly filled.

Check the Boolean value of this function before accessing numTerms and the ground sensitivity values.

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(
dbTermId termId, 
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

termId

Database ID of the specified terminal.

*numTerms

The number of supply sensitivity terminals in the array.

**supplySensitivityValues

The array containing the supply sensitivity terminals.

Value Returned

Boolean

TRUE if the supply sensitivity terminal is retrieved successfully.

FALSE if the numTerms and supply sensitivity values are not correctly filled.

Check the Boolean value of this function before accessing numTerms and the supply sensitivity values.

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

dbTermId

Database ID of the specified terminal.

Value Returned

Boolean

TRUE if all bits of the specified terminal have the same ground sensitivity term.

FALSE if the bits of the specified terminal do not all have the same ground sensitivity term.

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

termId

Database ID of the specified terminal.

Value Returned

Boolean

TRUE if all bits of the specified terminal have the same supply sensitivity term.

FALSE if the bits of the specified terminal do not all have the same supply sensitivity term.

Example

Checks if all bits of the terminal myTerm have the same supply sensitivity terminal.

Boolean res = dbIsAnyTermSupplySensitivityConsistent(myTerm); 

dbSetAnyTermGroundSensitivity

Boolean 
dbSetAnyTermGroundSensitivity(
dbTermId termId, 
dbTermId groundTermId
);

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

termId

Database ID of the specified terminal.

groundTermId

Database ID of the ground sensitivity terminal.

Value Returned

Boolean

TRUE if the ground sensitivity value is successfully set for the specified terminal.

FALSE if the ground sensitivity value is not successfully set for the specified terminal. This may be because the terminal IDs are invalid, or the ground terminal ID is not a single-bit terminal, or the ground sensitivity terminal and the specified terminal are not in the same cellview.

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(
dbTermId termId, 
dbTermId supplyTermId
);

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

termId

Database ID of the specified terminal.

supplyTermId

Database ID of the supply sensitivity terminal.

Value Returned

Boolean

TRUE if the supply sensitivity value is successfully set for the specified terminal.

FALSE if the supply sensitivity value is not successfully set for the specified terminal. This may be because the terminal IDs are invalid, or the supply terminal ID is not a single-bit terminal, or the supply sensitivity terminal and the specified terminal are not in the same cellview.

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

Antenna model names

constString dbvAntennaModelString[] = {
"defaultAntennaModel",
"secondAntennaModel",
"thirdAntennaModel",
"fourthAntennaModel"
};

Model enums

typedef enum dbAntennaModelType {
dbcDefaultAntennaModel  =  oacDefaultAntennaModel,
dbcSecondAntennaModel   =  oacSecondAntennaModel,
dbcThirdAntennaModel    =  oacThirdAntennaModel,
dbcFourthAntennaModel   =  oacFourthAntennaModel
};

Antenna data names

constString dbvAntennaDataString[] = {
"ANTENNAGATEAREA",
"ANTENNADIFFAREA",
"ANTENNAPARTIALMETALAREA",
"ANTENNAPARTIALMETALSIDEAREA",
"ANTENNAPARTIALCUTAREA",
"ANTENNAMAXAREACAR",
"ANTENNAMAXSIDEAREACAR",
"ANTENNAMAXCUTCAR"
};

Antenna data enums

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.

typedef double dbUserCoord;

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.

The number of bits in the connection can either be equal to or not equal to (= | ≠) the number of member instances multiplied by the number of member terminals of the instance.

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.

On the OpenAccess database, instTerms can also be connected by position. The functions 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.

On the OpenAccess database, instTerms can also be connected by position. For an instance connected by position, this function attempts to bind an unbound instTerm to obtain a term name. When the attempt fails, NULL is returned. An attempt to bind the instTerm occurs even when no terminal in the master has an assigned position. On the OpenAccess database, there is no guarantee that an application will always get the valid term name for an instTerm created by position. Applications must have checks in place to handle instTerms connected by position.

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

net

The net to use for the connection. A NULL net is allowed.

anyInstId

The instance to connect to the terminal.

position

The position of the terminal in the instance master to which to connect the instTerm.

Return Values

Boolean

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

instTermId

The instTerm for which to get the terminal position.

Return Values

unsigned int

Returns the position of the terminal.
Returns dbcNullIndex if the instTerm is connected by name or by reference, or if the instTerm cannot be bound to a 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.

dbCreatePin

dbPinId 
dbCreatPin( 
dbNetId      netId ,
dbFigId      figId, 
const char   *pinName
); 

Description

Creates a pin.

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

netId

The net.

figId

The figure. The figure must be part of the oaPinFig class.

*pinNameId

The pin name.

Return Values

dbPinId

Returns the ID of the newly created pin.

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

netId

The net.

figId

The figure. The figure must be part of the oaPinFig class.

*pinNameId

The pin name.

termId

The terminal.

Return Values

dbPinId

Returns the ID of the newly created pin.

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
);

Returns the name of the pin.

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

pinId

The pin.

figId

The figure. The figure must be part of the oaPinFig class.

Return Values

Boolean

Returns TRUE if the figure is added successfully.
Returns FALSE otherwise.

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

pinId

The pin.

figId

The figure to remove.

Return Values

Boolean

Returns TRUE if the figure is removed successfully.
Returns FALSE if the figure was not on the pin.

dbStartGenPinToFig

dbGenStateId 
dbStartGenPinToFig( 
dbPinId      pinId 
); 

Description

Starts generating all the figures on the pin one at a time.

Arguments

pinId

The pin for which to generate the figures.

Return Values

dbGenStateId

The generator dbGenStateId used to track the state of fig object generation.

dbGenPinToFig

Boolean 
dbGenPinToFig( 
dbGenStateId      state, 
dbFigId           *figId 
); 

Description

Generates all the figures on the pin one at a time.

Arguments

state

The generator dbGenStateId that tracks the state of fig object generation.

figId

Returns the figure Id.

Return Values

Boolean

Returns TRUE if a fig object is generated successfully.
Returns FALSE otherwise.

dbStartGenNetToTerm

dbGenStateId 
dbStartGenNetToTerm( 
dbNetId      netId 
); 

Description

Starts generating all the terminals on the net one at a time.

Arguments

netId

The net.

Return Values

dbGenStateId

The generator dbGenStateId used to track the state of term object generation.

dbGenNetToTerm

Boolean 
dbGenNetToTerm( 
dbGenStateId      state, 
dbTermId          *termId 
); 

Description

Generating all the terminals on the net one at a time.

Arguments

state

The generator dbGenStateId that tracks the state of term object generation.

termId

Returns the term Id.

Return Values

Boolean

Returns TRUE if a term object is generated successfully.
Returns FALSE otherwise.

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

termId

The terminal.

mustJoinTermId

The terminal to which termId must join.

Return Values

Boolean

Returns TRUE if the must join attribute is set for the two terminals.
Returns FALSE otherwise.

dbUnsetTermMustJoin

Boolean 
dbUnsetTermMustJoin( 
dbTermId      termId 
); 

Description

Removes the terminal from the must join terminal set.

Arguments

termId

The terminal to removed from the must join terminal set.

Return Values

Boolean

Returns TRUE if the must join attribute is removed from the terminal.
Returns FALSE otherwise.

dbStartGenTermToMustJoinTerm

dbGenStateId 
dbStartGenTermToMustJoinTerm( 
dbTermId      termId 
); 

Description

Starts returning all the terminals that are in the must join set of the specified terminal.

Arguments

termId

The terminal.

Return Values

dbGenStateId

The generator dbGenStateId used to track the state of returning the must join terms.

dbGenTermToMustJoinTerm

Boolean 
dbGenTermToMustJoinTerm( 
dbGenStateId state, 
dbTermId *mustJoinTermId 
); 

Description

Returns all the terminals that are in the must join set of the specified terminal.

Arguments

state

The generator dbGenStateId used to track the state of returning the must join terms.

*mustJoinTermId

A term Id of each terminal in the must join set.

Return Values

Boolean

Returns TRUE if the term object in the must join set is returned.
Returns FALSE otherwise.

dbTermHasMustConnectAllPins

Boolean
dbTermHasMustConnectAllPins(
const dbTermId termId
);

Description

Checks whether the mustConnectAllPins attribute is set on the specified terminal.

The mustConnectAllPins attribute value can be set only on a single-bit terminal.

Arguments

termId

Database ID of a single-bit terminal.

Return Values

Boolean

Returns TRUE if mustConnectAllPins attribute value is set on the specified terminal.

Returns FALSE if mustConnectAllPins attribute value is not set or a multi-bit terminal is specified.

dbSetTermMustConnectAllPins

void
dbSetTermMustConnectAllPins(
dbTermId termId, 
Boolean mustConnectAllPins
);

Description

Indicates whether to set the mustConnectAllPins attribute on the specified terminal. The terminal must be a single-bit terminal.

Arguments

termId

Database ID of a single-bit terminal.

mustConnectAllPins

Specifies whether the mustConnectAllPins attribute should be set on the specified terminal.

Valid values:

  • TRUE, if the mustConnectAllPins attribute should be set.
  • FALSE, if the mustConnectAllPins attribute should be not set.

Return Value

No value returned.

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.

Access Directions of a Pin (dbDirection)
Enumerated constant Description for type dbDirection

dbbNone

The pin is inaccessible.

dbbTop

The pin is accessible from the top.

dbbBottom

The pin is accessible from the bottom.

dbbLeft

The pin is accessible from the left.

dbbRight

The pin is accessible from the right.

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.

When the pin access direction value is 0, the function returns TRUE.

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

cvId

Cellview in which to create the busNetDef.

baseName

Base name for busNetDef.

order

Bit order for the busNetDef.

Return Values

dbBusNetDefId

Returns the ID of the created busNetDef.
If an oaBusNetDef already exists, returns a NULL ID and issues a warning.

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

cvId

Cellview in which to create the busTermDef.

baseName

Base name for busTermDef.

order

Bit order for the busTermDef.

Return Values

dbBusTermDefId

Returns the ID of the created busTermDef.
If an oaBusTermDef already exists, returns a NULL ID and issues a warning.

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

cvId

Cellview in which to create the vectorInstDef.

baseName

Base name for vectorInstDef.

order

Bit order for the vectorInstDef.

Return Values

dbVectorInstDefId

Returns the ID of the created vectorInstDef.
If an oavectorInstDef already exists, returns a NULL ID and issues a warning.

dbFindBusNetDef

dbBusNetDefId 
dbFindBusNetDef( 
dbCellViewId           cvId, 
const char*            baseName
); 

Description

Searches the cellview for an oaBusNetDef with the specified baseName.

Arguments

cvId

Cellview in which to search.

baseName

Base name for which to search.

Return Values

dbBusNetDefId

Returns the ID of the busNetDef.
If the busNetDef does not exist, returns a NULL.

dbFindBusTermDef

dbBusTermDefId 
dbFindBusTermDef( 
dbCellViewId           cvId, 
const char*            baseName
); 

Description

Searches the cellview for an oaBusTermDef with the specified baseName.

Arguments

cvId

Cellview in which to search.

baseName

Base name for which to search.

Return Values

dbBusTermDefId

Returns the ID of the busTermDef.
If the busTermDef does not exist, returns a NULL.

dbFindVectorInstDef

dbVectorInstDefId 
dbFindVectorInstDef( 
dbCellViewId           cvId, 
const char*            baseName
); 

Description

Searches the cellview for an oaVectorInstDef with the specified baseName.

Arguments

cvId

Cellview in which to search.

baseName

Base name for which to search.

Return Values

dbVectorInstDefId

Returns the ID of the vectorInstDef.
If the vectorInstDef does not exist, returns a NULL.

dbDeleteBusNetDef

Boolean 
dbDeleteBusNetDef( 
dbBusNetDefId           busNetDefId
); 

Description

Deletes the busNetDef from the cellview.

Arguments

busNetDefId

The busNetDef to delete.

Return Values

Boolean

Returns TRUE if the busNetDef is deleted.
Returns FALSE otherwise.

dbDeleteBusTermDef

Boolean 
dbDeleteBusTermDef( 
dbBusTermDefId           busTermDefId
); 

Description

Deletes the busTermDef from the cellview.

Arguments

busTermDefId

The busTermDef to delete.

Return Values

Boolean

Returns TRUE if the busTermDef is deleted.
Returns FALSE otherwise.

dbDeleteVectorInstDef

Boolean 
dbDeleteVectorInstDef( 
dbVectorInstDefId           vectorInstDefId
); 

Description

Deletes the vectorInstDef from the cellview.

Arguments

vectorInstDefId

The vectorInstDef to delete.

Return Values

Boolean

Returns TRUE if the vectorInstDef is deleted.
Returns FALSE otherwise.

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

busNetDefId

The ID of the busNetDef object.

Return Values

int

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

busNetDefId

The ID of the busNetDef object.

Return Values

int

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

busNetDefId

The ID of the busNetDef object.

Return Values

String

Returns the base name of the busNetDef object.

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

busNetDefId

The ID of the busNetDef object.

Return Values

int

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

busNetDefId

The ID of the busNetDef object.

Return Values

int

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

busNetDefId

The ID of the busNetDef object.

Return Values

dbBitOrder

Returns the bitOrder of the busNetDef object.

dbSetBusNetDefBitOrder

Boolean 
dbSetBusNetDefBitOrder( 
dbBusNetDefId           busNetDefId, 
dbBitOrder              order
); 

Description

Sets the bitOrder on the busNetDef object. The busNetDef must be explicit.

Arguments

busNetDefId

The ID of the busNetDef object.

order

The new bitOrder.

Return Values

Boolean

Returns TRUE if the bitOrder is set.
Returns FALSE if the busNetDef is implicit.

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

busTermDefId

The ID of the busTermDef object.

Return Values

int

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

busTermDefId

The ID of the busTermDef object.

Return Values

int

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

busTermDefId

The ID of the busTermDef object.

Return Values

String

Returns the base name of the busTermDef object.

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

busTermDefId

The ID of the busTermDef object.

Return Values

int

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

busTermDefId

The ID of the busTermDef object.

Return Values

int

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

busTermDefId

The ID of the busTermDef object.

Return Values

bitOrder

Returns the bitOrder of the busTermDef.

dbSetBusTermDefBitOrder

Boolean 
dbSetBusTermDefBitOrder( 
dbBusTermDefId           busTermDefId, 
dbBitOrder               order
); 

Description

Sets the bitOrder of the busTermDef.

Arguments

busTermDefId

The ID of the busTermDef object.

order

The new bitOrder for the busTermDef.

Return Values

Boolean

Returns TRUE if the bitOrder is set.
Returns FALSE if the busTermDef is implicit.

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

int

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

int

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

String

Returns the base name of the vectorInst object.

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

int

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

int

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

vectorInstDefId

The ID of the vectorInstDef object.

Return Values

dbBitOrder

Returns the vectorInstDef bitOrder.

dbSetVectorInstDefBitOrder

Boolean
dbSetVectorInstDefBitOrder( 
dbVectorInstDefId           vectorInstDefId, 
dbBitOrder                  order
); 

Description

Sets the bitOrder for the vectorInstDef.

Arguments

vectorInstDefId

The ID of the vectorInstDef object.

order

The bit order.

Return Values

Boolean

Returns TRUE if the bitOrder is set.
Returns FALSE if the busTermDef is implicit.

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

dbCellViewId

The database ID of a cellview ID.

Return value

Boolean

TRUE, if the cellview has optical data.

FALSE, if the cellview does not contain optical data.

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
);

Generates top-level nets.

dbStartGenMemInst

dbGenStateId 
dbStartGenMemInst(
dbCellViewId cellViewId
);

Starts the generator for member instances.

dbGenMemInst

Boolean 
dbGenMemInst(
dbGenStateId state, dbAnyInstId pAnyInstId, int pInstIndex
);

Generates member instances.

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

cvId  

Database ID of a cellview.

Return Value

Boolean  

TRUE, if a valid equivalent connectivity time is set on the specified cellview.

FALSE, if no valid equivalent connectivity time is set on the specified cellview.

Example

dbCellViewHasEquivalentConnectivityTime(cvId) => true

Confirms that a valid equivalent connectivity time is set on the cellview cvId.

dbGetCellViewEquivalentConnectivityTime

Boolean
dbGetCellViewEquivalentConnectivityTime
dbCellViewId cvId
time_t *equivalentTime
)

Description

Retrieves the equivalent connectivity time that is set on the specified cellview.

Arguments

cvId

Database ID of a cellview

*equivalentTime  

Pointer for a time type to store the retrieved equivalent time.

Return Value

Boolean  

TRUE, if the equivalent connectivity time is retrieved from the specified cellview.

FALSE, if the equivalent connectivity time is not retrieved from the specified cellview.

Equivalent time will be set to zero if equivalent connectivity time is not set.

Example

dbGetCellViewEquivalentConnectivityTime(cvId, equivalentTime)  =>  true

Successfully retrieved the equivalent connectivity time that is set on the specified cellview.

dbSetCellViewEquivalentConnectivityTime

Boolean
dbSetCellViewEquivalentConnectivityTime
dbCellViewId cvId
timeString time_t
)

Description

Sets the equivalent connectivity time on the specified cellview.

Arguments

cvId

Database ID of a cellview.

time_t

Equivalent connectivity time to be set on the cellview.

Return Value

Boolean  

TRUE, if equivalent connectivity time is set on the cellview.

FALSE, if equivalent connectivity time is not set.

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

cvId

Database ID of a cellview.

Return Value

Boolean  

TRUE, if equivalent connectivity time information is removed from the specified cellview.

FALSE, if the operation fails.

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

clk

1

clk

data<2>

1

data<2>

<*1>base

1

base

<*2>term

2

term,term

<*2>(a,b),c

5

a,b,a,b,c

<*2>(a,<*2>b)

6

a,b,b,a,b,b

b<0:2>

3

b<0,1,2>

b<0:2:1>

3

b<0,1,2>

b<3:0:2>

2

b<3,1>

b<0:2*2>

6

b<0,0,1,1,2,2,>

b<(0:2)*2>

6

b<0,1,2,0,1,2>

b<0,2*2>

3

b<0,2,2>

b<(0,2)*2>

4

b<0,2,0,2>

b<0,1:3:4*1,2:2>

3

b<0,1,2>

b<0:1,2:2>

3

b<0,1,2>

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:

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”.

Restrictions to the Interface

The following is a list of restrictions on the interface due to the current physical data model.

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
 ⠀
X