next up previous contents index
Next: Measurements Up: .measure Line Previous: .measure Line   Contents   Index


Point and Interval Specification

The interval begins with the ``trigger'' and ends with the ``target''. Measurement will apply during this interval. If no target is given, the trigger sets the ``point'', where measurement will be performed. The trigger and target are independently specified as follows:

form 1:

trig|targ at=value

form 2:

trig|targ variable [val=]value [td=delay] [cross=crosses] [rise=rises] [fall=falls]

form 3:

trig|targ when expr1=expr2 [td=delay] [cross=crosses] [rise=rises] [fall=falls]

Separate specifications for trig/targ are used to specify the boundaries of the measurement interval in the .measure statement.

Form 1 is straightforward; the interval starts (trig) or ends (targ) at value. Value must be within the simulation range of the scale variable (e.g., time in transient analysis).

The same effect can be achieved with:

from=value to=value
The from keyword is equivalent to ``trig at'', the to keyword is equivalent to ``targ at''.

If at appears without trig or targ, it is interpreted as ``trig at''.

Form 2 allows the interval boundaries to be referenced to times when a variable crosses a threshold. The variable can be any vector whose value is available during simulation. The value is a constant which is used to measure crossing events. The val= which precedes the value is optional. At least one of the rise/fall/cross fields should be set. Their values are integers which represent the variable crossing the threshold a number of times. The rise indicates the variable rising through the threshold, fall indicates the variable decreasing from above to below the threshold, and cross indicates rises + falls. The interval boundary is set when the specified number of transitions is reached.

If the delay is specified, transition counting starts after the specified delay.

Example:
trig v(2) 2.5 td=0.1ns rise=2

This indicates that the interval begins at the second time v(2) rises above 2.5V after 0.1ns.

The third form is similar to the second form, except that crossings are defined when expr1 = expr2. These are expressions, which must be enclosed in parentheses if they contain white space or commas. A rise is defined as expr1 going from less than to greater than expr2.

A point can be specified with a trig or from specification as for an interval. One can also use the following form:

when expr1=expr2 [td=delay] [cross=crosses] [rise=rises] [fall=falls]

This works exactly as in ``trig when''.


next up previous contents index
Next: Measurements Up: .measure Line Previous: .measure Line   Contents   Index
Stephen R. Whiteley 2017-10-02