next up previous contents index
Next: Electrical Devices Up: Extraction Functions Previous: Physical Devices   Contents   Index

Physical Subcircuits

(subckt_handle) ListPhysSubckts(name, index, l, b, r, t)
This function returns a handle to a list of subcircuits from the physical part of the current cell. Subcircuits are subcells which contain devices or sub-subcells that contain devices. Subcells that contain only wire are typically not saved internally as subcircuits. The first argument is a string name which will match the returned subcircuits. If this argument is null or empty, then this test will not exclude any subcircuits to be returned. The second argument is the index number of the subcircuit to be returned. If the value is -1, subcells with any index will be returned. The remaining four values define a rectangular area, given in microns relative to the current physical cell origin, where subcircuits will be searched for. If all four values are 0, the entire cell will be searched. The returned handle references subcircuits, and is distinct from device handles and object handles. The handle can be passed to the generic handle functions, and like other handles should be iterated through or closed when no longer needed. The function returns 0 if an error occurs.

(string) GetPscName(subckt_handle)
This function returns the cell name corresponding to the subcircuit referenced by the handle. if an error occurs, a null string is returned.

(int) GetPscIndex(subckt_handle)
This function returns the index of the subcircuit referenced by the argument. The index is a zero-based sequence for each subcircuit master. If an error occurs, -1 is returned.

(int) GetPscIdNum(subckt_handle)
This function returns the ID number of the subcircuit referenced by the argument. The ID number is unique among all instances in the parent cell. If an error occurs, -1 is returned.

(string) GetPscInstName(subckt_handle)
This function returns an instance name corresponding to the subcircuit instance referenced by the handle. This is the cell name, followed by an underscore, followed by the index number. if an error occurs, a null string is returned.

(object_handle) GetPscDual(subckt_handle)
This function returns an object handle which references the subcell in the electrical database which is the dual of the physical subcircuit referenced by the argument. If the association fails, 0 is returned.

(int) GetPscBB(subckt_handle, array)
This function returns the bounding box of the subcircuit referenced by the first argument. The coordinates, in microns relative to the origin of the current physical cell, are returned in the array, which must have size 4 or larger. If the operation succeeds, 1 is returned, otherwise 0 is returned.

(int) GetPscLoc(subckt_handle, array)
This returns the instance placement location, in microns, in the array passed as a second argument. The array must have size two or larger. On success, the function returns 1, and the array location 0 will contain the X value, and the 1 location will contain the Y value. Zero is returned on error, with the array values undefined.

(int) GetPscTransform(subckt_handle, type, array)
This function returns a string describing the instance orientation. There are presently three format types, specified by the second argument. If this argument is zero, then the Xic transformation string is returned. This is the same CIF-like encoding as used for the current transformation in the status line of Xic. In this case the third argument is ignored and can be zero.

If the second argument is one, the return will be a Cadence DEF orientation code. In addition, if an array of size two or larger is passed as a third argument, the values will be filled in with the X and Y origin correction values implied by the transformation. In a DEF transformation, the lower left corner position of the bounding box is invariant, implying that there is an additional translation after rotation/mirroring to enforce this. Pass 0 for this argument if these values aren't needed.

In DEF, there is no support for 45, 135, 225, and 315 rotations, a null string is returned in these cases. Magnification is ignored.

If the second argument is any other value, the OpenAccess strings are returned, otherwise all is as for DEF.

The following table lists equivalent orientation codes for DEF, OpenAccess, and Xic. The Origin column indicates the position of the original lower-left corner after the operation.

LEF/DEF OpenAccess Xic Origin
N R0 R0 LL
W R90 R90 LR
S R180 R180 UR
E R270 R270 UL
FN MY MX LR
FW MX90 R270MY LL
FS MX MY UL
FE MY90 R90MX UR

(subc_contact_handle) ListPscContacts(subckt_handle)
This function returns a handle to a list of subcircuit contacts associated with the subcircuit referenced by the handle. The returned handle is a distinct type, in particular subcircuit contacts are different from device contacts. The return handle can be used with the functions which query information about subcircuit contacts, or with the generic handle functions. If an error occurs, this function returns 0.

(int) IsPscContactIgnorable(subc_contact_handle)
If the subcircuit associated with the contact referenced from the argument is flattened or ignored, return 1. Otherwise 0 is returned. When 1 is returned, the contact can usually be skipped in listings.

(string) GetPscContactName(subc_contact_handle)
This function returns a name string, if available, from the subcircuit contact referenced by the argument. If the subcircuit does not provide a name, the returned string will be a number giving the subcircuit group contacted. A null string is returned on error.

(int) GetPscContactGroup(subckt_contact_handle)
This function returns the group index in the current cell corresponding to the subcircuit contact referenced by the argument. If an error occurs, this function returns -1.

(int) GetPscContactSubcGroup(subckt_contact_handle)
This function returns the group index in the subcircuit associated with the subcircuit contact referenced by the argument. On error, the function returns -1.

(subckt_handle) GetPscContactSubc(subckt_contact_handle)
This function returns a handle to the subcircuit which is associated with the subcircuit contact referenced by the argument. On error, the function return 0.

(string) GetPscContactSubcName(subc_contact_handle)
This function returns a string containing the name of the subcircuit associated with the contact referenced by the argument. A null string is returned on error.

(int) GetPscContactSubcIndex(subc_contact_handle)
This function returns the index of the subcircuit associated with the contact referenced by the argument. Each subcircuit of a given kind has an index number that is unique in the containing cell. On error, -1 is returned. Valid index values are 0 and larger.

(int) GetPscContactSubcIdNum(subc_contact_handle)
This function returns the ID number of the subcircuit associated with the contact referenced by the argument. Each subcircuit has an ID number that is unique in the containing cell. On error, -1 is returned. Valid index values are 0 and larger.

(string) GetPscContactSubcInstName(subc_contact_handle)
This function returns a string containing an instance name of the subcircuit associated with the contact referenced by the argument. The instance name consists of the cell name followed by an underscore, which is followed by the index. A null string is returned on error.


next up previous contents index
Next: Electrical Devices Up: Extraction Functions Previous: Physical Devices   Contents   Index
Stephen R. Whiteley 2017-11-08