GitHub
04/07/2025, 8:12 AMtt_stat sims, is that random device parameters are picked once (per device type) and then applied to all instances of that devices in the design.
This is not what happening. Instead each instance gets different random parameters which as you can imagine is a bit unrealistic because the spread from tt_stat is quite wide and using random parameters in current mirrors or differential pairs leads to "interesting" results.
The way the models pick the parameters is using .param xxxx = gauss(....) and if you believe the ngspice manual, theses should be evaluated once at startup and the same value used everywhere, which is exactly what you'd want here.
Unfortunately, the manual is wrong ... I've opened a thread on the ngspice mailing list ( https://sourceforge.net/p/ngspice/discussion/133842/thread/c13bbd10c6/ ) but the gist of it is that there seem to be a deliberate, undocumented behavior that any param that has a statistical distribution function in it is re-evaluated at each use.
That obviously wreaks havoc here the way the models are written ... it basically creates a mismatch simulation but with a much greater spread of parameters than you'd want for a mismatch sim :/
One work around I've tried is instead of :
.param xxx = gauss(...)
is to use :
.param rnd_xxx = gauss(...)
.param xxx = rnd_xxx
Then xxx will actually have a stable value.
This is an example patch that applies that work around to the models here.
ihp_stat_workaround.diff.gz
Note that this is for testing/evaluation only. I only checked the lv nmos with it applied and I'd also like to see how the ngspice thread before applying anything, but I'm opening the issue here to keep track / not forget about it.
IHP-GmbH/IHP-Open-PDK