Product Documentation
Spectre FX Circuit Simulator User Guide
Product Version 23.1, September 2023

Functions Supported by .measure in Spectre FX

The Spectre FX simulator supports the following measure function types:

Related Topics

.measure

current and power

Description

Used for current and power analysis on elements or subcircuits.

Examples

.measure tran current max x(xtop.x23.out) from=0ns to=1us

Tells the Spectre FX simulator to measure the maximum current of port out of instance xtop.x23 and all the instances below.

.measure tran power max `v(xtop.x23.out) * x(xtop.x23.out)` from=0ns to=1us 

Tells the Spectre FX simulator to measure the maximum power of port out of instance xtop.x23 and all the instances below.

.measure tran power_avg avg `v(1) * i1(r1)` from=0ns to=1us 

Tells the Spectre FX simulator to measure the average power on element r1, from 0 ns to 1 us.

.measure tran energy integ ` v(xtop.x23.out) * x(xtop.x23.out)` from=0ns to=10us 

Tells the Spectre FX simulator to measure the integral power (total energy) of port out of instance xtop.x23 and all the below instances.

Related Topics

.measure

Average, RMS, Min, Max, Peak-to-Peak, and Integral

Syntax

.measure tran meas_name func ov1 [from = value to = value]

Arguments

Name Description

tran

Specifies the transient analysis for the measurement.

The Spectre FX simulator only supports measurement of transient analysis.

meas_name

User-defined measurement name.

ov1

Name of the output variable (can be the node voltage, branch current of the circuit, or an expression).

func

avg calculates the average area under ov1, divided by the period of time.

max reports the maximum value of ov1 over the specified interval.

min reports the minimum value of ov1 over the specified interval.

pp reports the maximum value, minus the minimum of ov1, over the specified interval.

rms calculates the square root of the area under the ov1 curve, divided by the period of interest.

integ reports the integral of ov1 over the specified period.

from=value

Start time for the measurement period.

to=value

End time for the measurement period.

Examples

.measure tran avg1 avg v(1) from = 0ns to = 1us 

Tells the Spectre FX simulator to calculate the average voltage of node 1 from 0 ns to 1us, evaluating the result with variable avg1.

.measure tran Q2 integ I(out) from = 0ns to = 1us

Tells the Spectre FX simulator to calculate the integral of I(out) from 0 ns to 1 us, evaluating the result with variable Q2.

.measure tran rms3 rms v(out) from = 0ns to = 1us

Tells the Spectre FX simulator to calculate the RMS of the voltage on node out from 0 ns to 1 us, evaluating the result with variable rms3.

.measure tran rout pp par('v(out)/i(out)')

Tells the Spectre FX simulator to calculate the peak-to-peak value of the output resistance at node out, evaluating the result with variable rout.

Related Topics

.measure

Find and When

.measure tran meas_name find ov1 at = value 

or

.measure tran meas_name find ov1 when ov2 = value [td = value] [rise = r|last] [fall = f|last] [cross = c|last] [from = value  to = value]

or

.measure tran meas_name when ov1 = ov2 [td = value] [rise = r|last] [fall = f|last] [cross = c|last] [from = value to = value] 
The from/to pair, at, and td arguments cannot be specified together in the same .measure statement.

Arguments

Name Description

tran

Specifies the transient analysis for the measurement.

The Spectre FX simulator only supports measurement of transient analysis.

meas_name

User-defined measurement name.

when|find

Specifies the when and find functions.

ov1, ov2, ov3

Names of the output variables (can be the node voltage, branch current of the circuit, or an expression).

td

Time at which measurement starts.

rise=r

Number of rising edges the target signal achieves r times (the measurement is executed).

fall=f

Number of falling edges the target signal achieves f times (the measurement is executed).

cross=c

Total number of rising and falling edges the target signal achieves c times (the measurement is executed). Crossing can be rise or fall.

last

Last cross, fall, or rise event (measurement is executed the last time the find or when condition is true).

last is a reserved keyword and cannot be used as a parameter name in the .measure statement.

from=value

Start time for the measurement period.

to=value

End time for the measurement period.

Examples

.measure tran find1 find v(1) at = 0ns
.measure tran find2 find v(1) when v(2) = 2.5 rise = 1
.measure tran when1 v(1) = 2.5 cross = 1
.measure tran when2 v(1) = v(2) cross = 1
.measure tran_cont cont_find3 find v(1) when v(2) = 2.5 rise = 1
.measure tran_cont cont_when3 v(1) = 2.5 cross = 1
.measure tran_cont cont_when4 v(1) = v(2) cross = 1

Related Topics

.measure

Rise, Fall, and Delay

.measure tran meas_name trigtarg

Target

targ targ_var val = value [td = value] [cross = value | rise = value | fall = value] 

Trigger

trig trig_var val = value [td = value] [cross = value] [rise = value] [fall = value] 

or

trig at = value 

Arguments

Name Description

tran

Specifies the transient analysis for the measurement.

The Spectre FX simulator only supports measurement of transient analysis.

meas_name

User-defined measurement name.

trig

Specifies the beginning of trigger specifications.

targ

Specifies the beginning of target specifications.

trig_var

Name of the output variable that triggers the measurement. If the target is reached before the trigger activates, .measure reports a negative value.

targ_var

Name of the output variable the Spectre FX simulator uses to determine the propagation delay with respect to trig_var.

val=value

Value of trig_var or targ_var.

td=value

Specifies the time the measurement starts. The simulator counts the number of cross, rise, or fall events that occur after the td value. The default value is 0.0.

rise=value

fall=value

cross=value

Number of rise, fall, or cross events the target signal achieves f times (the measurement is executed).

at=value

Special case for trigger specification of the measurement start time. The value can be a real time or a measurement result from a previous .measure statement.

Examples

.measure tran delay1 trig v(1) val = 0.5 rise = 1 targ v(2) val = 0.5 fall =1
.measure tran delay2 trig v(1) val = 0.5 rise =1 targ v(2) val = 0.5 fall =1

Tells the Spectre FX simulator to measure the delay from time point v(1), when its value is 0.5 volts on the first rising edge, to time point v(2) when its value is 0.5 volts on the first falling edge.

The second .measure statement reports the delay between v(1) and v(2) until the simulation ends. The additional output file is cont_delay2.mt0.

.measure tran delay1 trig at=1ns targ v(2) val = 0.5 fall = 1

Tells the Spectre FX simulator to measure the delay from 1 ns to time point v(2) when its value is 0.5 volts on the first falling edge.

Related Topics

.measure

Parameter with Expressions

.measure tran meas_name param = 'expr'

Description

This format is specified together with other measures. expr can contain the names of other measures, but cannot contain node voltages or element currents.

Since expr is a function of previous measurement results, it cannot be a function of node voltage or branch current.

Examples

.measure tran avg1 avg v(1) from = 0ns to = 1us
.measure tran avg2 avg v(1) from = 2ns to = 3us .measure tran avg12 param = 'avg1+avg2'

In the above example, the measure avg12 returns the sum of the values from avg1 and avg2.

.measure tran avg01 avg v(in) from = 0 to = 1e-08
.measure tran time1 when v(1) = 2.5 cross = 1
.measure tran delay1 trig at = 'time1' targ v(t4) val = '0.5*(avg01+0.0112)' rise = 1 

In the above example, the measure delay1 is calculated based on the results of time1 and avg01.

Related Topics

.measure


Return to top
 ⠀
X