next up previous contents index
Next: Physical Conductor Groups Up: Extraction Functions Previous: Terminals   Contents   Index

Physical Terminals

As noted in the description in the previous section, physical terminals are a separate data structure that save layout information about the terminal, such as effective location, the layer attached to, or an object attached to. When a schematic exists and has been associated, the physical terminal and the electrical node property are linked, so access to one automatically provides access to the other. Thus, most of the the functions in this section that access physical terminals will also take a handle to a regular terminal equivalently, as did the functions in the previous section. However, if one data type does not exist, for the function to succeed, the exissting data type must be passed, and it must contain the data to be accessed.

Physical terminals that correspond to cell connection points are stored with the physical data, and are therefor potentially available when there is no schematic. Most commonly, however, they are created upon reading the electrical data for a cell.

(physterm_handle) ListPhysTerminals()
This returns a handle to a list of physical terminal structures that correspond to the cell connection points, as obtained from the physical part of the current cell.

(physterm_handle) FindPhysTerminal(name, use_p, xp, yp)
This attempts to find a physical terminal structure by name or location. If a name is given, i.e., the argument is not null or 0, then it will match the name of the terminal returned. If the boolean use_p is nonzero (true), then the coordinates xp and yp, given in microns, will match the placement location of the returned terminal. If both name and coordinates are given, both must match.

An empty handle (scalar 0) is returned if there is no matching physical terminal found.

(int) CreatePhysTerminal(thandle, x, y, layer)
As created, (electrical) terminals do not contain the data structures necessary for a corresponding terminal in the physical layout. This is fine as-is, if the user is intending to only work with a schematic, or if the terminal does not have an actual physical counterpart. However, in general one must create the physical terminal.

This function will create a new physical terminal, if one of the same name does not currently exist. The first argument can be a handle to a terminal (electrical node) or a string giving a name. In the first case, the new physical terminal is created, given the name of the electrical terminal, and the linkage established. In the second case, which does not require the existance of the electrical schematic, the physical terminal is created under the given name, and saved in the physical data. It will be linked to corresponding electrical data during association, when possible.

The x and y give the initial terminal location in the layout in microns. The layer argument can be scalar 0, which is ignored, or the name of a layer. The layer must have the Routing keyword applied. If given, this will set the layer hint for the new terminal.

The return value is 1 on success, 0 otherwise. It is not an error if the physical terminal already exists, the function will return 1 and perform no other operation in that case.

(int) HasPhysTerminal(thandle)
This function returns 1 if the (electrical) terminal referenced by the handle argument has a physical terminal link, 0 if no link has been assigned. On error, a value -1 is returned.

(int) DestroyPhysTerminal(thandle)
This will unlink and destroy the physical terminal data structure that maintains the terminal linkage into the physical layout, if any. The argument can be a handle to the corresponding electrical terminal, or to the physical terminal itself. In the latter case, the passed handle will be closed. The electrical terminal (if any) will still be valid, as will its handle if that was passed. The function returns one on success, zero if an error occurs.

(int) GetPhysTerminalLoc(thandle, array)
Return the layout location for the physical terminal referenced by the handle passed as an argument. The first argument can alternatively be a handle to the corresponding electrical terminal. The second argument is an array of size two or larger which will receive the x-y coordinate, in microns. The function returns one on success, zero otherwise.

(int) SetPhysTerminalLoc(thandle, x, y)
Set the location of the physical terminal referenced by the first argument to the layout coordinate given, in microns. The first argument can also be a handle to the corresponding electrical terminal. Generally, physical terminal locations are set by Xic, using extraction results. However, this may fail, requiring that the user provide a location for one or more terminals. Terminals that have been placed by the user (using this function) will by default remain fixed in the location. The function returns one on success, zero if an error occurs.

(string) GetPhysTerminalLayer(thandle)
Return a string containing the layer name for the physical terminal referenced by the handle passed as an argument. A handle to the corresponding electrical terminal is also accepted. Non-virtual physical terminals are associated with an object on a Routing layer. A null string is returned if there is no associated layer.

(int) SetPhysTerminalLayer(thandle, layer)
This function will set the associated layer hint on the physical terminal referenced by the handle passed as the first argument. A handle to the corresponding electrical terminal is also accepted. If the second argument is the name of a physical layer which has the Routing keyword set, the terminal hint layer will be set to that layer. If the second argument is a scalar 0, or a null or empty string, any existing hint layer will be removed. The function returns one on success, zero otherwise.

(int) GetPhysTerminalGroup(thandle)
This function will return the conductor group number to which the physical terminal referenced by the argument is assigned. A handle to the corresponding electrical terminal is also accepted. The group assignment is made during extraction and association. The return value is a non-negative integer on success, or -1 if extraction/association has not been run (or been reverted), or -2 if some error occurred.

(object_handle) GetPhysTerminalObject(thandle)
Return a handle to a physical object that is associated with the physical terminal referenced by the handle passed as an argument. A handle to the coresponding electrical terminal is also accepted. Physical terminals are associated with underlying conducting objects as part of the connectivity algorithm. Not all terminals have an associated object, in which case they are ``virtual". An empty handle (scalar 0) is returned in this case.


next up previous contents index
Next: Physical Conductor Groups Up: Extraction Functions Previous: Terminals   Contents   Index
Stephen R. Whiteley 2024-09-29