• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. spectremdl montecarlo simulations, how to fix my errors...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 17617
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

spectremdl montecarlo simulations, how to fix my errors ?

samung
samung over 12 years ago
Hello,

I would like to launch some montecarlo simulations through spectremdl commandline interface.

I launch :
spectremdl -batch input.mdl -design input.scs -measure mc_results_file/results_file +log mc_log_file.log

I have the errors :
Error found by spectre.
    ERROR: line 11, column 2: syntax error before or at: <eof>
            unrecognised statement
    ERROR (MDL-6): Failed to parse MDL control file, `input.mdl'.

I don't know how I can fix these errors. Could you please help me ?

Thanks !!

Pedro


I have the following files :

###################################
input.mdl :

/* mdl measurement file */


alias measurement tran_meas {
    run tran
    export real test = 1000
}

run montecarlo (numruns=50, variations='mismatch, scalarfile="mc_results.dat", donominal='no) {
    run tran_meas
}


####################################
input.scs :

subckt inv A1 YN vdd vnw vpw vss
...
M5 (YN A1 vdd vnw) psvtlp w=wp*10e5 l=lp*10e5 nfing=pfolds mult=1 \
        srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1
...
M1 (saout_b saout vss vpw) nsvtlp w=wndiff l=lndiff nfing=1 mult=1 \
        srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1
include "./_graphical_stimuli.scs"
ic aout=1 aout_b=0 
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=70.0 \
    tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
    digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \
    checklimitdest=psf 
tran tran stop=20n write="spectre.ic" writefinal="spectre.fc" annotate=status maxiters=5
finalTimeOP info what=oppoint where=rawfile
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
primitives info what=primitives where=rawfile
subckts info what=subckts  where=rawfile
save aeni aout aout_b
saveOptions options save=allpub subcktprobelvl=2


  • Cancel
Parents
  • samung
    samung over 12 years ago

    OK, I have a kind of workaround. I am using straight spectre and not spectremdl, as follow :

    I execute : mc_script_spectremdl.sh and I get the waveform results of my montecarlo simulations :

    My current issue is to get the  mc simulation runs where the below export (written in the input.scs) is greater than a value (1 for example):

    export aout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

    Graphically, it's easy to put a "target" and then get the yield of the mc run, but I don't know how to do it in batch. 

     

    I have the following files : 

    mc_script_spectre.sh : 

    #! /bin/csh -f 

    spectre input.scs +log mc_log_file.log

     

    input.scs :

    // Generated for: spectre

     

    simulator lang=spectre

    global 0

    include "models.scs"

    parameters ...

     

    subckt ncx ncx

    ends ncx

    // End of subcircuit definition.

     

    subckt inv A1 YN vdd vnw vpw vss

    parameters wp=xxx lp=xxx pfolds=1 wn=xxx ln=xxx nfolds=1

    M5 (YN A1 vdd vnw) psvtlp w=wp*10e5 l=lp*10e5 nfing=pfolds mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    M2 (YN A1 vss vpw) nsvtlp w=wn*10e5 l=ln*10e5 nfing=nfolds mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    ends inv

     

    ...

    M0 (aout aout_b vss vpw) nsvtlp w=wndiff l=lndiff nfing=1 mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    ...

    include "./_graphical_stimuli.scs"

    ic aout=1 aout_b=0 

    simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=70.0 \

        tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \

        digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \

        checklimitdest=psf 

    mc1 montecarlo numruns=50 seed=12345 variations=mismatch sampling=standard \

        donominal=yes scalarfile="../monteCarlo/mcdata" \

        paramfile="../monteCarlo/mcparam" savemismatchparams=yes \

        mismatchparamfile="../monteCarlo/mismatchparam" \

        mismatchscalarfile="../monteCarlo/mismatchdata" \

        dumpdependency=mismatch \

        dependencymapfile="../monteCarlo/mismatchdependency" \

        savefamilyplots=yes savedatainseparatedir=yes {

    tran tran stop=20n write="spectre.ic" writefinal="spectre.fc" \

        annotate=status maxiters=5 

    finalTimeOP info what=oppoint where=rawfile

    modelParameter info what=models where=rawfile

    element info what=inst where=rawfile

    outputParameter info what=output where=rawfile

    designParamVals info what=parameters where=rawfile

    primitives info what=primitives where=rawfile

    subckts info what=subckts  where=rawfile

    export saout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

    }

    mcOptions options genmcdep=yes

    saveOptions options save=allpub subcktprobelvl=2 

    -------------------------------------------------------------------

     I have the expected mc1_tran.tran waveforms :

    ...> ls input.raw/mc1_separate/

    mc1-001/ mc1-003/ mc1-005/ mc1-007/ ...

     

    ...> ls input.raw/mc1_separate/mc1-001/

    logFile                         mc1_element.info                mc1_modelParameter.info         mc1_primitives.info.primitives  mc1_tran.tran

    mc1_designParamVals.info        mc1_finalTimeOP.info            mc1_outputParameter.info        mc1_subckts.info.subckts

     

     

    However, I would like to get the mc simulation runs where the below export (writen in the input.scs) is greater than a value (1 for example):

    export aout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

     

    I would like to write in a result file this value. I think I should specify a result file in the spectre commandline (spectre input.scs +log mc_log_file.log) ?

    Then, I would like to remove the useless files to get some disk space. How can I specify that I want to keep only the transeint result files and the result file with the export value ? 

     

    Thanks.

     

    P. 

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • samung
    samung over 12 years ago

    OK, I have a kind of workaround. I am using straight spectre and not spectremdl, as follow :

    I execute : mc_script_spectremdl.sh and I get the waveform results of my montecarlo simulations :

    My current issue is to get the  mc simulation runs where the below export (written in the input.scs) is greater than a value (1 for example):

    export aout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

    Graphically, it's easy to put a "target" and then get the yield of the mc run, but I don't know how to do it in batch. 

     

    I have the following files : 

    mc_script_spectre.sh : 

    #! /bin/csh -f 

    spectre input.scs +log mc_log_file.log

     

    input.scs :

    // Generated for: spectre

     

    simulator lang=spectre

    global 0

    include "models.scs"

    parameters ...

     

    subckt ncx ncx

    ends ncx

    // End of subcircuit definition.

     

    subckt inv A1 YN vdd vnw vpw vss

    parameters wp=xxx lp=xxx pfolds=1 wn=xxx ln=xxx nfolds=1

    M5 (YN A1 vdd vnw) psvtlp w=wp*10e5 l=lp*10e5 nfing=pfolds mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    M2 (YN A1 vss vpw) nsvtlp w=wn*10e5 l=ln*10e5 nfing=nfolds mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    ends inv

     

    ...

    M0 (aout aout_b vss vpw) nsvtlp w=wndiff l=lndiff nfing=1 mult=1 \

            srcefirst=1 mismatch=1 lpe=0 numcos=1 numcod=1 ngcon=1

    ...

    include "./_graphical_stimuli.scs"

    ic aout=1 aout_b=0 

    simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=70.0 \

        tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \

        digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \

        checklimitdest=psf 

    mc1 montecarlo numruns=50 seed=12345 variations=mismatch sampling=standard \

        donominal=yes scalarfile="../monteCarlo/mcdata" \

        paramfile="../monteCarlo/mcparam" savemismatchparams=yes \

        mismatchparamfile="../monteCarlo/mismatchparam" \

        mismatchscalarfile="../monteCarlo/mismatchdata" \

        dumpdependency=mismatch \

        dependencymapfile="../monteCarlo/mismatchdependency" \

        savefamilyplots=yes savedatainseparatedir=yes {

    tran tran stop=20n write="spectre.ic" writefinal="spectre.fc" \

        annotate=status maxiters=5 

    finalTimeOP info what=oppoint where=rawfile

    modelParameter info what=models where=rawfile

    element info what=inst where=rawfile

    outputParameter info what=output where=rawfile

    designParamVals info what=parameters where=rawfile

    primitives info what=primitives where=rawfile

    subckts info what=subckts  where=rawfile

    export saout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

    }

    mcOptions options genmcdep=yes

    saveOptions options save=allpub subcktprobelvl=2 

    -------------------------------------------------------------------

     I have the expected mc1_tran.tran waveforms :

    ...> ls input.raw/mc1_separate/

    mc1-001/ mc1-003/ mc1-005/ mc1-007/ ...

     

    ...> ls input.raw/mc1_separate/mc1-001/

    logFile                         mc1_element.info                mc1_modelParameter.info         mc1_primitives.info.primitives  mc1_tran.tran

    mc1_designParamVals.info        mc1_finalTimeOP.info            mc1_outputParameter.info        mc1_subckts.info.subckts

     

     

    However, I would like to get the mc simulation runs where the below export (writen in the input.scs) is greater than a value (1 for example):

    export aout_b_max=oceanEval("ymax(v(\"/aout_b\" ?result \"tran\"))")

     

    I would like to write in a result file this value. I think I should specify a result file in the spectre commandline (spectre input.scs +log mc_log_file.log) ?

    Then, I would like to remove the useless files to get some disk space. How can I specify that I want to keep only the transeint result files and the result file with the export value ? 

     

    Thanks.

     

    P. 

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information