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

6


CDBA Input and Output Functions

This chapter covers the following topics on input and output functions:

UNIX Directory Paths

The UNIX file system is based on a hierarchical directory structure. The base of the directory hierarchy is known as the root and is represented by the slash character ( / ) as the first character in a directory or file name. In UNIX terminology, the traversal from the root directory, through descendent directories, to a particular file in the hierarchy, is called a path. Thus, a directory path is equivalent to a UNIX filename.

In the UNIX environment, there are two ways to refer to a file name: “full directory path” and “relative directory path.” The full directory path specifies the means of traversal from the root directory to the target file. An example is

/cds/etc/cdslib/schema/nand2/schematic/sch.oa

The relative directory path does not begin with a slash ( / ). For example, if /usr/me/mylib is the current directory, the directory under which you started the program, you can also use the directory path nand2/schematic/sch.oa to refer to the following file:

/usr/me/mylib/nand2/schematic/sch.oa

CDBA recognizes the following directory naming conventions:

.

Refers to the current directory

..

Refers to the directory above the current directory

~

As understood by the C and Korn shells (csh and ksh)

Routines Returning Directory Paths

Certain routines return a UNIX directory path, or file name, to the calling routine. For example, dbGetCellViewFullDirPath(cellViewId) returns the full directory path for the file containing the database representation corresponding to cellViewId. The string returned is called a cellview string, because it is contained in the cellview in virtual memory. When the cellview is closed, the cellview string becomes invalid.

Initialization and Exit Functions

The following functions initialize and exit CDBA.

dbInit

Boolean
dbInit(
int argc, char argv
);

Description

Starts all applications. You must call the dbInit function in the first executable statement of the main routine for the applications to initialize the CDBA functions. dbInit might fail if your system does not have adequate virtual memory or has not been properly configured.

The argc and argv variables are the same variables used by the C language to pass command line arguments to the main program. Notice the first argument to dbInit is a pointer to argc rather than the argc variable itself. This is because dbInit scans the command line arguments searching for special switches intended for CDBA.

If such switches are found, dbInit modifies the command line arguments, stored in argc and argv, to remove the switches intended for CDBA. All command line switches used by CDBA begin with the prefix db and follow the standard CDBA naming conventions.

dbExit

Boolean
dbExit(
);

Description

Exits CDBA. You call dbExit after all database work is complete (usually just before calling exit). The dbExit function releases all libraries locked when CDBA is run, and purges any libraries opened within CDBA. The dbExit function always returns TRUE.

Do not call any database functions after calling dbExit.

ilInitClients

void
ilInitClients(
int *, char *[], void *, int 
);

Description

Initializes SKILL within the itkDB environment. This function is called after the dbInit() call. Without a call to this function:

Additionally, to use this function for itkDB applications, set the third argument to NULL and the fourth argument to 0.

Example

if ( !dbInit(&argc, argv) )
{
(void) fprintf(stderr, "dbInit failed.\n");
exit( 1 );
}
ilInitClients(&argc, argv, NULL, 0); /*initializes SKILL within itkDB environment */

Input and Output Functions

The following are input and output functions for libraries and cellviews.

Libraries

The following functions retrieve information about libraries.

dbCreateLib

ddId
dbCreateLib(
String libName, String libPath
);

Given the name of a library and a path to a library component directory, the system searches for the named library in the cds.lib. If the named library exists, DDPI (Design Data Procedural Interface) returns the ID of the library. If the named library does not exist, DDPI creates the corresponding directory and adds the DEFINE command to the nearest library list file (such as the one the DDPI found first searching with ddUpdateLibList). If you call dbCreateLib and there is no visible cds.lib file, DDPI creates one in the current working directory (/cwd).

If you specify a NULL library path, then DDPI uses cwd and the libName to make a path (cwd/libName). If you specify a leaf name (for example, without embedded separators), DDPI makes a path out of that name and cwd (cwd/libPath). If you specify a period (.), DDPI does the same as for NULL.

dbCreateLib calls back trigger functions registered on the hooks: PreCreateLib and PostCreateLib.

dbGetLibName

String
dbGetLibName(
ddId libId
);

Returns the name of the specified library.

Cellviews

The following functions retrieve information about and act on cellviews.

dbOpenCellViewByType

dbCellViewId
dbOpenCellViewByType(
String libName, String cellName, String viewList, String viewTypeName, String mode, dbId contextId
);

Description

Opens the cellview in the read, append, or write mode. For the newly created cellview, the cellViewType is set by mapping the viewTypeName to dbCellViewType, which is an enumerator. If the mapping fails, the cellViewType is set to stranger.

If the cellview is opened in the read mode, it must already exist. If the cellview is opened in the other modes, it is created if it does not exist.

Arguments

libName

Specifies the library name. You can enter the libName as nil (either NULL or a blank space), in which case the contextId must be given, and the search is done on the library containing the contextId.

cellName

Specifies the cell name. The cellName cannot contain a forward slash ( / ) in a cell name. Thus, the paths @/cellName and parentCellName/childCellName are not supported.

viewList

Specifies a blank-separated list of view names such as viewA viewB. The function dbOpenCellViewByType opens the cellview whose view name matches one on the list. If there is no match and the mode is a, w, s, ac, ad, wc, wd, sc, or sd, a new cellview is created from the first view in the viewList.

viewTypeName

Specifies the viewType, which is mapped to the fileName that contains the cellview data. The mapping is done by mapping the viewTypeName in a registry file, which must be accessible by ddGetStartup. If viewTypeName is entered as *.oa, NULL, or a blank space, no mapping is needed, but the mode must be r. That is, the cellview must exist. In this case, it depends on what ddGetObj finds when it passes in *.oa as the fileName argument. No cellview is created if the mapping fails.

The following is a list of valid viewTypeNames:

  • netlist
  • schematic
  • schematicSymbol
  • maskLayout

mode

Specifies the access mode to the cellview. The mode can be one of the following values:

  • r Opens the cellview in read mode. The cellview must already exist.
  • a Opens the existing cellview in append mode. If the cellview does not exist, it is created.
  • w Opens the cellview in write mode. If the cellview does not exist, it is created. If the cellview already exists, its contents are truncated in virtual memory.
  • s Opens the cellview in scratch mode. If the cellview does not exist, it is created. The cellview cannot be saved.
  • wc Same as w, except that the cellview is not created as the master. This mode creates the cellview even if there is already a master under the cell/view.
  • wd Same as wc, except that the context cellview must be specified. LibName is ignored if specified. The library is derived from the context cellview.
  • ac Same as a if the cellview already exists. If the cellview does not exist, this mode is the same as wc mode.
  • ad Same as a if the cellview already exists. If the cellview does not exist, this mode is the same as wd mode.
  • sc Same as s if the cellview already exists. If the cellview does not exist, this mode is the same as wc mode, except the cellview cannot be saved to disk.
  • sd Same as s if the cellview already exists. If the cellview does not exist, this mode is the same as wd mode, except the cellview cannot be saved to disk.

  • contextId Specifies the cellview ID of the context cellview. This contextId is also used to search for the cellview in the library, as described below:
    • If only the libName is specified, the named library is searched.
    • If only the contextId is specified, the library of the context cellview is searched.
    • If both libName and contextId are specified, the library of the context cellview is searched. The argument libName is ignored.

If both libName and contextId are specified, the library of the context cellview is searched. The argument libName is ignored.

dbReOpen

dbCellViewId
dbReOpen(
dbCellViewId cellViewId, String modeString
);

Changes the input/output mode of the cellview specified by cellViewId. dbOpen already brought cellViewId into virtual memory to the mode specified by modeString. Reference count is not changed. dbReOpen returns NULL if it cannot open the cellview.

Cellview is under access control. The cellview can be reopened if and only if the following conditions are met:

dbReOpen automatically checks out the designated cellview from the library if the requested mode is either write or append, and the designated cellview is not checked out. The user must check in the cellview after modification is completed and verified.

If the modeString is in read mode, and the cellview has been modified and not saved, dbReOpen reopens the cellview without any warning.

dbOpenDerivedCellView

dbCellViewId
dbOpenDerivedCellView(
dbCellViewId cellViewId, String viewName
);

Opens a new view for the same cell with w (write) mode. dbOpenDerivedCellView calls dmMakeViewClone to ensure that the new view exists and has the proper type.

dbClose

Boolean
dbClose(
dbCellViewId cellViewId
);

Closes the cellview and decrements the reference count by one. If the reference count is zero, CDBA might automatically purge the cellview from virtual memory. (CDBA can cache frequently used cellviews in virtual memory to minimize disk I/O.) To force removing a cellview from virtual memory, use dbPurge.

dbFindOpenCellView

dbCellViewId
dbFindOpenCellView(
ddId libId, String cellName, String viewName, String versionName
);

Returns the cellview of the specified cell, view, and version name, if found and opened. Otherwise, it returns NULL. If versionName is a NULL string, dbFindOpenCellView uses the default version defined by the current configuration of the library.

dbGetCellView

dbCellViewId
dbGetCellView(
dbId id
);

Returns the cellview containing the database object identified by id.

dbPurge

Boolean
dbPurge(
dbCellViewId cellViewId
);

Purges the cellview from virtual memory, regardless of the reference count. This function is useful because it might be impossible to match the number of times dbClose and dbOpen are called.

When you use dbPurge, undo checkpoints for all edit actions before the purge operation are cleared. To avoid losing the undo checkpoint information when purging a cellview, set the dbUndoAcrossPurge cdsenv variable value to t.

dbCheck

Boolean
dbCheck(
dbCellViewId cellViewId
);

Checks the integrity of the database. If you specify a NULL cellview ID, then all opened cellviews are checked. The function returns TRUE if the database is OK. Otherwise, it prints warnings and returns FALSE. If you are experiencing corrupted databases, you can call this function to help determine where the corruption is occurring.

dbSave

Boolean
dbSave(
dbCellViewId cellViewId
);

Saves the given cellview on disk if the cellview was modified but not saved.

When you use dbSave, undo checkpoints for all edit actions before the save operation are cleared. To avoid losing the undo checkpoint information while saving a cellview, set the dbUndoAcrossSave cdsenv variable value to t.

dbSaveAll

Boolean
dbSaveAll(
);

Saves all cellviews that were modified but not saved on disk in virtual memory.

dbRegSaveTrigger

Boolean
dbRegSaveTrigger(
dbCVTriggerFunc       triggerFunc,
unsigned int          priority,
const char            *name
);

Registers a preSave trigger. The trigger function does not need to exist at the time of register, a warning will be issued though. If the function is bound, it is called before the cellview is saved.

dbUnregSaveTrigger

Boolean
dbUnregSaveTrigger(
dbCVTriggerFunc          triggerFunc
);

Un-registers the pre-save trigger function.

dbSearchCDF

Boolean
dbSearchCDF(
);

Sets and un-sets a flag that will cause CDF to be searched for parameter values. t sets, nil un-sets the flag. There is no return value.

dbStartGenCellView

dbGenStateId
dbStartGenCellView(
);

Starts the generator for all cellviews currently open and in virtual memory. dbStartGenCellView returns NULL if there are no cellviews in virtual memory.

dbGenCellView

Boolean
dbGenCellView(
dbGenStateId pState, dbCellViewId pCellViewId
);/* modifies CellViewId */ 

Generates all cellviews currently open and in virtual memory. dbStartGenCellView returns NULL if there are no cellviews in virtual memory.

dbGetLibDataCompressionLevel

unsigned int
dbGetLibDataCompressionLevel(
ddId
);

Returns the data compression level set on the specified library ID.

dbSetLibDataCompressionLevel

Boolean
dbSetLibDataCompressionLevel(
ddId,
unsigned int
);

Sets the data compression level for designs that are saved to the specified library ID.

A compression level indicates the amount of effort the compression algorithm uses when compressing data. A higher level does not necessarily correspond to better compression efficiency. The supported levels range from 1 to 9. Level 1 provides an optimized balance between efficiency and performance.

Changing the compression level of the library only affects the designs that are saved to the library after the compression level is set. It does not recompress the existing designs in the library.

dbUnsetLibDataCompressionLevel

Boolean
dbUnsetLibDataCompressionLevel(
ddId,
);

Removes the data compression level of the specified library.

dbRefreshLibDataCompressionLevel

Boolean
dbRefreshLibDataCompressionLevel(
ddId,
);

Refreshes the data compression level for the specified library ID from the disk.

Refreshing the compression level of a library only affects the designs that are saved to the library after the refresh has occurred.

dbIsNonSKILLPcell

Boolean 
dbIsNonSKILLPcell( 
dbCellViewId      cellViewId 
);

Description

Checks whether a Pcell is not a SKILL Pcell.

Arguments

cellViewId

Database ID for a cellview.

Return Value

Boolean

Returns TRUE if the Pcell is not a SKILL Pcell.

Returns FALSE if the Pcell is a SKILL Pcell.

dbErrorFlushWarn

void
dbErrorFlushWarn(
void
);

Description

Ensures that all warnings that were produced by database functions are written to the output.

Arguments

None.

Return Values

None.

Example

dbCellViewId  cvId = dbOpenCellViewByType(argv[1], argv[2], argv[3], NULL, (char*)"r", (dbCellViewId)NULL);
if (!cvId) {
    dbErrorFlushWarn();
    return false;
}

dbHasAutoSavedFile

Boolean
dbHasAutoSavedFile(
const char   *libName,
const char   *cellName,
const char   *viewName
);

Description

Determines whether the specified cellview has an auto-saved file.

Arguments

libName

Name of a library.

cellName

Name of a cellview.

viewName

Name of a view.

Return Value

Boolean

TRUE if the auto-save file is present in the specified cellview.

FALSE if the auto-save file is not present in the specified cellview.

Example

Boolean result = dbHasAutoSavedFile("designLib", "testing1", "layout1");

Returns TRUE or FALSE

dbHasPanicFile

Boolean
dbHasPanicFile(
const char   *libName,
const char   *cellName,
const char   *viewName
);

Description

Determines whether the specified cellview has a panic file.

Arguments

libName

Name of a library.

cellName

Name of a cellview.

viewName

Name of a view.

Return Value

Boolean

TRUE if the panic file is present in the specified cellview.

FALSE if the panic file is not present in the specified cellview.

Example

Boolean result = dbHasPanicFile("designLib", "testing1", "layout1");

Returns TRUE or FALSE

dbRestoreAndOpenAutoSavedFile

dbCellViewId
dbRestoreAndOpenAutoSavedFile(
const char    *libName,
const char    *cellName,
const char    *viewName
);

Description

Restores and opens the auto-saved file for the specified cellview.

Arguments

libName

Name of a library.

cellName

Name of a cellview.

viewName

Name of a view.

Return Value

dbCellViewID

Database ID of the cellview that opens. Otherwise, returns NULL.

Example

dbCellViewId cvId = RestoreAndOpenAutoSavedFile ("designLib", "testing1", "layout1");

Returns the database ID of the cellview that opens, or returns NULL on error.

dbRestoreAndOpenPanicFile

dbCellViewId
dbRestoreAndOpenPanicFile(
const char    *libName,
const char    *cellName,
const char    *viewName
);

Description

Restores and opens the panic file for the specified cellview.

Arguments

libName

Name of a library.

cellName

Name of a cellview.

viewName

Name of a view.

Return Value

dbCellViewID

Database ID of the cellview that opens. Otherwise, returns NULL.

Example

dbCellViewId cvId = RestoreAndOpenPanicFile ("designLib", "testing1", "layout1");

Returns database ID of the cellview that opens or returns NULL on error.

Hierarchy Traversal Functions

The following functions traverse the hierarchy to retrieve information about it.

dbOpenHier

void
dbOpenHier(
dbCellViewId cellViewId, unsigned int nLevels, FuncBooleanPtr msgConsumer
);

Opens nLevels of descendants of cellViewId, and brings them into core. If it cannot bring a descendant into core, it calls msgConsumer and checks the returned value. If the returned value from msgConsumer is FALSE, then dbOpenHier stops immediately. The msgConsumer function is defined as follows:

Boolean
msgConsumer(instHeader, errorMessage
dbInstHeaderId   instHeader;
String           errorMessage; 

dbOpenAllMaster

Boolean
dbOpenAllMaster(
dbCellViewId cellViewId
);

Opens all master cellviews referred to by this cellview and binds them to the corresponding instance headers. This is equivalent to

dbOpenHier(cellViewId, dbcMaxHier, NULL) 

Operations on Cellviews

A cellview is a database object despite its special function as a container of all other objects. It has attributes, properties, and relationships. The one-to-many relationships associated with a cellview let you traverse the entire cellview and visit every object in the database. The relationships and the generators are documented separately in this manual.

Cellview Attributes Functions

The following functions return information on cellview attributes.

dbGetCellViewLibId

ddId
dbGetCellViewLibId(
dbCellViewId cellViewId
);

Returns the library containing the given cellview.

dbGetCellId

ddId
dbGetCellId(
dbCellViewId cellViewId
);

Returns the ddId of the cell for the specified cellview.

dbGetViewId

ddId
dbGetViewId(
dbCellViewId cellViewId
);

Returns the ddId of the view for the specified cellview.

dbGetCellViewView

ddId
dbGetCellViewView(
dbCellViewId cellViewId
);

Returns the ddId of the view for the specified cellview.

dbGetCellViewCellName

String
dbGetCellViewCellName(
dbCellViewId cellViewId
);

Returns the cell name of the cellview.

dbGetCellViewViewName

String
dbGetCellViewViewName(
dbCellViewId cellViewId
);

Returns the view name of the cellview.

dbGetCellViewMode

String
dbGetCellViewMode(
dbCellViewId cellViewId
);

Returns the mode of the cellview as a string. Valid modes are w (write), r (read), and a (append).

dbGetCellViewFullDirPath

String
dbGetCellViewFullDirPath(
dbCellViewId cellViewId
);

Returns the full path name of the cellview as a string.

dbGetCellViewBBox

dbBBox *
dbGetCellViewBBox(
dbCellViewId cellViewId
);

Returns the bounding box for the cellview. This bounding box is derived by taking the union of the bounding boxes of all objects in the cellview (that is, a bounding box just big enough to contain the bounding boxes of all the objects).

Refer to “Bounding Boxes” for an explanation of the bounding box concept.

dbGetCellViewCellType

Boolean
dbGetCellViewCellType(
dbCellViewId  cvId,
dbCellType*   cellType
);

Description

Returns the cell type for the specified cellview.

Arguments

cvId

ID of a cellview.

dbCellType

Returned type of the cell.

Possible return values: dbcCellTypeNone, dbcCellTypeBlock, dbcCellTypeBlockRing, dbcCellTypeCover, dbcCellTypeCoverBump, dbcCellTypePad, dbcCellTypePadSpacer, dbcCellTypeCore, dbcCellTypeCoreSpacer, dbcCellTypeCoreAntenna, dbcCellTypeCorner, dbcCellTypeSoftMacro, dbcCellTypeVia, dbcCellTypeBlockBlackBox, dbcCellTypePadAreaIO, dbcCellTypeCoreWellTap

Return Value

Boolean

TRUE, if the cell type for the specified cellview is returned.

FALSE, if the operation failed.

Example

// This program will print "The cellType is core"
    dbCellViewId     cvId;
    bool             result = true;
    if (!(cvId = dbOpenCellViewByType(argv[1], argv[2], argv[3], "maskLayout", (char*)"w", (dbCellViewId)NULL))) {
       fprintf(stderr, "ERROR: Unable to open %s/%s/%s\n", argv[1], argv[2], argv[3]);
       dbErrorFlushWarn();
       return false;
    }
    dbCellType  cellType = dbcCellTypeUnknown;
    if (dbSetCellViewCellType(cvId, dbcCellTypeCore)) {
        if (dbGetCellViewCellType(cvId, &cellType)) {
            fprintf(stdout, "The cellType is %s\n", dbCellTypeToString(cellType));
        } else {
            fprintf(stderr, "ERROR: Unable to get the cellType of the cellView\n");
            result = false;
        }
    } else {
        fprintf(stderr, "ERROR: Failed to set the cellType of the cellView\n");
        result = false;
    }

Cellview Voltage Range Functions

dbGetCellViewNetVoltageRange

Boolean
dbGetCellViewNetVoltageRange(
dbCellViewId cvId,
float *minVoltage,
float *maxVoltage
);

Description

Returns the default minimum and maximum net voltages from the specified cellview ID.

Arguments

cvId

The database cellview ID whose minimum and maximum default net

voltages must be returned.

minVoltage

The minimum default net voltage.

minVoltage

The maximum default net voltage.

Return Value

Boolean

Returns TRUE if the command is successful; otherwise returns FALSE.

dbIsCellViewNetVoltageRangeSet

Boolean
dbIsCellViewNetVoltageRangeSet(
dbCellViewId cellViewId
);

Description

Ensures that the voltage range has been set on a cellview.

Arguments

cellViewId

Database ID of a cellview.

Return Value

Boolean

Returns TRUE if the voltage range has been set on the specified cellview; otherwise returns FALSE.

dbSetCellViewNetVoltageRange

Boolean
dbSetCellViewNetVoltageRange(
dbCellViewId cvId,
float minVoltage,
float maxVoltage
);

Description

Sets the default minimum and maximum net voltages on a cellview ID.

Arguments

cvId

The database cellview ID whose minimum and maximum default net voltages must be returned.

minVoltage

The minimum default net voltage.

minVoltage

The maximum default net voltage.

Return Value

Boolean

Returns TRUE if the command is successful; otherwise returns FALSE.

dbUnsetCellViewNetVoltageRange

Boolean
dbUnsetCellViewNetVoltageRange(
dbCellViewId cellViewId
);

Description

Resets the voltage range on a cellview to its default value.

Arguments

cellViewId

Database ID of a cellview.

Return Value

Boolean

Returns TRUE if the voltage range is reset; otherwise returns FALSE.

Predicate Function for Cellviews

The following function returns predicate (Boolean) information on cellviews.

dbIsCellViewModified

Boolean
dbIsCellViewModified(
dbCellViewId cellViewId
);

Returns TRUE if the cellview was modified but not yet saved on disk. Otherwise, returns FALSE.

Cellview Attributes of Purpose, Type, and Status

Each cellview object has three other attributes associated with it: cellViewType, cellViewStatus, and cellViewPurpose. These attributes describe how CDBA uses the information in the cellview.

Although the entire spectrum of enumerated constant values for these attributes is presented in the tables that follow, only a few values are currently defined and supported in Cadence® application programs. These attributes are of primary interest to placement and routing applications and can be ignored by other application programs.

The names and meanings of these attributes might change in future versions of CDBA. For now, only the enumerated constants currently defined for cellview type, status, and purpose are documented.

Predefined Cellview Purposes
Name Enumerated constants in type dbCellViewPurpose

Drawing

dbcDrawingCVP

Pin

dbcPinCVP

Net

dbcNetCVP

Boundary

dbcBoundaryCVP

Plane

dbcPlaneCVP

Stub

dbcStubCVP

Changed

dbcChangedCVP

Contact

dbcContactCVP

Active Area

dbcActiveAreaCVP

Multiple Pins

dbcMultiPinCVP

Cell

dbcCellCVP

All

dbcAllCVP

Predefined Cellview Types
Enumerated constants in type dbCellviewType Explanation

dbcGraphic

Graphics and text of displayed data

dbcMaskLayout

Integrated circuit layout

dbcSchematic

Schematic representation of connectivity of a cell

dbcSymbolic

Symbolic layout—a shorthand layout description

dbcPCB

Printed circuit board layout

dbcSchematicSymbol

Logic symbol

dbcLogicModel

Logic simulation data

dbcBehavior

Behavior of a cell

dbcStranger

An “as yet unknown” representation of a cell

dbcNetList

Netlist

Predefined Cellview Statuses
Enumerated constants in type dbCellviewStatus

dbcFluid

dbcBounded

dbcInsidePlaced

dbcRouteReady

dbcWithFeedthroughs

dbcGlobalRouted

dbcRouted

dbcFinished

dbcStickDone

When a cellview is created, all of its cellview attributes are initialized from the corresponding template cellview.

Cellview Type and Status Functions

The following functions retrieve and set information about the cellview type and status.

dbGetCellViewType

dbCellViewType
dbGetCellViewType(
dbCellViewId cellViewId
);

Returns the type of the cellview.

dbGetCellViewStatus

dbCellViewStatus
dbGetCellViewStatus(
dbCellViewId cellViewId
);

Returns the status of the cellview.

dbSetCellViewStatus

Boolean
dbSetCellViewStatus(
dbCellViewId cellViewId, dbCellViewStatus status
);

Sets the status of the cellview.

dbIsCellViewPhysicalOnly

Boolean
dbIsCellViewPhysicalOnly(
dbCellViewId cvId
);

Description

Checks whether the connectivity detail of a cellveiw is visible only to the block domain or to both the block domain and the OpenAccess module domain.

Arguments

cvId

Database ID of a cellview.

Return Value

Boolean

TRUE if the cellview is visible to block domain only.

FALSE if the cellview is visible to both block and module domain.

dbUnsetCellViewPhysicalOnly

Boolean
dbUnsetCellViewPhysicalOnly(
dbCellViewId cvId
);

Description

Unsets the physical-only attribute of the specified cellview, allowing connectivity to be visible in the OpenAccess module domain.

Arguments

cvId

Database ID of a cellview.

Return Value

Boolean

TRUE if the physical-only attribute of the specified cellview is unset.

FALSE if the operation fails.

Counter Functions

In OpenAccess, the scheme to designate that the database has been edited is through updating integer counters (unsigned). Counters in are OpenAccess are termed time stamps, but their values are unsigned integers.

In addition to maintaining a counter for the cellview, OpenAccess maintains counters for many other objects in the database. Whenever an edit is made, any existing counter for the object plus the counter for the cellview are increased by 1.

dbIsConnCurrent

Boolean 
dbIsConnCurrent( 
dbCellViewId      cellViewId 
) 

Description

Tests whether the value of the connectivity current property is equal to the cellview timestamp counter value.

Arguments

cellViewId

The database dbCellViewId for the cell view.

Return Value

Boolean

Returns TRUE if the value of the connectivity current property is equal to the cellview’s timestamp counter value. Returns FALSE if the value of the connectivity current property is not equal to the cellview’s timestamp counter value or there are errors while executing the function.

dbDisableCellViewCounter

void 
dbDisableCellViewCounter( 
dbCellViewId      cellViewId 
) 

Description

Disables updating of the cellview timestamp counter.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Value

Void.

dbGetCellViewCounter

Boolean 
dbGetCellViewCounter( 
dbCellViewId      cellViewId 
) 

Description

Gets the last saved time for the cellview timestamp counter.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Value

Boolean

Returns TRUE if the last saved time for the cellview timestamp counter was successfully retrieved. Returns FALSE otherwise.

dbEnableCellViewCounter

void 
dbEnableCellViewCounter( 
dbCellViewId      cellViewId 
) 

Description

Enables updating of the cellview timestamp counter.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Value

void

dbSetConnCurrent

void 
dbSetConnCurrent( 
dbCellViewId      cellViewId 
) 

Description

Sets the value of the connectivity current property to the cellview timestamp counter value.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Values

void

dbGetFileTimeStamp

time 
dbGetFileTimeStamp( 
dbCellViewId      cellViewId 
) 

Description

Gets the last saved time for the cellview file.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Values

time

The last saved time cellview file.

dbSetInstHeadersCounter

Boolean 
dbSetInstHeadersCounter( 
dbCellViewId      cellViewId 
) 

Description

Sets the value of the cellview instHeaders counter.

Arguments

cellViewId

The database dbCellViewId for the cellview.

Return Values

Boolean

Returns TRUE if the cellview counter value was successfully set in the instHeaders counter. Returns FALSE otherwise.

Database I/O Functions

The following functions retrieve cellview information from the database and modify cellview information in the database.

dbRefreshCellView

Boolean
dbRefreshCellView(
dbCellViewID cellViewId
);

Refreshes the cellview in virtual memory with the copy from disk. Any unsaved changes to the cellview are lost. The function purges the cellview from virtual memory and reopens the cellview append mode. If any errors occur, the function returns FALSE.

dbWriteCellView

Boolean
dbWriteCellView(
dbCellViewId cellViewId, String libName, String cellName, String viewName, String version, dbCellViewId contextCellViewId
);

Writes cellview cellViewId to disk under the specified cell and view names. The version requirement is for backward compatibility and must always be specified as NULL.

dbCopyCellView

dbCellViewId
dbCopyCellView(
dbCellViewId cellViewId, String libName, String cellName, String viewName, String version, dbCellViewId contextCellViewId, Boolean overwrite
);

Copies cellview cellViewId to a destination cellview of the specified cell, view, and version names. The function modifies both the disk version and the virtual memory version of the destination cellview. If the copy succeeds, the function returns TRUE. The version requirement is for backward compatibility and must always be specified as NULL.

dbCopyCellView and dbWriteCellView will copy all the files defined in the masterSet part in the data registry file. For example, if the file virtuoso.reg for maskLayout is like:

DataFormat MaskLayout {
Pattern=layout.oa;
Default_Editor=Virtuoso;
dfII_ViewType=maskLayout;
Co_Managed= layout.oa master.tag data.dm pc.db *.att verilog.v verilog.vams 
   ams_direct.dat amsAPT.apt es.db esb.db *.conf *.ctstch *.mode
   enc.pref.tcl SiFix.option *.fp *.fp.pg *.rcdb.gz *.ymp;
Master_Set= layout.oa master.tag pc.db;
updaterProg=ccpDFIIUpdtr;
checkerProg=ccpDFIIChecker
}

Then dbCopyCellView and dbWriteCellView will copy "layout.oa master.tag pc.db" all together.

Both dbCopyCellView and dbWriteCellView force the destination cellview to be purged from virtual memory. Therefore, if the destination cellview has been opened before either dbCopyCellView or dbWriteCellView is called, the ID of the destination cellview will become invalid after the copy or write operation.


Return to top
 ⠀
X