Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


searchlog

The searchlog command searches one or more of the currently open logfiles for a specified condition. It can be used to search for rising or falling edges, for signals equal to a specified value, or for when a generalized expression becomes true.

Syntax

searchlog

[<options>] <startTime> <pattern>

If at least one match is found, it returns the time (and optionally delta) at which the last match occurred and the number of matches found, in a Tcl list:

{{<time>} <matchCount>} 

where <time> is in the format <number> <unit>. If the -deltas option is specified, the delta of the last match is also returned:

{{<time>} <delta> <matchCount>} 

If no matches are found, a TCL_ERROR is returned. If one or more matches are found, but less than the number requested, it is not considered an error condition, and the time of the farthest match is returned, with the count of the matches found.

Arguments

-rising | -falling | -anyedge

Specifies an edge to look for on a scalar signal. Optional. This option is ignored for compound signals. If no options are specified, the default is -anyedge.

-reverse

Specifies to search backwards in time from <startTime>. Optional.

-deltas

Indicates to test for match on simulation delta cycles. Otherwise, matches are only tested for at the end of each simulation time step. Optional.

-expr {<expr>}

Specifies a general expression of signal values and simulation time. Optional. searchlog will search until the expression evaluates to true. The expression must have a boolean result type. See "GUI_expression_format" for the format of the expression.

-value <string>

Specifies to search until a single scalar or compound signal takes on this value. Optional.

-count <n>

Specifies to search for the <n>-th occurrence of the match condition, where <n> is a positive integer. Optional.

-startDelta <num>

Indicates a simulation delta cycle on which to start. Optional.

-env <path>

Provides a design region to look for the signal names. Optional.

<startTime>

Specifies the simulation time at which to start the search. Required. The time may be specified as an integer number of simulation units, or as {<num> <timeUnit>}, where <num> can be integer or with a decimal point, and <timeUnit> is one of the standard VHDL time units (fs, ps, ns, us, ms, sec).

<pattern>

Specifies one or more signal names or wildcard patterns of signal names to search on. Required (unless the -expr option is used).

See also

virtual signal, virtual log, virtual nolog


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