Could somebody provide some more information about...
# analog-design
k
Could somebody provide some more information about
mc_ok
and
mm_ok
switches for statistic analysis. It is a little bit confusing since the documentation of hspice (and ngspice follows this approach) defines the
gauss
and
agauss
functions in such way that this parameter placed at third place means a number of sigmas
gauss(nominal_val, std, nsigmas)
. When
mc_ok
or
mm_ok
are set to 0 there is no variation but still the function is calculated.
t
Which PDK are you referring to?
In sky130, the parameters
MC_MM_SWITCH
and
MC_PR_SWITCH
correspond to what you refer to as
mm_ok
and
mc_ok
. Equations take a form like
mismatch_factor*MC_MM_SWITCH*AGAUSS(0,1.0,1)
, where the gaussian mean in the
AGAUSS
function call is always set to zero and the sigma is alwasy set to one; the expression result is then multiplied by
mismatch_factor
(which takes care of the sigma) and is added to the parameter nominal value (which takes care of the mean). Example usage suggests that
mismatch_factor = 1
corresponds to 3 sigma. This can vary from foundry PDK to foundry PDK, but when converting from, say, spectre models to ngspice, this is generally the easiest way to do the conversion.
1
k
@Tim Edwards thank you for the feedback. Just to clarify, it seems that when the third argument of the
agauss
function is set to 1 this implies 3 sigma and should be used as a default value.
The other question I have is about separating process variation analysis and mismatch variation analysis. For the IHP-Open-PDK we would like to provide mismatch variation and the question is if it does make sense to keep process, mismatch, process + mismatch variation separated from designers point of view.
t
@Krzysztof Herman: For the clarification: I chose my words carefully; "Example usage suggests that
mismatch_factor = 1
corresponds to 3 sigma". I haven't found any statement in the documentation to absolutely confirm that. But from other foundries' PDKs, usually the values are set to a default of 3 sigma; either they will provide a parameter, e.g.,
process_sigma = 3
or something obvious like that. If it's just a generic term like
mismatch_factor
and the foundry's example usage has it set to 1, then it's most likely to be corresponding to 3 sigma. Obviously
gauss()
can be multiplied up so that
nsigmas
can be either hidden in the
mismatch_factor
or even in the parameter value being multiplied by the
agauss()
result.
@Krzysztof Herman: For all the PDKs that I have seen, process and mismatch parameters are handled separately. For sky130, I created the
sky130.lib.spice
file and made a number of different categories, most of which were combinations of corners and mismatch; process variation (monte carlo) is a single
.lib
section and not combined with anything. It probably should include sections where process and mismatch are combined. I did not do that because at the time ngspice was struggling with the
.lib
files and unfortunately processing all the
.lib
sections instead of just the one being requested, which was causing ngspice to take ages to start up a simulation. That has been fixed, so there is no reason not to include every kind of useful combination of variations in the
.lib
file.
k
Great to hear that. We will combine the sections in the
.lib
file. As for the
nsigmas
I was suggested by the developers of ngspice to get information from the hspice manual https://cseweb.ucsd.edu/classes/wi10/cse241a/assign/hspice_sa.pdf The definitions are on page 919
t
Yes, but the definitions in the ngspice manual don't help with the problem that the foundry could have defined each parameter being multiplied by the gaussian as the value at one sigma, or as the value at three sigma, (or something else, although those are the two obvious choices) and without some documentation or comment indicating which one, it's impossible to know.
k
Soon we will release some of our PCM structures so we can then generate more measurements data and generate the statistics in the fully transparent way.
👍 1