Functions Supported by .measure in Spectre FX
The Spectre FX simulator supports the following measure function types:
- current and power
- Average, RMS, Min, Max, Peak-to-Peak, and Integral
- Find and When
- Rise, Fall, and Delay
- Parameter with Expressions
Related Topics
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
Average, RMS, Min, Max, Peak-to-Peak, and Integral
Syntax
.measuretranmeas_namefuncov1[from =valueto =value]
Arguments
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
Find and When
.measuretranmeas_namefindov1at =value
.measuretranmeas_namefindov1whenov2=value[td =value] [rise = r|last] [fall = f|last] [cross = c|last] [from =valueto =value]
.measuretranmeas_namewhenov1=ov2[td =value] [rise = r|last] [fall = f|last] [cross = c|last] [from =valueto =value]
Arguments
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
Rise, Fall, and Delay
.measuretranmeas_nametrig…targ…
Target
targtarg_varval =value[td =value] [cross =value| rise =value| fall =value]
Trigger
trigtrig_varval =value[td =value] [cross =value] [rise =value] [fall =value]
trig at = value
Arguments
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
Parameter with Expressions
.measuretranmeas_nameparam = '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.
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
Return to top