P
p_ritter
Guest
Dear Community,
one of my MC output parameters is computed from a skill script. This
script creates some files on the harddisc, performs its computations on
these files and returns a scalar.
However, since the computation takes a while (30sec), the result is not
returned to Spectre in time - this results in
--- monte carlo error message ---
Error found by spectre during Monte Carlo analysis `mc1'.
mc1_designParamVals: Error evaluating ocean expression `enob=ENOB(127
256
5)'.
---
Curiously, the script is started and the results are computed properly
(since the files are created on the harddisc) - but Spectre's oceanEval()
(see below) simply seems not to wait for the Skill script to be finshed.
I appreciate any kind of comment!
P. Ritter
My spectre version:
spectre (ver. 5.0.33.021904 -- 19 Feb 2004).
(I know there are updated versions but I cannot modify the installation)
--- The SKILL script
procedure( ENOBS( M N SamplingPoint)
let( ()
; -- create temporary ocean file which samples the transient
comparator output
; signals v(out0n)..v(out14n) and v(out0p)..v(out14p)
; samples are stored in temporary folder /var/tmp
; !! relies on global variable PSF_DIR to find the results of the
monte carlo
; !! simulation
oceanfile=outfile("/var/tmp/mc_enob_oceanout.ocn")
fprintf(oceanfile "simulator 'spectre\n")
[....]
fprintf(oceanfile "exit()\n")
close(oceanfile)
; -- start ocean to execute the file generated in the step before
system("ocean -nograph < /var/tmp/mc_enob_oceanout.ocn >
~/oceanlog.log")
; -- create matlab script to run on data exported by ocean
matlabfile=outfile("/var/tmp/mc_enob_matlabout.csh")
fprintf(matlabfile "#!/bin/csh\n")
fprintf(matlabfile "unsetenv DISPLAY\n")
fprintf(matlabfile "matlab >&! ~/matlablog.log << EOF\n")
[...]
fprintf(matlabfile "enobfile=fopen('/var/tmp/mc_enob_matlabres.il',
'w');\n")
fprintf(matlabfile "fprintf(enobfile, 'enob=%%d', enob);\n")
fprintf(matlabfile "fclose(enobfile);\n")
fprintf(matlabfile "exit\n")
fprintf(matlabfile "EOF\n")
close(matlabfile)
; -- run script
system("chmod a+x /var/tmp/mc_enob_matlabout.csh")
system("/var/tmp/mc_enob_matlabout.csh")
; -- read result computed by matlab
load("/var/tmp/mc_enob_matlabres.il")
enob
)
)
--- The spectre input.scs
[...]
mc1 montecarlo numruns=100 seed=1 variations=mismatch donominal=yes \
scalarfile="../monteCarlo/mcdata" paramfile="../monteCarlo/mcparam" \
saveprocessparams=yes processparamfile="../monteCarlo/processParam" \
processscalarfile="../monteCarlo/processData" {
tran tran stop=26.6n write="spectre.ic"
[...]
export enob=oceanEval("ENOB(127 256 5)")
}
--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
one of my MC output parameters is computed from a skill script. This
script creates some files on the harddisc, performs its computations on
these files and returns a scalar.
However, since the computation takes a while (30sec), the result is not
returned to Spectre in time - this results in
--- monte carlo error message ---
Error found by spectre during Monte Carlo analysis `mc1'.
mc1_designParamVals: Error evaluating ocean expression `enob=ENOB(127
256
5)'.
---
Curiously, the script is started and the results are computed properly
(since the files are created on the harddisc) - but Spectre's oceanEval()
(see below) simply seems not to wait for the Skill script to be finshed.
I appreciate any kind of comment!
P. Ritter
My spectre version:
spectre (ver. 5.0.33.021904 -- 19 Feb 2004).
(I know there are updated versions but I cannot modify the installation)
--- The SKILL script
procedure( ENOBS( M N SamplingPoint)
let( ()
; -- create temporary ocean file which samples the transient
comparator output
; signals v(out0n)..v(out14n) and v(out0p)..v(out14p)
; samples are stored in temporary folder /var/tmp
; !! relies on global variable PSF_DIR to find the results of the
monte carlo
; !! simulation
oceanfile=outfile("/var/tmp/mc_enob_oceanout.ocn")
fprintf(oceanfile "simulator 'spectre\n")
[....]
fprintf(oceanfile "exit()\n")
close(oceanfile)
; -- start ocean to execute the file generated in the step before
system("ocean -nograph < /var/tmp/mc_enob_oceanout.ocn >
~/oceanlog.log")
; -- create matlab script to run on data exported by ocean
matlabfile=outfile("/var/tmp/mc_enob_matlabout.csh")
fprintf(matlabfile "#!/bin/csh\n")
fprintf(matlabfile "unsetenv DISPLAY\n")
fprintf(matlabfile "matlab >&! ~/matlablog.log << EOF\n")
[...]
fprintf(matlabfile "enobfile=fopen('/var/tmp/mc_enob_matlabres.il',
'w');\n")
fprintf(matlabfile "fprintf(enobfile, 'enob=%%d', enob);\n")
fprintf(matlabfile "fclose(enobfile);\n")
fprintf(matlabfile "exit\n")
fprintf(matlabfile "EOF\n")
close(matlabfile)
; -- run script
system("chmod a+x /var/tmp/mc_enob_matlabout.csh")
system("/var/tmp/mc_enob_matlabout.csh")
; -- read result computed by matlab
load("/var/tmp/mc_enob_matlabres.il")
enob
)
)
--- The spectre input.scs
[...]
mc1 montecarlo numruns=100 seed=1 variations=mismatch donominal=yes \
scalarfile="../monteCarlo/mcdata" paramfile="../monteCarlo/mcparam" \
saveprocessparams=yes processparamfile="../monteCarlo/processParam" \
processscalarfile="../monteCarlo/processData" {
tran tran stop=26.6n write="spectre.ic"
[...]
export enob=oceanEval("ENOB(127 256 5)")
}
--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html