Hello,
I'd like to obtain values of noise contributions in the circuit for each Monte Carlo run using SpectreMDL.
Andrew Beckett came up with a solution when I asked this question on Apr 19 2019 (see test1.mdl below).
It worked fine at the time, but now I see these warnings in the log file:
> spectre =mdl test1.mdl test.scs
WARNING (SPECTRE-16045): r1: Undefined parameter name `total'.
WARNING (SPECTRE-16045): r2: Undefined parameter name `total'.
Simulation does produce the result file test.raw/scalar though, and I think it is valid.
I simply would like to confirm that these warnings above are harmless, don't think I saw them before.
Also, Spectre reports errors when I toss around export statements in the MDL file.
For example, it happens if I move "export real noi_total=noi_meas:out;" to the end of the alias block, see test2.mdl below:
ERROR (SPECTRE-16045): r1: Undefined parameter name `total'.
ERROR (SPECTRE-16045): r2: Undefined parameter name `total'.
In such case data in test.raw/scalar shows NaN for noi_r1 and noi_r2.
I suppose there is a rule to always have *:out export statement first in the block?
Please confirm.
The mmsim version I use is 19.1.0.237.isr3 64bit -- 3 Jan 2020.
Thanks!
test.scs
=======================================
simulator lang=spectre
r1 (1 0) res_model l=10e-6 w=2e-6
r2 (2 1) res_model l=15e-6 w=2e-6
vr (2 0) vsource dc=1.0 mag=1
model res_model resistor rsh=100 kf=1e-20*exp(dkf)
parameters dkf=0
statistics {
process {
vary dkf dist=gauss std=0.5
}
}
noi (1 0) noise freq=1
=======================================
test1.mdl
=======================================
alias measurement noi_meas {
run noi;
export real noi_total=noi_meas:out;
export real noi_r1=r1:total;
export real noi_r2=r2:total;
}
run montecarlo(numruns=10,variations='process,scalarfile="scalars") {
run noi_meas;
}
=======================================
test2.mdl
=======================================
alias measurement noi_meas {
run noi;
export real noi_r1=r1:total;
export real noi_r2=r2:total;
export real noi_total=noi_meas:out;
}
run montecarlo(numruns=10,variations='process,scalarfile="scalars") {
run noi_meas;
}
=======================================