Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Cadence > MonteCarlo Resu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 3958 of 4109
Post > Topic >>

MonteCarlo Results from SKILL script

by "p_ritter" <p.ritter@[EMAIL PROTECTED] > Apr 21, 2008 at 05:31 AM

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




 6 Posts in Topic:
MonteCarlo Results from SKILL script
"p_ritter" <  2008-04-21 05:31:42 
Re: MonteCarlo Results from SKILL script
Riad KACED <riad.kaced  2008-04-21 16:12:18 
Re: MonteCarlo Results from SKILL script
"S. Badel" <  2008-04-22 02:25:22 
Re: MonteCarlo Results from SKILL script
"p_ritter" <  2008-04-21 23:50:27 
Re: MonteCarlo Results from SKILL script
Riad KACED <riad.kaced  2008-04-22 15:44:21 
Re: MonteCarlo Results from SKILL script
"S. Badel" <  2008-04-23 11:29:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 22:27:18 CDT 2008.