next up previous contents index
Next: Mode Up: Main Functions 1 Previous: Libraries   Contents   Index

OpenAccess

These functions provide an interface to the OpenAccess database. An OpenAccess exception triggered by these functions will generate a fatal error, terminating the script. The functions that return an integer that is not an explicit boolean result always return 1.

(string) OaVersion()
Return the version string of the connected OpenAccess database. If none, a null string is returned.

(int) OaIsLibrary(libname)
Return 1 if the library named in the string argument is known to OpenAccess, 0 if not.

(stringlist_handle) OaListLibraries()
Return a handle to a list of library names known to OpenAccess.

(stringlist_handle) OaListLibCells(libname)
Return a list of the names of cells contained in the OpenAccess library named in the argument.

(stringlist_handle) OaListCellViews(libname, cellname)
Return a handle to a list of view names found for the given cell in the given OpenAccess library.

(int) OaIsLibOpen(libname)
Return 1 if the OpenAccess library named in the argument is open, 0 otherwise.

(int) OaOpenLibrary(libname)
Open the OpenAccess library of the given name, where the name should match a library defined in the lib.defs or cds.lib file. A library being open means that it is available for resolving undefined references when reading cell data in Xic. The return is 1 on success, 0 if error.

(int) OaCloseLibrary(libname)
Close the OpenAccess library of the given name, where the name should match a library defined in the lib.defs or cds.lib file. A library being open means that it is available for resolving undefined references when reading cell data in Xic. The return is 1 on success, 0 if error.

(int) OaIsOaCell(libname, open_only)
Return 1 if a cell with the given name can be resolved in an OpenAccess library, 0 otherwise. If the boolean value open_only is true, only open libraries are considered, otherwise all libraries are considered.

(int) OaIsCellInLib(libname, cellname)
Return 1 if the given cell can be found in the OpenAccess library given as the first argument, 0 otherwise.

(int) OaIsCellView(cellname, viewname, open_only)
Return 1 if the cellname and viewname resolve as a cellview in an OpenAccess library, 0 otherwise. If the boolean open_only is true, only open libraries are considered, otherwise all libraries are considered.

(int) OaIsCellViewInLib(libname, cellname, viewname)
Return 1 is the cellname and viewname resolve as a cellview in the given OpenAccess library, 0 otherwise.

(int) OaCreateLibrary(libname, techlibname)
This will create the library in the OpenAccess database if libname currently does not exist. This will also set up the technology for the new library if techlibname is given (not null or empty). The new library will attach to the same library as techlibname, or will attach to techlibname if it has a local tech database. If techlibname is given then it must exist.

(int) OaBrandLibrary(libname)
Set or remove the Xic ``brand'' of the given library. Xic can only write to a branded library. If the boolean branded is true, the library will have its flag set, otherwise the branded status is unset.

(int) OaIsLibBranded(libname)
Return 1 if the named library is ``branded'' (writable by Xic), 0 otherwise.

(int) OaDestroy(libname, cellname, viewname)
Destroy the named view from the given cell in the given OpenAccess library. If the viewname is null or empty, destroy all views from the named cell, i.e., the cell itself. If the cellname is null or empty, undefine the library in the library definition (lib.defs or cds.lib) file, and change the directory name to have a ``.defunct'' extension. We don't blow away the data, the user can revert by hand, or delete the directory.

(int) OaLoad(libname, cellname)
If cellname is null or empty, load all cells in the OpenAccess library named in libname into Xic. The current cell is not changed. Otherwise, load the cell and its hierarchy and make it the current cell. Whether the physical or electrical views are read, or both, is determined by the value of the OaUseOnly variable. If the value is ``1'' or starts with `p' or `P', only the physical (layout) views are read. If the value is ``2'' or starts with `e' or `E', only the electrical (schematic and symbol) views are read. If anything else or not set, both physical and electrical views are read.

(int) OaReset()
There is a table in Xic that records the cells that have been loaded from OpenAccess. This avoids the ``merge control'' pop-up which appears if a common subcell was previously read and is already in memory, the in-memory cell will not be overwritten. This function clears the table, and should be called if this protection should be ended, for example if the Xic database has been cleared.

(int) OaSave(libname, allhier)
Write the current cell to the OpenAccess library whose name is given in the first argument. This must exist, and be writable from Xic. Whether the physical or electrical views are written, or both, is determined by the value of the OaUseOnly variable. If the value is ``1'' or starts with `p' or `P', only the physical (layout) views are written. If the value is ``2'' or starts with `e' or `E', only the electrical (schematic and symbol) views are written. If anything else or not set, both physical and electrical views are written. The second argument is a boolean that if true (nonzero) indicates that the entire cell hierarchy under the current cell should be saved. Otherwise, only the current cell is saved.

The actual view names used are given in the OaDefLayoutView, OaDefSchematicView, and OaDefSymbolView variables, or default to ``layout'', ``schematic'', and ``symbol''.

(int) OaAttachTech(libname, techlibname)
If techlibname has an attached tech library, then that library will be attached to libname. If techlibname has a local tech database, then techlibname itself will be attached to libname. This will fail if libname has a local tech database. The local database should be destroyed first.

(string) OaGetAttachedTech(libname)
Return the name of the OpenAccess library providing the attached technology, or a null string if no attachment.

(int) OaHasLocalTech(libname)
Return 1 if the OpenAccess library has a local technology database, 0 if not.

(int) OaHasLocalTech(libname)
If the library does not have an attached or local technology database, create a new local database.

(int) OaDestroyTech(libname, unattach_only)
If libname has an attached technology library, unattach it. If the boolean second argument is false, and the library has a local database, destroy the database.


next up previous contents index
Next: Mode Up: Main Functions 1 Previous: Libraries   Contents   Index
Stephen R. Whiteley 2017-03-22