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

Menu Commands

The functions in this section provide an interface to the extraction system. This interface is by no means complete, but it allows many common operations to be performed and allows traversal and information retrieval.

(int) DumpPhysNetlist(filename, depth, modestring, names)
This function dumps a netlist file extracted from the physical part of the database, much like the Dump Phys Netlist command in the Extract Menu. The filename argument is a file name which will receive the output. If null or empty, the file will be the base name of the current cell with ``.physnet'' appended. The depth argument specifies the depth of the hierarchy to process. If an integer, 0 represents the current cell only, 1 includes the first level subcells, etc. A negative integer specifies to process the entire hierarchy. This argument can also be a string beginning with the letter `a', which will process all levels of the hierarchy.

The third argument is a string, consisting of characters from the table below, which set the mode of the command. These are analogous to the check boxes that appear with the Dump Phys Netlist command. If a character does not appear in the string, that option is turned off. If it appears in lower case, the option is turned on, and if it appears in upper case, the option will be set by the present value of the corresponding !set variable. The characters can appear in any order.

character option corresponding variable
n net PnetNet
d devs PnetDevs
s spice PnetSpice
b list bottom-up PnetBottomUp
g show geometry PnetShowGeometry
c include wire cap PnetIncludeWireCap
a list all cells PnetListAll
l ignore labels PnetNoLabels

The final argument, if not null or empty, contains a space-separated list of physical format names, each of which must match a PnetFormat name in the format library file, or option names from the table above. The names that contain white space should be double-quoted.

For each cell, a field in the output is generated for each format choice implicit in the modestring or given in the names. In most cases, only one format is probably wanted. The option text in the table above can also be included in the names, which is equivalent to giving the corresponding lower-case letter in the modestring. The modestring setting will have precedence if there is a conflict. If both the modestring and the names string are empty or null, an effective mode string consisting of all of the upper-case option letters is used.

Example: print a SPICE file

DumpPhysNetlist("myfile.cir", "a", "s", 0)
or
DumpPhysNetlist("myfile.cir", "a", 0, "spice")

If the function succeeds, 1 is returned, otherwise 0 is returned.

(int) DumpElecNetlist(filename, depth, modestring, names)
This function dumps a netlist file extracted from the electrical part of the database, much like the Dump Elec Netlist command in the Extract Menu. The filename argument is a file name which will receive the output. If null or empty, the file will be the base name of the current cell with ``.elecnet'' appended. The depth argument specifies the depth of the hierarchy to process. If an integer, 0 represents the current cell only, 1 includes the first level subcells, etc. A negative integer specifies to process the entire hierarchy. This argument can also be a string beginning with the letter `a', which will process all levels of the hierarchy.

The third argument is a string, consisting of characters from the table below, which set the mode of the command. These are analogous to the check boxes that appear with the Dump Elec Netlist command. If a character does not appear in the string, that option is turned off. If it appears in lower case, the option is turned on, and if it appears in upper case, the option will be set by the present value of the corresponding !set variable. The characters can appear in any order.

character option corresponding variable
n net EnetNet
s spice EnetSpice
b list bottom-up EnetBottomUp

The final argument, if not null or empty, contains a space-separated list of electrical format names, each of which must match an EnetFormat name in the format library file, or option names from the table above. The names that contain white space should be double quoted.

For each cell, a field in the output is generated for each format choice implicit in the modestring or given in the names. In most cases, only one format is probably wanted. The option text in the table above can also be included in the names, which is equivalent to giving the corresponding lower-case letter in the modestring. The modestring setting will have precedence if there is a conflict. If both the modestring and the names string are empty or null, an effective mode string consisting of all of the upper-case option letters is used.

If the function succeeds, 1 is returned, otherwise 0 is returned.

(int) SourceSpice(filename, modestring)
This function will parse a SPICE file, adding to or updating the electrical part of the database with the devices and subcircuits found. This is equivalent to the Source SPICE command in the Extract Menu. The first argument is a path to the SPICE file to process.

The final argument is a string, consisting of characters from the table below, which set the mode of the command. These are analogous to the check boxes that appear with the Source SPICE command. If a character does not appear in the string, that option is turned off. If it appears in lower case, the option is turned on, and if it appears in upper case, the option will be set by the present value of the corresponding !set variable. The characters can appear in any order. If the string is empty or null, all options will be set by the corresponding variables.

character option corresponding variable
a all devs SourceAllDevs
r create SourceCreate
l clear SourceClear

If the operation succeeds, 1 is returned, otherwise 0 is returned.

(int) ExtractAndSet(depth, modestring)
This function performs extraction on the physical part of the database, updating the electrical part. This is equivalent to the Source Physical command in the Extract Menu. The first argument indicates the depth of the hierarchy to process. This can be an integer: 0 means process the current cell only, 1 means process the current cell plus the subcells, etc., and a negative integer sets the depth to process the entire hierarchy. This argument can also be a string starting with `a' such as ``a'' or ``all'' which indicates to process the entire hierarchy.

The final argument is a string, consisting of characters from the table below, which set the mode of the command. These are analogous to the check boxes that appear with the Source Physical command. If a character does not appear in the string, that option is turned off. If it appears in lower case, the option is turned on, and if it appears in upper case, the option will be set by the present value of the corresponding !set variable. The characters can appear in any order. If the string is empty or null, all options will be set by the corresponding variables.

character option corresponding variable
a all devs NoExsetAllDevs
r create NoExsetCreate
l clear ExsetClear
c include wire cap ExsetIncludeWireCap
n ignore labels ExsetNoLabels

If the operation succeeds, 1 is returned, otherwise 0 is returned. This function does not redraw the windows.

(object_handle) FindPath(x, y, depth, use_extract)
This function returns a handle to a list of copies of physical conducting objects in a wire net. The x,y point (microns, in the physical part of the current cell) should intersect a conducting object, and the list will consist of this object plus connected objects. The depth argument is an integer or a string beginning with ``a'' (for "all") which gives the hierarchy search depth. Only objects in cells to this depth will be considered for addition to the list (0 means objects in the current cell only). If the boolean value use_extract is nonzero, the main extraction functions will be used to determine the connectivity. If the value is zero, the connectivity is established through geometry. This is similar to the Select Path and "Quick" Path modes available in the Path Selection Control panel.

The return value is a handle to a list of object copies, or 0 if no objects are found.

(object_handle) FindPathOfGroup(groupnum, depth)
This function returns a handle to a list of copies of physical conducting objects in the group number from the current cell given, to the given depth. The depth argument is an integer or a string beginning with ``a'' (for ``all'') which gives the hierarchy search depth. Only objects in cells to this depth will be considered for addition to the list (0 means objects in the current cell only).

The function will fail (halt the script) on a major error. If the group number is out of range, or a ``minor'' error occurs, the function will return a scalar 0, and an error message should be available from GetError.

Otherwise, the return value is a handle to a list of object copies, or the list may be empty if the group has no physical objects.


next up previous contents index
Next: Terminals Up: Extraction Functions Previous: Extraction Functions   Contents   Index
Stephen R. Whiteley 2022-05-28