Defining a Monte Carlo Netlist Parameter
The netlist uses the .PARAM statement to define a netlist parameter with a Monte Carlo distribution. Five distributions are supported:
- Uniform distribution with absolute bounds
- Uniform distribution with relative bounds
- Gaussian distribution with absolute spread
- Gaussian distribution with relative spread
- Limit or min/max distribution
See Monte Carlo Distributions for explanations of these distributions.
Uniform Distribution with Absolute Bounds
To define a Monte Carlo netlist parameter with uniform distribution and absolute bounds, use the following syntax:
.PARAM name=AUNIF(nominal_value,absolute_bound [,multiplier])
Monte Carlo values will be generated from a uniform distribution in the range:
(nominal_value-absolute_bound) to (nominal_value + absolute_bound)
If a multiplier is specified, that many values will be generated, the value that has the highest absolute deviation from the nominal value will be used in the simulation, and the other values will be discarded. The default is to do one selection.
For example, to define a uniform distribution with a nominal value of zero and an absolute range of plus or minus five:
.PARAM D1=AUNIF(0, 5)
Uniform Distribution with Relative Bounds
To define a Monte Carlo netlist parameter with uniform distribution and relative bounds, use the following syntax:
.PARAM name=UNIF(nominal_value,relative_bound [,multiplier])
Monte Carlo values will be generated from a uniform distribution in the range:
-(nominal_value´relative_bound) to +(nominal_value´relative_bound)
If a multiplier is specified, that many values will be generated, the value that has the highest absolute deviation from the nominal value will be used in the simulation, and the other values will be discarded. The default is to do one selection.
For example, to define a uniform distribution with a nominal value of 10 and a relative range of plus or minus 5%:
.PARAM D1=UNIF(10, 0.05)
A relative distribution cannot have a nominal value of zero. To create an actual distribution with relative range and nominal value zero, you could use a secondary variable:
.PARAM D1=UNIF(10, 0.05)
.PARAM ACTUAL_D1='D1 - 10'
Alternatively, you could use the expression to set the instance or model parameter:
R21 Vin 0 R='1000 + (D1 - 10)'
Gaussian Distribution with Absolute Spread
To define a Monte Carlo netlist parameter with Gaussian distribution and absolute spread, use the following syntax:
.PARAM name=AGAUSS(mean,abs_spread, num_sigma[,multiplier])
Monte Carlo values will be generated from a Gaussian distribution with standard deviation:
s = abs_spread/num_sigma
If a multiplier is specified, that many values will be generated, the value that has the highest absolute deviation from the mean will be used in the simulation, and the other values will be discarded. The default is to do one selection.
For example, to define a Gaussian distribution with a mean of zero and a standard deviation of 1 (a “normal” distribution) using an absolute spread:
.PARAM D1=AGAUSS(0, 3, 3) // Normal distribution