Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


left

The left command searches left (previous) for signal transitions or values in the specified Wave window. It executes the search on signals currently selected in the window, starting at the time of the active cursor. The active cursor moves to the found location.

Use this command to move to consecutive transitions or to find the time at which a waveform takes on a particular value, or an expression of multiple signals evaluates to true. See the right command for related functionality.

The procedure for using left entails three steps: click on the desired waveform; click on the desired starting location; issue the left command. (The seetime command can initially position the cursor from the command line, if desired.)

Returns: <number_found> <new_time> <new_delta>

Syntax

left

[-expr {<expression>}] [-falling] [-noglitch] [-rising]
[
-value <sig_value>] [-window <wname>] [<n>]

Arguments

-expr {<expression>}

The waveform display will be searched until the expression evaluates to a boolean true condition. Optional. The expression may involve more than one signal, but is limited to signals that have been logged in the referenced Wave window. A signal may be specified either by its full path or by the shortcut label displayed in the Wave window.

See "GUI_expression_format" for the format of the expression. The expression must be placed within curly braces.

-falling

Searches for a falling edge on the specified signal if that signal is a scalar signal. If it is not a scalar signal, the option will be ignored. Optional.

-noglitch

Looks at signal values only on the last delta of a time step. For use with -value option only. Optional.

-rising

Searches for a rising edge on the specified signal if that signal is a scalar signal. If it is not a scalar signal, the option will be ignored. Optional.

-value <sig_value>

Specifies a value of the signal to match. Must be specified in the same radix in which the selected waveform is displayed. Case is ignored, but otherwise the value must be an exact string match - don't-care bits are not yet implemented. Only one signal may be selected, but that signal may be an array. Optional.

-window <wname>

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

<n>

Specifies to find the nth match. If less than n are found, the number found is returned with a warning message, and the cursor is positioned at the last match. Optional. The default is 1.

Examples

left -noglitch -value FF23 2

Finds the second time to the left at which the selected vector transitions to FF23, ignoring glitches.

left

Goes to the previous transition on the selected signal.

The following examples illustrate search expressions that use a variety of signal attributes, paths, array constants, and time variables. Such expressions follow the "GUI_expression_format" and can be built with the aid of the "The GUI Expression Builder" .

left -expr {clk'rising && (mystate == reading) && (/top/u3/addr == 32'habcd1234)}

Searches left for an expression that evaluates to a boolean 1 when signal clk just changed from low to high and signal mystate is the enumeration reading and signal /top/u3/addr is equal to the specified 32-bit hex constant; otherwise is 0.

left -expr {(/top/u3/addr and 32'hff000000) == 32'hac000000}

Searches left for an expression that evaluates to a boolean 1 when the upper 8 bits of the 32-bit signal /top/u3/adder equals hex ac.

left -expr {((NOW > 23 us) && (NOW < 54 us)) && clk'rising && (mode == writing)}

Searches left for an expression that evaluates to a boolean 1 when logfile time is between 23 and 54 microseconds, and clock just changed from low to high and signal mode is enumeration writing.


Note: Wave window mouse and keyboard shortcuts are also available for next and previous edge searches. Tab searches right (next) and shift-tab searches left (previous).

See also

"GUI_expression_format" , right, seetime, 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