find_instance
find_instance [ -names_instExpr] [ -setd_setObj| -window_idi_windowID] [ -ignore_case ] [ -no_wildcard ] [ -silent ]
Description
Searches a particular cellview or an existing set of objects for instances with names that match the given regular expression. If neither the -set argument nor the -window_id argument is specified, the scope of the search is the active window.
The GUI equivalent for this command is Edit—Find (Instance).
Arguments
|
Finds all instances whose names match the expression. The expression can include special characters described in Pattern Matching. If this argument is not specified, the resultant set will include all instances within the specified scope. |
|
|
Suppresses informational messages, such as the number of items found. By default, these messages are output. |
|
Value Returned
|
Returns the identifier for a set containing all instances with names that matched the given expression for the given set or cellview. |
Pattern Matching
Expressions can include the following special characters:
For example, if you have nets named Foo, Food, Foobar, Foozy, Woozy, Doozy, ooze, a[17], and foo[12], then the following table indicates which nets would match the given expressions.
| Expression | Matches: |
|---|---|
Examples
The following example searches window 1 for any instances whose names begin with the letters NAND. The resultant set of instances is stored in the Tcl variable NAND.
set NAND [find_instance -window_id 1 -name "NAND*"]
The following example searches the set NAND for any instances whose names begin with the letters NAND and end with the number 1. The resultant set of instances is stored in the Tcl variable NAND1. NAND1 is a subset of NAND.
set NAND1 [find_instance -set $NAND -name "NAND*1"]
Tcl set variables can be passed to other Space-based Router commands that use the -set argument. For more information on set functions, refer to Manipulate Sets.
Related Topics
Examples of Tcl Core Commands and Virtuoso Space-based Router Commands
Return to top