Product Documentation
Virtuoso Space-based Router Command Reference
Product Version IC23.1, September 2023

find_instance

find_instance 
[ -name s_instExpr ]
[ -set d_setObj | -window_id i_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

-ignore_case

Performs a case-insensitive search.

-name s_instExpr

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.

-no_wildcard

Disables all wildcard processing.

-set d_setObj

Limits the search to instances in the specified set.

-silent

Suppresses informational messages, such as the number of items found. By default, these messages are output.

-window_id i_windowID

Limits the search to instances in the specified window.

Value Returned

d_setObj

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:

?

Matches any single character.

*

Matches any sequence of zero or more characters.

[chars]

Matches any single character in chars. If chars contains a sequence of the form a-x, then any character between a and x (inclusively) will match.

\[chars]

Matches chars string enclosed in square brackets.

{a, b,}

Matches any of the strings a, b, … listed within the braces.

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:

Foo*

Foo, Food, Foobar, Foozy

?oozy

Foozy, Woozy, Doozy

[ADW]oozy

Woozy, Doozy

Foo{d,bar,cat}

Food, Foobar

*oo*

Foo, Food, Foobar, Foozy, Woozy, Doozy, ooze, foo[12]

?*oo?*

Food, Foobar, Foozy, Woozy, Doozy, foo[12]

[a-z]oo*

foo[12]

*\[1[789]]

a[17]

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

Edit Commands

Examples of Tcl Core Commands and Virtuoso Space-based Router Commands


Return to top
 ⠀
X