The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> On HSPICE Monte Carlo iterations
https://designers-guide.org/forum/YaBB.pl?num=1479423098

Message started by AA on Nov 17th, 2016, 2:51pm

Title: On HSPICE Monte Carlo iterations
Post by AA on Nov 17th, 2016, 2:51pm

Hi,

I noticed that Monte Carlo simulation in HSPICE changes the parameter value within the same iteration in case the parameter is used more than once. How to force the simulator to stick to the same parameter value within the same iteration?

Here is a very simple example netlist that illustrates the scenario:


Code:
* simple Monte Carlo simulation

* Parameters
.param res_uncer = agauss(0,100)

* netlist
V1 0 n1 dc 10
R1 n1 n2 1k+res_uncer
R2 n2 0 1k+res_uncer

.tran 0.1n 10n sweep monte=10

.meas tran vn2 find V(n2) at=1n

.option brief nomod accurate abstol=1e-9 reltol=1e-9 ingold=2
.option measform=3
.option SEED=541

.end


Simulating this netlist using HSPICE (my version is 2015) produces the following .mt0.csv file:

Code:
$DATA1 SOURCE='HSPICE' VERSION='K-2015.06-SP1 linux64' PARAM_COUNT=3
$OPTION MEASFORM=3
.TITLE '* simple monte carlo simulation'
index,r1@res_uncer,r2@res_uncer,vn2,temper,alter#
1, 965.4753, 1.044e+03,  -5.1944,  25.0000,1
2, 1.043e+03, 993.1441,  -4.8769,  25.0000,1
3, 1.020e+03, 969.4306,  -4.8732,  25.0000,1
4, 1.045e+03, 992.5139,  -4.8701,  25.0000,1
5, 999.2850, 1.009e+03,  -5.0253,  25.0000,1
6, 1.036e+03, 972.3128,  -4.8420,  25.0000,1
7, 977.6941, 1.040e+03,  -5.1539,  25.0000,1
8, 1.003e+03, 1.030e+03,  -5.0680,  25.0000,1
9, 1.006e+03, 1.001e+03,  -4.9880,  25.0000,1
10, 1.003e+03, 1.003e+03,  -5.0007,  25.0000,1


Note that, on every Monte Carlo iteration, the parameter res_uncer is generated twice (columns r1@res_uncer,r2@res_uncer on above csv output).

How can I make HSPICE use one parameter value per Monte Carlo iteration? Is this possible? In other words, for this specific example, how can I make the second and third columns of the mt0.csv file produce the same value?



Title: Re: On HSPICE Monte Carlo iterations
Post by davidshw on Nov 17th, 2016, 10:05pm

to make the random param has the same value, you can use the random param like this

.param res_uncer1=res_uncer
R1 n1 n2 1k+res_uncer1
R2 n2 0 1k+res_uncer1

Title: Re: On HSPICE Monte Carlo iterations
Post by AA on Nov 18th, 2016, 7:46am

Thanks. That really solved the problem.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.