hey all, Has anyone else done some testing with the monte-carlo simulations (corner:mc)? I have be...
j
hey all, Has anyone else done some testing with the monte-carlo simulations (corner:mc)? I have been looking into this simulation, but when testing the current through a high poly resistor, I get a negative resistance for around 20% of the runs. When looking into this, I found the following: The SPICE file
libraries/sky130_fd_pr/latest/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po.model.spice
defines the resistor as R = R0 * (1 + var), with var being
sky130_fd_pr__res_xhigh_po__var_mult
defined in a comment in the file as a gaussian with std=0.025, but when looking at the netlist, the value is std=1.25*(0.0+agauss(0,1.0,1), or a gaussian with std=1.25. I believe this stems from another definition in
libraries/sky130_fd_pr/latest/models/parameters/montecarlo.spice
, where this var is defined as being 1.25 *
ic_res
. This
ic_res
is defined in
libraries/sky130_fd_pr/latest/models/parameters/critical.spice
as being 0.0. It also adds in comment that it should be a gaussian random variable with std=1. Does anyone have some more info on this? Cheers, Jelle
t
@Jelle Verest: Don't look at the Google repository sources; the Monte Carlo parameters and how to deal with them in ngspice was figured out after the repository was created, and Google has never merged pull requests. Look at the fork used by open_pdks, which is https://github.com/efabless/skywater-pdk-libs-sky130_fd_pr. There, in
models/parameters/critical.spice
you will find
Copy code
.param ic_res = 0.0 + MC_PR_SWITCH*AGAUSS(0,1.0,1)
which is, in fact, a Gaussian random variable with mean 0 and standard deviation 1 (when the
mc
corner is used, which sets
MC_PR_SWITCH
to
1
).
j
@Tim Edwards Thank you, I see now! I also see that only the fully parameterizable models have this extremely large variation. The binned resistors are consistent with the measurements in the PDK documentation.