Technical data

searchLog
CR-144 ModelSim Commands ModelSim EE/SE Command Reference
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.
-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.
-value<string><radix>
Specifies to search until a single scalar or compound signal takes on this value.
<radix> is the radix of the value string. Optional.