next up previous contents index
Next: The !desel Command: Deselect Up: Selections Previous: Selections   Contents   Index


The !select Command: Select Objects

Syntax: !select what qualifier_or_regex [keyword expression]
This command allows objects to be selected according to the specification provided. There is also a companion !desel command which deselects selected objects.

The values (literal) for what are:

c[ell]
l[ayer]
n[ame]
m[odel]
v[alue]
p[aram] or i[nitc]
o[ther]
y[...] (indicates nophys)
Only the first character of the token is significant. If `c' is given, the intended targets for selection are subcells. If `l' is given, the targets are objects on a specified layer. The remaining options specify electrical properties, which allows selection of devices with these properties. The param property was known in earlier releases as the initc (initial condition) property, both names are accepted.

The qualifier_or_regex is a pattern matching regular expression. This is expected to match the layer or cell name or property value as per what. All objects with a successful pattern match are selected. The layer qualifier consists of the layer regular expression, followed by the optional tokens

b[oxes]
w[ires]
p[olygons]
l[abels]
These specify types of objects that will be selected. For selecting objects on physical layers, an additional keyword expression pair can be included in the command. The complete syntax in this case is
!select l[ayer] layer_re [b[ox]] [w[ire]] [p[olygon]] [l[abel]] [keyword expression]

For layers, the hyphen (`-') is an alias for the current layer, but only as an isolated token and not as part of a layer expression.

The keyword is one of the DRC keywords Overlap, IfOverlap, NoOverlap, AnyOverlap, PartOverlap, and AnyNoOverlap, and the expression is a layer expression. If the keyword and expression are given, the expression must be true if an object is to be selected or deselected (with the !desel command). The logic is shown in the table below.

Overlap
True if the object is completely covered by the expression.
IfOverlap
True if the object is completely covered or completely uncovered by the expression.
NoOverlap
True if the object is completely uncovered by the expression.
AnyOverlap
True if there is nonzero overlap area between the object and the expression.
PartOverlap
True if the object is partially covered by the expression, i.e., not completely covered or uncovered.
AnyNoOverlap
True if the object is not completely covered by the expression.

Examples:

!select l CAA b Overlap CPG
This will select boxes on CAA that are entirely covered by CPG.

!select l V1|V2 AnyNoOverlap M1 & M2
This will select all geometric objects on V1 and V2 that are not completely covered by both M1 and M2.

The !select/!desel commands with electrical property modifiers also work in physical mode. The selected cell will be the physical dual of the electrical cell containing the property. The duality must have been established with the commands in the Extract Menu.

Examples:

Select all instances of the cell named ``andgate'':
!select c andgate
Select all instances of cells with name starting with ``and''. The `.' is a wildcard:
!select c and.
Select resistors R1-R9:
!select n R[1-9]
Select all polygons and wires on layer M2:
!select l M2 w p
Select everything on M2
!select l M2

A blank field is taken as ``all''. Entering !select without arguments selects everything in the cell. Giving ``!select c'' selects all subcells, etc. For the layer modifier, the literal ``all'' can be used to specify all layers (hopefully there is no layer named ``all''). For example, ``!select l all b'' selects boxes on all layers. This is redundant, since ``.'' performs the same global match as ``all''.

There are a couple of special cases: ``!select all'' will select all geometry (not subcells) the same as ``!select l'', and ``!select .'' will select everything, the same as with no argument.

The regular expression matching may take some getting used-to. A match will be indicated if the name contains a substring of the given string, case insensitive. For example, ``!select n Lc'' would match Lc, Vlc, IallCnt, etc. The circumflex (`^') can be used to force matching at the start of a string, and the dollar sign (`$') forces matching at the end of a string. Thus, to match a literal, one should use the form ``^string$''.


next up previous contents index
Next: The !desel Command: Deselect Up: Selections Previous: Selections   Contents   Index
Stephen R. Whiteley 2024-09-29