Hi <@U016EM8L91B> for PLL i wish to run cace. I wa...
# chipalooza
a
Hi @Tim Edwards for PLL i wish to run cace. I want help regarding how i can measure phase difference or frequency?
t
I think the best way to measure frequency accurately is from within the ngspice control block. Use the
fft
command to generate an FFT result, then apply
meas
to the FFT result to find the first spike not at f=0. See, for example: https://sourceforge.net/p/ngspice/discussion/133842/thread/004930bb69/
👍 1
v
@Stefan Schippers Any idea about syntax of
.meas
statement to find frequency of first spike as suggested above ?
a
@Tim Edwards how can we measure jitter?
t
For cycle-to-cycle jitter, what you're basically doing is measuring the time from each edge to the next edge, which in a histogram should look like a normal distribution, and then the jitter is the standard deviation of that. Possibly the only way to do that in ngspice is to run
.meas
to find the time of the _n_th rising edge in a transient simulation, and do that n times to get a statistically significant distribution (such as n = 100 or more). What you get might be realistic if the jitter is dominated by the charge pump. For RMS jitter, it may be legitimate to run an FFT on the transient output and then measure the width of the spike at the output frequency. Back in the day when I did such measurements, I was using simulators with phase noise (pnoise) analysis, which is the proper way to do it for simulators that support it. There is a "perpetually experimental" periodic steady-state (PSS) analysis in ngspice, but I don't have much optimism that you will get anything meaningful out of it.
👍 1