I have a large circuit that generates pulses and I measure the pulse width using a .meas statement. Accuracy in this measurement is critical to understanding the circuit.
I am currently using:
.tran 8u 10ms 0
because the first parameter - the timestep - has a large influence on the measurement of the pulse width. For example with this tran statement:
ngspice built into KiCAD 5.1.12: pulse width = 3.277ms
External ngspice 36: pulse width = 3.250ms
That is a difference of 27us in measurements. Why is the difference not 8us in the worse case?
It seems that every time I run the simulation I get exactly the same pulse width as before, so where is the difference between the two versions of ngspice coming from? E.g. the external ngspice always has a shorter pulse width.
If I reduce the timestep to 5us then the simulation breaks. Am I reaching what is possible with ngspice?
Note that I am also using:
.options CHGTOL=1e-25
Thanks!