Home > Community > Forums > RF Design > Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform 

Last post Fri, Dec 21 2012 7:19 AM by RFQuery. 25 replies.
Started by RFQuery 18 Dec 2012 02:58 AM. Topic has 25 replies and 4333 views
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts:
  • Tue, Dec 18 2012 2:58 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

     Dear All,

    I want to do MONTE_CARLO simulation for my circuit for finding rise time and fall time.

    The output is settling after 800u s.

    I have to do some pre-processing before finding the last expression. The expressions I used as below.

    But it did NOT work.

    Can anybody tell how to find risetime and falltime of the waveform using MONTE-Carlo simulation if one needs some house-keeping processing of the waveform.

     .......

    analysis('dc ?saveOppoint t  )
    analysis('tran ?stop "1u"  ?errpreset "moderate"  ?maxstep "5p" 
            ?method "euler"  ?strobeperiod "5p"  )
    desVar(      "frf" 6G    )
    desVar(      "prf" -20    )
    desVar(      "frf2" 6.1G    )
    desVar(      "w" 20u    )
    desVar(   "sigma" 3)
    option(    'temp  "27.0"
        'iabstol  "1e-14"
        'vabstol  "1e-4"
    )
    saveOption( 'currents "selected" )
    saveOption( 'save "all" )
    temp( 27.0 )
    monteCarlo( ?numIters "1" ?startIter "1"
        ?analysisVariation 'processAndMismatch ?sweptParam "None"
        ?sweptParamVals "27" ?saveData nil
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )
    CLOCK_DUTY_PERIOD=2.5e-10
    CLIP_START=0.8u
    CLIP_END=0.9u

    clip_I_P=clip( v("/MIXER_I_P" ?result 'tran) CLIP_START CLIP_END)
    plot(clip_I_P)
    MIN_VALUE=ymin(clip_I_P) + 0.02
    MAX_VALUE=ymax(clip_I_P)- 0.03
    UPPER_THRESOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.9 )
    LOWER_THRESHOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.1 )
    RISE_UPPER= cross( clip_I_P UPPER_THRESOLD 2 'rising )
    RISE_LOWER= cross( clip_I_P LOWER_THRESHOLD 2 'rising )

    monteExpr("RISE_TIME" "abs(RISE_UPPER-RISE_LOWER)")

    monteRun()
    • Post Points: 20
  • Tue, Dec 18 2012 3:30 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

     The problem is that the expression is evaluated within the simulator (actually in a process called "artil") which will have no visibility of the calculations you are doing to preprocess the results. So, there are a couple of options:

    First, you might define a function (please check the code below properly, since I didn't test it) and put it in a file called ~/.artilinit :

    procedure(MyRiseTime(signal CLIP_START CLIP_END)
      let((clip_I_P MIN_VALUE MAX_VALUE UPPER_THRESHOLD LOWER_THRESHOLD RISE_UPPER RISE_LOWER)
        clip_I_P=clip( signal CLIP_START CLIP_END)
        MIN_VALUE=ymin(clip_I_P) + 0.02
        MAX_VALUE=ymax(clip_I_P)- 0.03
        UPPER_THRESOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.9 )
        LOWER_THRESHOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.1 )
        RISE_UPPER= cross( clip_I_P UPPER_THRESOLD 2 'rising )
        RISE_LOWER= cross( clip_I_P LOWER_THRESHOLD 2 'rising )
        abs(RISE_UPPER-RISE_LOWER)
      )
    )

    then in your OCEAN script, you'd just do:

    CLIP_START=0.8u
    CLIP_END=0.9u
    monteExpr("RISE_TIME" sprintf(nil "MyRiseTime(v(\"/MIXER_I_P\" ?result 'tran) %g %g)" CLIP_START CLIP_END))

    If you're using two old a version where the ~/.artilinit file is not supported, you can instead do:

    CLIP_START=0.8u
    CLIP_END=0.9u
    monteExpr("dummy" "{load(\"/path/to/file/containing/above/function.il\") 1.0})
    monteExpr("RISE_TIME" sprintf(nil "MyRiseTime(v(\"/MIXER_I_P\" ?result 'tran) %g %g)" CLIP_START CLIP_END))

    What that does is load your custom function, but make it look like an expression that returns a number - and then uses it in the second monteExpr.

    Hope that helps,

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Dec 20 2012 8:57 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Dear Andrew,

    I did use the first method.

    The montecarlo simulation did work but the expression was not evaluated.

    I have pasted the spectre output log file as below.

    If you could have a look at it and tell me the issue it will be greatly helpful.

    I created the .artilinit file in ~/ ( i.e my home folder) . I have kept mc_itr=1 ( MC iteration =1 only for quick check)

     
    Cadence (R) Virtuoso (R) Spectre (R) Circuit Simulator
    Version 10.1.1.200.isr13 32bit -- 15 Aug 2011
    Copyright (C) 1989-2010 Cadence Design Systems, Inc. All rights reserved worldwide. Cadence, Virtuoso and Spectre are registered trademarks of Cadence Design Systems, Inc. All others are the property of their respective holders.

    Protected by U.S. Patents:
            5,610,847; 5,790,436; 5,812,431; 5,859,785; 5,949,992; 5,987,238;
            6,088,523; 6,101,323; 6,151,698; 6,181,754; 6,260,176; 6,278,964;
            6,349,272; 6,374,390; 6,493,849; 6,504,885; 6,618,837; 6,636,839;
            6,778,025; 6,832,358; 6,851,097; 6,928,626; 7,024,652; 7,035,782;
            7,085,700; 7,143,021; 7,493,240; 7,571,401.

    Includes RSA BSAFE(R) Cryptographic or Security Protocol Software from RSA Security, Inc.

    User: manas   Host: localhost   HostID: 7F0100   PID: 10850
    Memory  available: 29.8343 GB  physical: 33.5990 GB
    CPU Type: Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
              Processor PhysicalID CoreID Frequency
                  0         0        0     2400.1
                  1         1        0     2400.1
                  2         0        1     2400.1
                  3         1        1     2400.1
                  4         0        9     2400.1
                  5         1        9     2400.1
                  6         0        10     2400.1
                  7         1        10     2400.1
                  8         0        0     2400.1
                  9         1        0     2400.1
                 10         0        1     2400.1
                 11         1        1     2400.1
                 12         0        9     2400.1
                 13         1        9     2400.1
                 14         0        10     2400.1
                 15         1        10     2400.1


    Simulating `input.scs' on localhost at 10:10:56 PM, Thur Dec 20, 2012 (process id: 10850).
    Command line:
        /srv/install//cadence/mmsim10/tools/spectre/bin/32bit/spectre -env  \
            artist5.1.0 +escchars +log ../psf/spectre.out -format psfbin  \
            -raw ../psf +lqtimeout 900 -maxw 5 -maxn 5 input.scs

    Loading /srv/install/cadence/mmsim10/tools.lnx86/cmi/lib/5.0/libinfineon_sh.so ...
    Loading /srv/install/cadence/mmsim10/tools.lnx86/cmi/lib/5.0/libphilips_sh.so ...
    Loading /srv/install/cadence/mmsim10/tools.lnx86/cmi/lib/5.0/libsparam_sh.so ...
    Loading /srv/install/cadence/mmsim10/tools.lnx86/cmi/lib/5.0/libstmodels_sh.so ...


        WARNING (SFE-30): "input.scs" 57: C12: `mis_flag' is not a valid parameter for an instance of `momcaps_asy_mm'.  Ignored.
        WARNING (SFE-30): "input.scs" 59: C11: `mis_flag' is not a valid parameter for an instance of `momcaps_asy_mm'.  Ignored.
        WARNING (SFE-30): "input.scs" 61: C10: `mis_flag' is not a valid parameter for an instance of `momcaps_asy_mm'.  Ignored.
        WARNING (SFE-30): "input.scs" 63: C13: `mis_flag' is not a valid parameter for an instance of `momcaps_asy_mm'.  Ignored.
        WARNING (SFE-30): "input.scs" 65: R19: `mis_flag' is not a valid parameter for an instance of `rnhr1000_mml130e'.  Ignored.
            Further occurrences of this warning will be suppressed.
                 ..................................................................................
                ......................................................................................
                    .................................................................................

    Time for Elaboration: CPU = 54.992 ms, elapsed = 54.9459 ms.
    Time accumulated: CPU = 183.971 ms, elapsed = 457.264 ms.
    Peak resident memory used = 41.5 Mbytes.


    Time for EDB Visiting: CPU = 1.999 ms, elapsed = 2.37298 ms.
    Time accumulated: CPU = 185.97 ms, elapsed = 459.799 ms.
    Peak resident memory used = 42 Mbytes.


    Warning from spectre during initial setup.
        WARNING (CMI-2424): NM3: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM4: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM2: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM0: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM5: `Acde' = 300e-03 is unusually small.
            Further occurrences of this warning will be suppressed.


    Circuit inventory:
                  nodes 22
                bsim3v3 8     
              capacitor 32    
                   port 4     
               quantity 9     
                 res_va 12    
               resistor 4     
                   vcvs 4     
                vsource 2     


    Notice from spectre.
        22 warnings suppressed.


    Time for parsing: CPU = 1.3478 s, elapsed = 1.41341 s.
    Time accumulated: CPU = 1.53377 s, elapsed = 1.87336 s.
    Peak resident memory used = 55 Mbytes.


    ************************************************
    Monte Carlo Analysis `mc1': iteration = (1 -> 1)
    ************************************************
    awaiting artil process initialization ....
    Important parameter values:
        seed = 1
        numbins = 1
        sampling = standard
        variations = all
        firstrun = 1
        numruns = 1
        donominal = yes

    Notice from spectre during Monte Carlo analysis `mc1'.
        Out of 4 defined mismatch parameters, 2 is not referenced. There are 16 mismatch instances.


    **** Performing nominal run for `mc1'

    ***********************************************
    Transient Analysis `tran': time = (0 s -> 1 us)
    ***********************************************
    Important parameter values:
        start = 0 s
        outputstart = 0 s
        stop = 1 us
        step = 1 ns
        maxstep = 5 ps
        ic = all
        useprevic = no
        skipdc = no
        reltol = 1e-03
        abstol(V) = 100 uV
        abstol(I) = 10 fA
        temp = 27 C
        tnom = 27 C
        tempeffects = all
        errpreset = moderate
        method = euler
        lteratio = 3.5
        relref = sigglobal
        cmin = 0 F
        gmin = 1 pS

        tran: time = 25 ns        (2.5 %), step = 684.6 fs    (68.5 u%)
        tran: time = 75 ns        (7.5 %), step = 2.319 ps     (232 u%)
        tran: time = 125 ns      (12.5 %), step = 2.342 ps     (234 u%)
        tran: time = 175 ns      (17.5 %), step = 973.7 fs    (97.4 u%)
        tran: time = 225 ns      (22.5 %), step = 1.496 ps     (150 u%)
        tran: time = 275 ns      (27.5 %), step = 1.442 ps     (144 u%)
        tran: time = 325 ns      (32.5 %), step = 549.8 fs      (55 u%)
        tran: time = 375 ns      (37.5 %), step = 549.2 fs    (54.9 u%)
        tran: time = 425 ns      (42.5 %), step = 548.8 fs    (54.9 u%)
        tran: time = 475 ns      (47.5 %), step = 548.4 fs    (54.8 u%)
        tran: time = 525 ns      (52.5 %), step = 548.2 fs    (54.8 u%)
        tran: time = 575 ns      (57.5 %), step = 548 fs      (54.8 u%)
        tran: time = 625 ns      (62.5 %), step = 625 fs      (62.5 u%)
        tran: time = 675 ns      (67.5 %), step = 625 fs      (62.5 u%)
        tran: time = 725 ns      (72.5 %), step = 625 fs      (62.5 u%)
        tran: time = 775 ns      (77.5 %), step = 625 fs      (62.5 u%)
        tran: time = 825 ns      (82.5 %), step = 625 fs      (62.5 u%)
        tran: time = 875 ns      (87.5 %), step = 625 fs      (62.5 u%)
        tran: time = 925 ns      (92.5 %), step = 625 fs      (62.5 u%)
        tran: time = 975 ns      (97.5 %), step = 625 fs      (62.5 u%)
    Number of accepted tran steps =             419032
    Initial condition solution time: CPU = 0 s, elapsed = 936.985 us.
    Intrinsic tran analysis time:    CPU = 63.3824 s, elapsed = 63.6358 s.
    Total time required for tran analysis `tran': CPU = 63.3854 s (1m  3.4s), elapsed = 63.6382 s (1m  3.6s).
    Time accumulated: CPU = 64.9211 s (1m  4.9s), elapsed = 66.522 s (1m  6.5s).
    Peak resident memory used = 56.1 Mbytes.

    finalTimeOP: writing operating point information to rawfile.

    ******************
    DC Analysis `dcOp'
    ******************
    Important parameter values:
        reltol = 1e-03
        abstol(V) = 100 uV
        abstol(I) = 10 fA
        temp = 27 C
        tnom = 27 C
        tempeffects = all
        gmindc = 1 pS
    Convergence achieved in 3 iterations.
    Total time required for dc analysis `dcOp': CPU = 3.998 ms, elapsed = 3.27301 ms.
    Time accumulated: CPU = 64.9321 s (1m  4.9s), elapsed = 66.714 s (1m  6.7s).
    Peak resident memory used = 56.4 Mbytes.

    dcOpInfo: writing operating point information to rawfile.
    modelParameter: writing model parameter values to rawfile.
    element: writing instance parameter values to rawfile.
    outputParameter: writing output parameter values to rawfile.
    designParamVals: writing netlist parameters to rawfile.
    primitives: writing primitives to rawfile.
    subckts: writing subcircuits to rawfile.
    Export:
        RISE_TIME = 4.65336e-10
    Successfully evaluated export statements (based on return code).

    **** Performing monte carlo loop for `mc1'


    Warning from spectre during Monte Carlo analysis `mc1'.
        WARNING (CMI-2424): NM3: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM4: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM2: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM0: `Acde' = 300e-03 is unusually small.
        WARNING (CMI-2424): NM5: `Acde' = 300e-03 is unusually small.
            Further occurrences of this warning will be suppressed.


    ***************************************************
    Transient Analysis `mc1_tran': time = (0 s -> 1 us)
    ***************************************************
    Important parameter values:
        start = 0 s
        outputstart = 0 s
        stop = 1 us
        step = 1 ns
        maxstep = 5 ps
        ic = all
        useprevic = no
        skipdc = no
        reltol = 1e-03
        abstol(V) = 100 uV
        abstol(I) = 10 fA
        temp = 27 C
        tnom = 27 C
        tempeffects = all
        errpreset = moderate
        method = euler
        lteratio = 3.5
        relref = sigglobal
        cmin = 0 F
        gmin = 1 pS

        mc1_tran: time = 25 ns        (2.5 %), step = 2.869 ps     (287 u%)
        mc1_tran: time = 75 ns        (7.5 %), step = 2.704 ps     (270 u%)
        mc1_tran: time = 125 ns      (12.5 %), step = 674 fs      (67.4 u%)
        mc1_tran: time = 175 ns      (17.5 %), step = 815.3 fs    (81.5 u%)
        mc1_tran: time = 225 ns      (22.5 %), step = 690.5 fs    (69.1 u%)
        mc1_tran: time = 275 ns      (27.5 %), step = 1.167 ps     (117 u%)
        mc1_tran: time = 325 ns      (32.5 %), step = 1.091 ps     (109 u%)
        mc1_tran: time = 375 ns      (37.5 %), step = 1.036 ps     (104 u%)
        mc1_tran: time = 425 ns      (42.5 %), step = 1.002 ps     (100 u%)
        mc1_tran: time = 475 ns      (47.5 %), step = 942.9 fs    (94.3 u%)
        mc1_tran: time = 525 ns      (52.5 %), step = 768.3 fs    (76.8 u%)
        mc1_tran: time = 575 ns      (57.5 %), step = 715.1 fs    (71.5 u%)
        mc1_tran: time = 625 ns      (62.5 %), step = 682.1 fs    (68.2 u%)
        mc1_tran: time = 675 ns      (67.5 %), step = 661.4 fs    (66.1 u%)
        mc1_tran: time = 725 ns      (72.5 %), step = 648 fs      (64.8 u%)
        mc1_tran: time = 775 ns      (77.5 %), step = 639.2 fs    (63.9 u%)
        mc1_tran: time = 825 ns      (82.5 %), step = 633.4 fs    (63.3 u%)
        mc1_tran: time = 875 ns      (87.5 %), step = 629.8 fs      (63 u%)
        mc1_tran: time = 925 ns      (92.5 %), step = 627.2 fs    (62.7 u%)
        mc1_tran: time = 975 ns      (97.5 %), step = 625.7 fs    (62.6 u%)
    Number of accepted tran steps =             336439
    Initial condition solution time: CPU = 0 s, elapsed = 602.007 us.
    Intrinsic tran analysis time:    CPU = 51.9141 s, elapsed = 52.0945 s.
    Total time required for tran analysis `mc1_tran': CPU = 51.9311 s, elapsed = 52.1128 s.
    Time accumulated: CPU = 116.953 s (1m  57.0s), elapsed = 122.503 s (2m  2.5s).
    Peak resident memory used = 56.6 Mbytes.


    Notice from spectre during transient analysis `mc1_tran', during Monte Carlo analysis `mc1'.
        3 warnings suppressed.

    mc1_finalTimeOP: writing operating point information to rawfile.

    **********************
    DC Analysis `mc1_dcOp'
    **********************
    Important parameter values:
        reltol = 1e-03
        abstol(V) = 100 uV
        abstol(I) = 10 fA
        temp = 27 C
        tnom = 27 C
        tempeffects = all
        gmindc = 1 pS
    Convergence achieved in 3 iterations.
    Total time required for dc analysis `mc1_dcOp': CPU = 3 ms, elapsed = 3.30591 ms.
    Time accumulated: CPU = 116.965 s (1m  57.0s), elapsed = 122.685 s (2m  2.7s).
    Peak resident memory used = 56.8 Mbytes.

    mc1_dcOpInfo: writing operating point information to rawfile.
    mc1_modelParameter: writing model parameter values to rawfile.
    mc1_element: writing instance parameter values to rawfile.
    mc1_outputParameter: writing output parameter values to rawfile.
    mc1_designParamVals: writing netlist parameters to rawfile.
    mc1_primitives: writing primitives to rawfile.
    mc1_subckts: writing subcircuits to rawfile.
    Total time required for montecarlo analysis `mc1': CPU = 115.494 s (1m  55.5s), elapsed = 123.646 s (2m  3.6s).
    Time accumulated: CPU = 117.029 s (1m  57.0s), elapsed = 125.52 s (2m  5.5s).
    Peak resident memory used = 56.8 Mbytes.


    Aggregate audit (10:13:01 PM, Thur Dec 20, 2012):
    Time used: CPU = 117 s (1m  57.0s), elapsed = 126 s (2m  5.6s), util. = 93.2%.
    Time spent in licensing: elapsed = 299 ms.
    Peak memory used = 56.8 Mbytes.
    Simulation started at: 10:10:56 PM, Thur Dec 20, 2012, ended at: 10:13:01 PM, Thur Dec 20, 2012, with elapsed time (wall clock): 126 s (2m  5.6s).
    spectre completes with 0 errors, 45 warnings, and 3 notices.

    • Post Points: 20
  • Thu, Dec 20 2012 9:02 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Two things (the log file doesn't tell me very much):

    1. Can you post the bottom part of your input.scs with the montecarlo analysis statements etc (and any export statements).
    2. In the psf directory for the simulation, is there a file called something like artil.log (something like that) - can you post the contents?
    Andrew
    • Post Points: 20
  • Thu, Dec 20 2012 9:27 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Sorry, the spectre.out doesn't show the error.

    Here I have pasted the CDS.log ( at the end) output.

    It says  "RISE_TIME" does not evaluate properly.

    Kind regards,

     

     

     

     

     

     Warning from spectre in `rnhr1000_mml130e', during circuit read-in.
    \o
    \o     WARNING (SFE-31):
    \o         "/home/manas/work_cad/UMC130FDKMFC_B08_PB/Models/Spectre/./MML130E_RES_V152.mdl.scs"
    \o
    \o         51: `rnhr1000_mml130e': Parameter `w' redefines parameter of same name
    \o         defined at higher level.
    \o
    \o Warning from spectre during hierarchy flattening.
    \o
    \o     WARNING (SFE-30): "input.scs" 57: C12: `mis_flag' is not a valid parameter
    \o         for an instance of `momcaps_asy_mm'.  Ignored.
    \o
    \o     WARNING (SFE-30): "input.scs" 59: C11: `mis_flag' is not a valid parameter
    \o         for an instance of `momcaps_asy_mm'.  Ignored.
    \o
    \o     WARNING (SFE-30): "input.scs" 61: C10: `mis_flag' is not a valid parameter
    \o         for an instance of `momcaps_asy_mm'.  Ignored.
    \o
    \o     WARNING (SFE-30): "input.scs" 63: C13: `mis_flag' is not a valid parameter
    \o         for an instance of `momcaps_asy_mm'.  Ignored.
    \o
    \o     WARNING (SFE-30): "input.scs" 65: R19: `mis_flag' is not a valid parameter
    \o         for an instance of `rnhr1000_mml130e'.  Ignored.
    \o
    \o         Further occurrences of this warning will be suppressed.
    \o
    \o
    \o
    \o
    \o Time for Elaboration: CPU = 52.992 ms, elapsed = 53.4849 ms.
    \o
    \o Time accumulated: CPU = 177.972 ms, elapsed = 396.798 ms.
    \o
    \o Peak resident memory used = 39.3 Mbytes.
    \o
    \o
    \o
    \o
    \o Time for EDB Visiting: CPU = 2.999 ms, elapsed = 2.42996 ms.
    \o
    \o Time accumulated: CPU = 180.971 ms, elapsed = 399.44 ms.
    \o
    \o Peak resident memory used = 39.7 Mbytes.
    \o
    \o
    \o
    \o
    \o
    \o Warning from spectre during initial setup.
    \o
    \o     WARNING (CMI-2424): NM3: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM4: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM2: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM0: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM5: `Acde' = 300e-03 is unusually small.
    \o
    \o         Further occurrences of this warning will be suppressed.
    \o
    \o
    \o
    \o
    \o Circuit inventory:
    \o               nodes 22
    \o
    \o             bsim3v3 8     
    \o
    \o           capacitor 32    
    \o
    \o                port 4     
    \o
    \o            quantity 9     
    \o
    \o              res_va 12    
    \o
    \o            resistor 4     
    \o
    \o                vcvs 4     
    \o
    \o             vsource 2     
    \o
    \o
    \o
    \o
    \o
    \o Notice from spectre.
    \o
    \o     22 warnings suppressed.
    \o
    \o
    \o
    \o
    \o
    \o Time for parsing: CPU = 1.35279 s, elapsed = 1.43158 s.
    \o
    \o Time accumulated: CPU = 1.53376 s, elapsed = 1.83122 s.
    \o
    \o Peak resident memory used = 52.8 Mbytes.
    \o
    \o
    \o
    \o
    \o ************************************************
    \o
    \o Monte Carlo Analysis `mc1': iteration = (1 -> 1)
    \o ************************************************
    \o
    \o awaiting artil process initialization ....
    \o
    \o Important parameter values:
    \o
    \o     seed = 1
    \o
    \o     numbins = 1
    \o
    \o     sampling = standard
    \o
    \o     variations = all
    \o
    \o     firstrun = 1
    \o     numruns = 1
    \o
    \o     donominal = yes
    \o
    \o
    \o
    \o Notice from spectre during Monte Carlo analysis `mc1'.
    \o
    \o     Out of 4 defined mismatch parameters, 2 is not referenced. There are 16
    \o         mismatch instances.
    \o
    \o
    \o
    \o
    \o **** Performing nominal run for `mc1'
    \o
    \o
    \o ***********************************************
    \o
    \o Transient Analysis `tran': time = (0 s -> 1 us)
    \o ***********************************************
    \o
    \o Important parameter values:
    \o
    \o     start = 0 s
    \o
    \o     outputstart = 0 s
    \o
    \o     stop = 1 us
    \o
    \o     step = 1 ns
    \o
    \o     maxstep = 5 ps
    \o
    \o     ic = all
    \o
    \o     useprevic = no
    \o
    \o     skipdc = no
    \o
    \o     reltol = 1e-03
    \o
    \o     abstol(V) = 100 uV
    \o
    \o     abstol(I) = 10 fA
    \o
    \o     temp = 27 C
    \o
    \o     tnom = 27 C
    \o
    \o     tempeffects = all
    \o
    \o     errpreset = moderate
    \o
    \o     method = euler
    \o
    \o     lteratio = 3.5
    \o
    \o     relref = sigglobal
    \o
    \o     cmin = 0 F
    \o
    \o     gmin = 1 pS
    \o
    \o
    \o
    \o     tran: time = 25 ns        (2.5 %), step = 684.6 fs    (68.5 u%)
    \o
    \o     tran: time = 75 ns        (7.5 %), step = 2.319 ps     (232 u%)
    \o
    \o     tran: time = 125 ns      (12.5 %), step = 2.342 ps     (234 u%)
    \o
    \o     tran: time = 175 ns      (17.5 %), step = 973.7 fs    (97.4 u%)
    \o
    \o     tran: time = 225 ns      (22.5 %), step = 1.496 ps     (150 u%)
    \o
    \o     tran: time = 275 ns      (27.5 %), step = 1.442 ps     (144 u%)
    \o
    \o     tran: time = 325 ns      (32.5 %), step = 549.8 fs      (55 u%)
    \o
    \o     tran: time = 375 ns      (37.5 %), step = 549.2 fs    (54.9 u%)
    \o
    \o     tran: time = 425 ns      (42.5 %), step = 548.8 fs    (54.9 u%)
    \o
    \o     tran: time = 475 ns      (47.5 %), step = 548.4 fs    (54.8 u%)
    \o
    \o     tran: time = 525 ns      (52.5 %), step = 548.2 fs    (54.8 u%)
    \o
    \o     tran: time = 575 ns      (57.5 %), step = 548 fs      (54.8 u%)
    \o
    \o     tran: time = 625 ns      (62.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 675 ns      (67.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 725 ns      (72.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 775 ns      (77.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 825 ns      (82.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 875 ns      (87.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 925 ns      (92.5 %), step = 625 fs      (62.5 u%)
    \o
    \o     tran: time = 975 ns      (97.5 %), step = 625 fs      (62.5 u%)
    \o
    \o Number of accepted tran steps =             419032
    \o
    \o Initial condition solution time: CPU = 0 s, elapsed = 846.148 us.
    \o
    \o Intrinsic tran analysis time:    CPU = 63.4044 s, elapsed = 63.5877 s.
    \o
    \o Total time required for tran analysis `tran': CPU = 63.4074 s (1m  3.4s),
    \o         elapsed = 63.59 s (1m  3.6s).
    \o
    \o Time accumulated: CPU = 64.9421 s (1m  4.9s), elapsed = 66.4327 s (1m  6.4s).
    \o
    \o Peak resident memory used = 53.9 Mbytes.
    \o
    \o
    \o
    \o finalTimeOP: writing operating point information to rawfile.
    \o
    \o
    \o ******************
    \o DC Analysis `dcOp'
    \o ******************
    \o
    \o Important parameter values:
    \o
    \o     reltol = 1e-03
    \o
    \o     abstol(V) = 100 uV
    \o
    \o     abstol(I) = 10 fA
    \o
    \o     temp = 27 C
    \o
    \o     tnom = 27 C
    \o
    \o     tempeffects = all
    \o
    \o     gmindc = 1 pS
    \o
    \o Convergence achieved in 3 iterations.
    \o
    \o Total time required for dc analysis `dcOp': CPU = 2.999 ms, elapsed = 3.30305
    \o         ms.
    \o
    \o Time accumulated: CPU = 64.9541 s (1m  5.0s), elapsed = 66.7037 s (1m  6.7s).
    \o
    \o Peak resident memory used = 54.1 Mbytes.
    \o
    \o
    \o
    \o dcOpInfo: writing operating point information to rawfile.
    \o
    \o modelParameter: writing model parameter values to rawfile.
    \o
    \o element: writing instance parameter values to rawfile.
    \o
    \o outputParameter: writing output parameter values to rawfile.
    \o
    \o designParamVals: writing netlist parameters to rawfile.
    \o
    \o primitives: writing primitives to rawfile.
    \o
    \o subckts: writing subcircuits to rawfile.
    \o
    \o Export:
    \o
    \o     RISE_TIME = 4.65336e-10
    \o Successfully evaluated export statements (based on return code).
    \o
    \o
    \o **** Performing monte carlo loop for `mc1'
    \o
    \o
    \o
    \o
    \o Warning from spectre during Monte Carlo analysis `mc1'.
    \o
    \o     WARNING (CMI-2424): NM3: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM4: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM2: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM0: `Acde' = 300e-03 is unusually small.
    \o
    \o     WARNING (CMI-2424): NM5: `Acde' = 300e-03 is unusually small.
    \o
    \o         Further occurrences of this warning will be suppressed.
    \o
    \o
    \o
    \o
    \o ***************************************************
    \o Transient Analysis `mc1_tran': time = (0 s -> 1 us)
    \o ***************************************************
    \o
    \o Important parameter values:
    \o
    \o     start = 0 s
    \o
    \o     outputstart = 0 s
    \o
    \o     stop = 1 us
    \o
    \o     step = 1 ns
    \o
    \o     maxstep = 5 ps
    \o
    \o     ic = all
    \o
    \o     useprevic = no
    \o
    \o     skipdc = no
    \o
    \o     reltol = 1e-03
    \o
    \o     abstol(V) = 100 uV
    \o
    \o     abstol(I) = 10 fA
    \o
    \o     temp = 27 C
    \o
    \o     tnom = 27 C
    \o
    \o     tempeffects = all
    \o
    \o     errpreset = moderate
    \o
    \o     method = euler
    \o
    \o     lteratio = 3.5
    \o     relref = sigglobal
    \o
    \o     cmin = 0 F
    \o
    \o     gmin = 1 pS
    \o
    \o
    \o
    \o     mc1_tran: time = 25 ns        (2.5 %), step = 2.869 ps     (287 u%)
    \o
    \o     mc1_tran: time = 75 ns        (7.5 %), step = 2.704 ps     (270 u%)
    \o
    \o     mc1_tran: time = 125 ns      (12.5 %), step = 674 fs      (67.4 u%)
    \o
    \o     mc1_tran: time = 175 ns      (17.5 %), step = 815.3 fs    (81.5 u%)
    \o
    \o     mc1_tran: time = 225 ns      (22.5 %), step = 690.5 fs    (69.1 u%)
    \o
    \o     mc1_tran: time = 275 ns      (27.5 %), step = 1.167 ps     (117 u%)
    \o
    \o     mc1_tran: time = 325 ns      (32.5 %), step = 1.091 ps     (109 u%)
    \o
    \o     mc1_tran: time = 375 ns      (37.5 %), step = 1.036 ps     (104 u%)
    \o
    \o     mc1_tran: time = 425 ns      (42.5 %), step = 1.002 ps     (100 u%)
    \o
    \o     mc1_tran: time = 475 ns      (47.5 %), step = 942.9 fs    (94.3 u%)
    \o
    \o     mc1_tran: time = 525 ns      (52.5 %), step = 768.3 fs    (76.8 u%)
    \o
    \o     mc1_tran: time = 575 ns      (57.5 %), step = 715.1 fs    (71.5 u%)
    \o
    \o     mc1_tran: time = 625 ns      (62.5 %), step = 682.1 fs    (68.2 u%)
    \o
    \o     mc1_tran: time = 675 ns      (67.5 %), step = 661.4 fs    (66.1 u%)
    \o
    \o     mc1_tran: time = 725 ns      (72.5 %), step = 648 fs      (64.8 u%)
    \o
    \o     mc1_tran: time = 775 ns      (77.5 %), step = 639.2 fs    (63.9 u%)
    \o
    \o     mc1_tran: time = 825 ns      (82.5 %), step = 633.4 fs    (63.3 u%)
    \o
    \o     mc1_tran: time = 875 ns      (87.5 %), step = 629.8 fs      (63 u%)
    \o
    \o     mc1_tran: time = 925 ns      (92.5 %), step = 627.2 fs    (62.7 u%)
    \o
    \o     mc1_tran: time = 975 ns      (97.5 %), step = 625.7 fs    (62.6 u%)
    \o
    \o Number of accepted tran steps =             336439
    \o
    \o Initial condition solution time: CPU = 999 us, elapsed = 572.92 us.
    \o
    \o Intrinsic tran analysis time:    CPU = 51.3702 s, elapsed = 51.5583 s.
    \o
    \o Total time required for tran analysis `mc1_tran': CPU = 51.3862 s, elapsed =
    \o         51.5766 s.
    \o
    \o Time accumulated: CPU = 116.427 s (1m  56.4s), elapsed = 121.49 s (2m  1.5s).
    \o
    \o Peak resident memory used = 54.4 Mbytes.
    \o
    \o
    \o
    \o
    \o
    \o Notice from spectre during transient analysis `mc1_tran', during Monte Carlo
    \o
    \o         analysis `mc1'.
    \o
    \o     3 warnings suppressed.
    \o
    \o
    \o
    \o mc1_finalTimeOP: writing operating point information to rawfile.
    \o
    \o
    \o
    \o **********************
    \o DC Analysis `mc1_dcOp'
    \o **********************
    \o
    \o Important parameter values:
    \o
    \o     reltol = 1e-03
    \o
    \o     abstol(V) = 100 uV
    \o
    \o     abstol(I) = 10 fA
    \o
    \o     temp = 27 C
    \o
    \o     tnom = 27 C
    \o
    \o     tempeffects = all
    \o
    \o     gmindc = 1 pS
    \o
    \o Convergence achieved in 3 iterations.
    \o
    \o Total time required for dc analysis `mc1_dcOp': CPU = 3 ms, elapsed = 3.24082
    \o         ms.
    \o
    \o Time accumulated: CPU = 116.439 s (1m  56.4s), elapsed = 121.674 s (2m  1.7s).
    \o
    \o Peak resident memory used = 54.6 Mbytes.
    \o
    \o
    \o
    \o mc1_dcOpInfo: writing operating point information to rawfile.
    \o
    \o mc1_modelParameter: writing model parameter values to rawfile.
    \o
    \o mc1_element: writing instance parameter values to rawfile.
    \o
    \o mc1_outputParameter: writing output parameter values to rawfile.
    \o
    \o mc1_designParamVals: writing netlist parameters to rawfile.
    \o
    \o mc1_primitives: writing primitives to rawfile.
    \o
    \o mc1_subckts: writing subcircuits to rawfile.
    \o
    \o Total time required for montecarlo analysis `mc1': CPU = 114.97 s (1m  55.0s),
    \o         elapsed = 122.529 s (2m  2.5s).
    \o
    \o Time accumulated: CPU = 116.503 s (1m  56.5s), elapsed = 124.361 s (2m  4.4s).
    \o
    \o Peak resident memory used = 54.6 Mbytes.
    \o
    \o
    \o
    \o
    \o
    \o Aggregate audit (10:55:06 PM, Thur Dec 20, 2012):
    \o
    \o Time used: CPU = 117 s (1m  56.5s), elapsed = 124 s (2m  4.4s), util. = 93.6%.
    \o
    \o Time spent in licensing: elapsed = 243 ms.
    \o
    \o Peak memory used = 54.6 Mbytes.
    \o
    \o Simulation started at: 10:53:01 PM, Thur Dec 20, 2012, ended at: 10:55:06 PM,
    \o         Thur Dec 20, 2012, with elapsed time (wall clock): 124 s (2m  4.4s).
    \o
    \o spectre completes with 0 errors, 45 warnings, and 3 notices.
    \o
    \o simulation completed successfully.
    \o reading simulation data...
    \o       ...successful.
    \o Monte Carlo Simulation completed successfully...
    \o Errors with output expressions found:
    \o
    \o   "RISE_TIME" does not evaluate properly.

    • Post Points: 5
  • Thu, Dec 20 2012 9:32 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Dear Andrew,

    the input.scs file contents towards the end:-

     simulatorOptions options reltol=1e-3 vabstol=1e-4 iabstol=1e-14 temp=27.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=1 seed=1 variations=all donominal=yes \
        scalarfile="../monteCarlo/mcdata" paramfile="../monteCarlo/mcparam" \
        saveprocessparams=yes processparamfile="../monteCarlo/processParam" \
        processscalarfile="../monteCarlo/processData" {
    tran tran stop=1u errpreset=moderate maxstep=5p write="spectre.ic" \
        writefinal="spectre.fc" method=euler annotate=status strobeperiod=5p \
        maxiters=5
    finalTimeOP info what=oppoint where=rawfile
    dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
    dcOpInfo 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 RISE_TIME=oceanEval("MyRiseTime(v(\"/MIXER_I_P\" ?result 'tran) \
        8e-07 9e-07)")
    }
    save MIXER_Q_M MIXER_Q_P MIXER_I_M MIXER_I_P
    saveOptions options save=selected pwr=none currents=selected

     

     

     

    The  artil.log file conetnts:-

     

     

     

    Loading auCore.cxt
    Loading awv.cxt
    "mps11412"
    > Loading oasis.cxt
              Could not find psf/runObjFile under
              /home/manas/simulation/DIV_BY_4_PWL_TEST/spectre/schematic/psf/logFile. Calculator data access functions will not
               work
              Results "subckts-info" are not available for
              "../psf/logFile". Use results() for a list of available
              results.
    Loading analog.cxt
    Loading asimenv.cxt
    Loading spectrei.cxt
              Could not find psf/runObjFile under
              /home/.../simulation/DIV_BY_4_PWL_TEST/spectre/schematic/psf/logFile.tmp. Calculator data access functions will not
               work
              Results "mc1_subckts-info" are not available for
              "../psf/logFile.tmp". Use results() for a list of available
              results.

    • Post Points: 20
  • Thu, Dec 20 2012 9:37 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Nothing leaps out. First of all, I assume it's ~/.artilinit you've created the function in? Secondly, what happens if you run a single (non-monte carlo simulation) and then in the CIW do:

    load("~/.artilinit")
    MyRiseTime(v("/MIXER_I_P" ?result 'tran) 8e-07 9e-07)

    Does that work and give a number?

    You might be best logging a service request - it's really hard to debug this kind of thing via a web forum.

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Dec 20 2012 9:52 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Dear Andrew,

    I ran a non-MC simulation

    I did 

    load("~/.artilinit")

    It gives:-

    function MyRiseTime redefined

    Then I typed 

    MyRiseTime(v("/MIXER_I_P" ?result 'tran) 8e-07 9e-07)

    it gives

     4.653357e-10

     

    • Post Points: 20
  • Thu, Dec 20 2012 10:16 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    OK, I just tried it myself with a made up example. I put this in my ~/.artilinit file:

    procedure(MyRiseTime(signal CLIP_START CLIP_END)
      let((clip_I_P MIN_VALUE MAX_VALUE UPPER_THRESHOLD LOWER_THRESHOLD RISE_UPPER RISE_LOWER)
        clip_I_P=clip( signal CLIP_START CLIP_END)
        MIN_VALUE=ymin(clip_I_P) + 0.02
        MAX_VALUE=ymax(clip_I_P)- 0.03
        UPPER_THRESOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.9 )
        LOWER_THRESHOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.1 )
        RISE_UPPER= cross( clip_I_P UPPER_THRESOLD 2 'rising )
        RISE_LOWER= cross( clip_I_P LOWER_THRESHOLD 2 'rising )
        abs(RISE_UPPER-RISE_LOWER)
      )
    )

    I then used this as "testmonte.scs" :

    //

    parameters peak=1
    statistics {
        process {
        vary peak dist=gauss std=0.1
        }
    }

    v1 (MIXER_I_P 0) vsource type=sine freq=20M ampl=peak
    r1 (MIXER_I_P 0) resistor r=1k

    simulatorOptions options reltol=1e-3 vabstol=1e-4 iabstol=1e-14 temp=27.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=1 seed=1 variations=all donominal=yes \
        scalarfile="../monteCarlo/mcdata" paramfile="../monteCarlo/mcparam" \
        saveprocessparams=yes processparamfile="../monteCarlo/processParam" \
        processscalarfile="../monteCarlo/processData" {
    tran tran stop=1u errpreset=moderate maxstep=5p write="spectre.ic" \
        writefinal="spectre.fc" method=euler annotate=status strobeperiod=5p \
        maxiters=5
    finalTimeOP info what=oppoint where=rawfile
    dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
    dcOpInfo 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 RISE_TIME=oceanEval("MyRiseTime(v(\"MIXER_I_P\" ?result 'tran) \
        8e-07 9e-07)")
    }
    save MIXER_Q_M MIXER_Q_P MIXER_I_M MIXER_I_P
    saveOptions options save=selected pwr=none currents=selected

    Essentially it's the same as yours except I removed the leading / from MIXER_I_P because I did not create a schematic for mine, and was running from the UNIX command line.

    The spectre output log I've attached. And the monteCarlo/mcdata file that was produced contained:

     3.59212e-08     0.758089621

    If I ran with numruns=5 I get this:

    3.59212e-08     0.758089621
    3.57765e-08     0.969091674
    3.57113e-08     1.10677017
    3.56817e-08     1.182617678
    3.57873e-08     0.9494422794

    (the second column of numbers is the value of peak in my netlist).

    So it all appears to work.

    Maybe there was a specific issue with your version of spectre? Or maybe something is just wrong with the calculation function. Perhaps you can try my example (just run "spectre testmonte.scs" and see what happens; you should get a result file called monteCarlo/mcdata in the directory you're running spectre).

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Dec 20 2012 10:31 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

     Dear Andrew,

    I got error 

     Error found by spectre during Monte Carlo analysis `mc1'.
        ERROR (SPECTRE-8003): subckts: Error evaluating ocean expression
            `RISE_TIME=MyRiseTime(v("MIXER_I_P" ?result 'tran)
                8e-07 9e-07)'

     

    • Post Points: 5
  • Thu, Dec 20 2012 11:56 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    Dear Andrew,

    Your code worked perfectly in my system.

    However, with the same .artilinit file and with my ocean script it shows that the RISE TIME is not calculated properly.

     I went and check the "mcdata file".

    It actually writes the correct rise time value ( i.e. it writes the value what I get by running the standalone  .artilinit function).

    But along with that it writes few more data value for each iteration.

    I have attched my ocean code and the mcdata file.

     

    Please have a look at it.

    If I see  4.64848e-10 & 4.6483e-10 are two correct values ( for two iteration). I don't where the other data values come from.

    Kind Regards,

     

     

    OCEAN SCRIPT:-

    ocnWaveformTool( 'awd )
    simulator( 'spectre )
    design(     "/home/../simulation/DIV_BY_4_PWL_TEST/spectre/schematic/netlist/netlist")
    resultsDir( "/home/../simulation/DIV_BY_4_PWL_TEST/spectre/schematic" )
    modelFile(
       ...............
    ............................
    ............................
    )
    analysis('dc ?saveOppoint t  )
    analysis('tran ?stop "1u"  ?errpreset "moderate"  ?maxstep "10p"  
            ?method "euler"  ?strobeperiod "10p"  )
    ;;analysis('pss ?fund "0.5G"  ?harms "20"  ?errpreset "liberal"  
    ;;        ?tstab "900n"  ?saveinit "yes"  ?method "gear2only"  ?tstabmethod "gear2only"  )
    desVar(      "frf" 6G    )
    desVar(      "prf" -20    )
    desVar(      "frf2" 6.1G    )
    desVar(      "w" 20u    )
    desVar(      "sigma" 3    )
    option(    'temp  "27.0"
        'iabstol  "1e-14"
        'vabstol  "1e-4"
    )
    saveOption( 'currents "selected" )
    saveOption( 'pwr "none" )
    saveOption( 'save "selected" )
    save( 'v "/MIXER_I_P" "/MIXER_I_M" "/MIXER_Q_P" "/MIXER_Q_M" )
    temp( 27.0 )

    monteCarlo( ?numIters "2" ?startIter "1"
        ?analysisVariation 'processAndMismatch ?sweptParam "None"
        ?sweptParamVals "27" ?saveData nil
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )
    CLIP_START=0.8u
    CLIP_END=0.9u

    monteExpr("RISE_TIME" sprintf(nil "MyRiseTime(v(\"/MIXER_I_P\" ?result 'tran) %g %g)" CLIP_START CLIP_END))

    monteRun()

     

    MCDATA:-

     4.64848e-10     -2.41910379    -0.3090832601    1.067701704    1.826176777    -0.5055772056    -1.295718611    1.849168611    0.1808153746    0.2159157092    0.4165311881    0.2370237454    -2.839598571    -0.2007187769    -0.3991082723    1.102419851    0.1143423708    0.2758419454    1.565051527    0.01201399207    -0.9419891843    -1.305316724    -1.402470986    -0.2677821435    0.2765404275    1.500674765    0.5122200426    -0.1689231741    -1.281845534    -0.1718602428    -0.02013107568    -0.6647959427    -1.058757485    1.515606054    -0.447840747    -0.3544401223    
    4.6483e-10     0.3808284977    1.047869068    -0.2492064504    0.8040526482    -1.425541876    0.6157064707    0.4764049259    -1.724914284    -0.5452789111    -0.1081290005    1.083145328    -0.1691159082    -0.3681618759    -2.74542057    -0.8271715448    1.420924367    -2.42737257    0.5184565791    -0.08374273452    -0.05099922819    0.8325142518    0.1125381946    0.3111071055    0.4594010622    1.145016188    -0.484320997    -0.716948261    0.7295353391    -1.004756207    -0.6757049676    -1.268946448    0.4208736887    1.036133588    -0.4272050621    -0.6285677867   

     

    • Post Points: 20
  • Fri, Dec 21 2012 12:55 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    It looks as if it is probably working OK. Look in the file mcparam in the monteCarlo directory - this should list (on each row) the name of the parameter (and some additional information) corresponding to each column in the mcdata file. You will be seeing the statistical parameters in this file too - so that's why you're getting additional values. There's a surprisingly large number of statistcal parameters, but maybe that's just what there really are in  the statistics block in the model files.

    The mcdata file should have one row per monte carlo iteration.

    The message about subckts is just one of those odd things that happens sometimes - I think that's been cured in a later version of spectre (I'm not 100% sure, but I didn't see it).

    Regards,

    Andrew.

    • Post Points: 20
  • Fri, Dec 21 2012 3:07 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

     Dear Andrew,

    Thanks a lot for your help.

     

    I just want to run my input.scs file using spectre command like you did. Can you please tell me how I can do that.

    In my case after montecarlo run by the ocean, I am not seeing any histogram plot being plotted automatically Can you please tell why it is so and how it can be fixed.

    Kind Regards

    • Post Points: 20
  • Fri, Dec 21 2012 3:23 AM

    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

    I just ran spectre input.scs (you might need to give the -I argument to provide any include paths). The only reason I did it this way was because it was quicker for me to put together a simple testcase that I could share without needing any schematics.

    The histograms don't get plotted automatically in OCEAN - you'd need to do (after the monteRun()):

    monteResults()
    histogram("RISE_TIME_27")

    You can see the available names from the monteResults() output.

    ocnHelp('histogram)

    will tell you the other optional arguments for the histogram() function.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Fri, Dec 21 2012 5:30 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Using Montecarlo simulation for finding Rise and fall tile of a SETTLING waveform Reply

     Dear Andrew,

    I did some modification to the code in .artilinit file.

    It is NOT working at all.

    Can you please have a look at it and tell whether it should work or not.

     procedure(MyRiseTime(signal CLOCK_DUTY_PERIOD CLIP_START CLIP_END)
      let((clip_I_P MIN_VALUE MAX_VALUE UPPER_THRESHOLD LOWER_THRESHOLD RISE_UPPER RISE_LOWER)
        clip_I_P=clip( signal CLIP_START CLIP_END)
        MIN_VALUE=ymin(clip_I_P) + 0.02
        MAX_VALUE=ymax(clip_I_P)- 0.03
        UPPER_THRESOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.9 )
        LOWER_THRESHOLD=MIN_VALUE + ( (MAX_VALUE-MIN_VALUE)*0.1 )
        RISE_UPPER= cross( clip_I_P UPPER_THRESOLD 2 'rising )
        RISE_LOWER= cross( clip_I_P LOWER_THRESHOLD 2 'rising )
        RISE_TIME=abs(RISE_UPPER-RISE_LOWER)
        ;;abs(RISE_UPPER-RISE_LOWER)
        if( (RISE_TIME >= CLOCK_DUTY_PERIOD)   then
            CLIP_START = CLIP_START + (CLOCK_DUTY_PERIOD*1.5)
            clip_I_P=clip( v("/MIXER_I_P" ?result 'tran) CLIP_START CLIP_END)
            w = newWindow()
            plot(clip_I_P)
            RISE_UPPER= cross( clip_I_P UPPER_THRESOLD 2 'rising )
            printf("%e \n", RISE_UPPER)
            RISE_LOWER= cross( clip_I_P LOWER_THRESHOLD 2 'rising )
            printf("%e \n", RISE_LOWER)
            abs(RISE_UPPER-RISE_LOWER)
        else
                abs(RISE_UPPER-RISE_LOWER)     
         )
      )
    )

    • Post Points: 20
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts:
Started by RFQuery at 18 Dec 2012 02:58 AM. Topic has 25 replies.