Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


search

The search command searches the specified window for one or more items matching the specified pattern(s). The search starts at the item currently selected, if any; otherwise it starts at the window top. The default action is to search downward until the first match, then move the selection to the item found, and return the index of the item found. The search can be continued using the next command.

Returns the index of a single match, or list of matching indices. Returns nothing if no matches are found.

Syntax

search

<win_type> [-window <wname>] [-all] [-field <n>] [-toggle]
[
-forward | -backward] [-wrap | -nowrap] [-exact] [-regexp] [-nocase]
[
-count <n>] <pattern>

Arguments for all windows

<win_type>

Specifies structure, signals, process, variables, wave, list, source, or a unique abbreviation thereof. Required.

-window <wname>

Specifies an instance of the window that is not the default. Optional. Otherwise, the default window is used. Use the view command to change the default window.

-forward

Search in the forward direction. Optional. This is the default.

-backward

Search in the reverse direction. Optional. Default is forward.

<pattern>

String or glob-style wild-card pattern. Required. Must be the last argument specified.

Arguments, for all EXCEPT the Source window

-all

Finds all matches and returns a list of the indices of all items that match. Optional.

-field <n>

Selects different fields to test, depending on the window type:

Window
n=1
n=2
n=3
default
structure
instance
entity/module
architecture
instance
signals
name
-
cur. value
name
process
status
process
label
fullpath
fullpath
variables
name
-
cur. value
name
wave
name
-
cur. value
name
list
label
fullname
-
label

Default behavior for the List window is to attempt to match the label and if that fails, try to match the full signal name.

-toggle

Adds signals found to the selection. Does not do an initial clear selection. Optional. Otherwise deselects all and selects only one item.

-wrap

Specifies that the search continue from the top of the window after reaching the bottom. Optional. This is the default.

-nowrap

Specifies that the search stop at the bottom of the window and not continue searching at the top. Optional. The default is to wrap.

Arguments, Source window only

-exact

Search for an exact match. Optional.

-regexp

Use the pattern as a Tcl regular expression. Optional.

-nocase

Ignore case. Optional. Default is to use case.

-count <n>

Search for the nth match. Optional. Default is to search for the first match.

Description

With the -all option, the entire window is searched, the last item matching the pattern is selected, and a Tcl list of all corresponding indices is returned.

With the -toggle option, items found are selected in addition to the current selection.

For the List window, the search is done on the names of the items listed, that is, across the header. To search for values of signals in the List window, use the down command and up command. Likewise, in the Wave window, the search is done on signal names. To search for signal values in the Wave window, use the right command and the left command. You can also select Edit > Search in both windows.

See also

find, next, view


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase