timing_between
Compute signed propagation delay or skew between two signals in a transient .raw file, using first threshold crossings to determine timing.
Instructions
Use when you need propagation delay / skew between TWO signals — e.g. input-to-output delay, clock-to-Q, input-skew. Inputs one transient .raw containing both signals on a shared time axis.
Returns: signed delay = t_b - t_a where t_a and t_b are the FIRST threshold crossings of signal_a and signal_b in the window. Negative delay means signal_b leads signal_a.
Thresholds default to 50% of EACH signal's own min-max range in the window — intentional for asymmetric CMOS where V_in and V_out have different rails. Override per-signal via threshold_a / threshold_b if you need absolute thresholds (e.g. VIH/VIL at fixed voltages). Set direction_a / direction_b independently (e.g. rising input → falling output for an inverter).
Picks only the FIRST crossing of each signal in the window — if both signals have multiple edges, tighten t_start/t_end around the specific edge pair you want. Rejects AC analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw_file | Yes | Path to .raw transient result file | |
| signal_a | Yes | Reference signal (e.g. 'V(in)') | |
| signal_b | Yes | Delayed signal (e.g. 'V(out)'). delay = t_b - t_a. | |
| step | No | Step index for .step sweeps | |
| t_start | No | Window start in SPICE notation | |
| t_end | No | Window end in SPICE notation | |
| threshold_a | No | Absolute threshold for signal_a. If omitted, threshold_pct of signal_a's range is used. | |
| threshold_b | No | Absolute threshold for signal_b. If omitted, threshold_pct of signal_b's range is used. | |
| threshold_pct | No | Threshold percent applied PER SIGNAL (not shared) — asymmetric for CMOS with different rails. | |
| direction_a | No | rising | |
| direction_b | No | rising | |
| format | No | 'json' or 'text' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| t_a | Yes | ||
| t_b | Yes | ||
| delay | Yes | ||
| threshold_a_used | Yes | ||
| threshold_b_used | Yes | ||
| direction_a | Yes | ||
| direction_b | Yes | ||
| num_crossings_a | Yes | ||
| num_crossings_b | Yes | ||
| warnings | Yes | ||
| signal_a | Yes | ||
| signal_b | Yes |