I want to measure the pulse width of a series of non-deterministic square pulses (See Figure 1). In the end, I would have a vector of the duration of the n-occurrences vs. time of occurrence.

Using .MEAS available in Spice simulators, I can only give an occurrence using RISE, FALL or CROSS options.

Any solution or hint?

enter image description here

  • \$\begingroup\$ Does "time of occurrence" mean the rising edge, falling edge, or the midpoint of when the pulse hangs high (or low)? \$\endgroup\$
    – Ste Kulov
    Jul 28, 2022 at 16:42
  • \$\begingroup\$ @SteKulov Time of occurrence would be the time of the trigger to start the measurement \$\endgroup\$ Jul 29, 2022 at 8:13

1 Answer 1


You can use the RISE= form to make a measurement of the pulsewidth for a specific pulse. So, for example, use RISE=2 to make a measurement of the second pulse. Something like

.MEAS TRAN widthpulse2 TRIG V(node1) VAL=2.5 RISE=2 TARG V(node1) VAL=2.5 FALL=2

You will need a separate .MEAS for each pulse, and then you will have to do some post-processing of the log file to convert the data to your desired form.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.