next up previous contents index
Next: Database Up: Main Functions 1 Previous: Current Cell   Contents   Index

Cell Info

(int) CellBB(cellname, array [, symbolic])
This function will return the bounding box of the named cell in the current mode, in microns, in the array, as l, b, r, t. If cellname is null or empty, the current cell is used. The array must have size 4 or larger. The function returns 1 on success, 0 if the cell is not found in memory.

The optional boolean third argument applies to electrical cells. If not given or set to false, the schematic bounding box is always returned. If this argument is true, and the cell has a symbolic representation, the symbolic representation bounding box is returned, or the function fails and returns 0 if the cell has no symbolic representation.

(stringlist_handle) ListSubcells(cellname, depth, array, incl_top)
This function returns a handle to a sorted list of subcell master names found under the named cell, to the given depth, and only if instantiated so as to overlap a rectangular area (if given). These apply to the current mode, electrical or physical. If cellname is null or empty, the current cell is used. The depth is the search depth, which can be an integer which sets the maximum depth to search (0 means search cellname only and return its subcell names, 1 means search cellname plus its subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as ``a'' or ``all'' which indicates to search the entire hierarchy.

The cell will be read into memory if not already there. The function fails if the cell can not be found.

The array argument can be passed 0, which indicates no area testing. Otherwise, the array should be size four or larger, with the values being the left (array[0]), bottom, right, and top coordinates of a rectangular region of cellname. Only cells that are instantiated such that the instance bounding box, when reflected to top-level coordinates, intersects the region will be listed.

If the boolean incl_top is nonzero, the top cell name (cellname) will be included in the list, unless an array is given and there is no overlap with the top cell.

The return is a handle to a list of cell names, and can be empty. The GenCells or ListNext functions can be used to iterate through the list.

(stringlist_handle) ListParents(cellname)
This function returns a list of cell names, each of which contain an instance of the cell name passed as the argument. These apply to the current mode, electrical or physical. If cellname is null or empty, the current cell is used.

The function fails if the cell can not be found in memory.

The return is a handle to a list of cell names, and can be empty. The GenCells or ListNext functions can be used to iterate through the list.

(stringlist_handle) InitGen()
This function returns a handle to a list of names of cells used in the hierarchy of the current cell, either the physical or electrical part according to the current mode. Each cell is listed once only, and all cells are listed, including the current cell which is returned last.

The return is a handle to a list of cell names, and can be empty. The GenCells or ListNext functions can be used to iterate through the list.

(stringlist_handle) CellsHandle(cellname, depth)
This function returns a handle to a list of subcell names found in cellname, to the given hierarchy depth. If cellname is null or empty, the current cell is used. The depth is the search depth, which can be an integer which sets the maximum depth to search (0 means search cellname only and return its subcell names, 1 means search cellname plus its subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as "a" or "all" which indicates to search the entire hierarchy. The listing order is as a tree, with a subcell listed followed by the descent into that subcell.

The cell will be read into memory if not already there. The function fails if the cell can not be found.

With ``all'' passed, the output is similar to that of the InitGen function, except that the top-level cell name is not listed, and duplicate entries are not removed (ListUnique can be called to remove duplicate names).

Be aware that the listing will generally contain lots of duplicate names. This function is not recommended for general hierarchy traversal.

The return is a handle to a list of cell names, and can be empty. The GenCells or ListNext functions can be used to iterate through the list.

(string) GenCells(stringlist_handle)
This function returns a string containing the name of one of the elements in the list whose handle is passed as the argument. It advances the handle to point to the next name. The argument can be the return value from one of the functions above, or any stringlist_handle variable. A different name is returned for each call. The null string is returned after all names have been returned. This is identical to the ListNext function.

Example:

This script will list all of the cells in the current hierarchy:
i = InitGen()
while ((name = GenCells(i)) != 0)
   Print(name)
end


next up previous contents index
Next: Database Up: Main Functions 1 Previous: Current Cell   Contents   Index
Stephen R. Whiteley 2022-05-28