next up previous contents index
Next: Measurements Up: The measure Command Previous: Point and Interval Specification   Contents   Index

Syntax Compatibility

The present syntax supported by the .measure command in WRspice is a super set of the previous syntax cases, which are shown below. These should all work in the present system.

Form 1:

trig|targ at=value

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

Form 2:

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

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.

Form 3:

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

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.


next up previous contents index
Next: Measurements Up: The measure Command Previous: Point and Interval Specification   Contents   Index
Stephen R. Whiteley 2019-03-16