Home > Community > Forums > Custom IC Design > Ocean script confusion: illegal duplicate field symbol in list of fields

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: *

 Ocean script confusion: illegal duplicate field symbol in list of fields 

Last post Tue, Oct 6 2009 9:59 AM by lunren. 2 replies.
Started by lunren 05 Oct 2009 01:55 PM. Topic has 2 replies and 2204 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Oct 5 2009 1:55 PM

    • lunren
    • Top 500 Contributor
    • Joined on Thu, Oct 1 2009
    • Posts 21
    • Points 315
    Ocean script confusion: illegal duplicate field symbol in list of fields Reply

    Hi all,

     I run ocean script for Monte Carlo simulation. In our model file, we just have mismatch parameters (the foundry do not have process variation for Monte Carlo simulation), so in order to run Monte Carlo simulation, we use for loop structure to run Monte Carlo simulation for each corners (TT, SS, FF, FS, SF). Attached please find part of the ocean script. The simulation runs successfully, however, I was confused by the results. Here is the detail,

    When I open mcdata for the TT simulation, the results are fine, for the attached setting, the results are:

    82.5428 32.1798

    However, for the SS simulation, the results are duplicated:

    81.3214 30.8723 81.3214 30.8723

    If I added loop variable from 2 to 5 (cor_v=5), the duplication (duplicate the date in the same line) will be twice, three times, four times and five times corresponding to cor_v=2,3,4,5. I am wondering if any body can give me some hints about the problem?

    Thanks a lot 

     

           
    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design(  "/home/dexue/simulation/sim_ldo_C/spectre/schematic/netlist/netlist")

    for(cor_v 1 2

    analysis('ac ?start "1"  ?stop "10G"  )
    analysis('dc ?saveOppoint t  ?param "temp"  ?start "5" ?stop "60"  )
    analysis('stb ?start "1"  ?stop "10G"  ?probe "/I0/IPRB0"  )
    analysis('tran ?stop "55u"  ?errpreset "conservative"  )
    analysis('noise ?start "1"  ?stop "10G"  ?p "/v3p2" ?n ""  ?oprobe ""  ?iprobe ""  )

    option( 'scale  "1.0e-6")
    temp( temp_v )

      if( cor_v==1
           {       
             resultsDir( "/home/dexue/simulation/entheto/60mA_ldo_typeC/spectre/60mA_ldo_typeC_mc/schematicTT" )
             modelFile( '("/home/dexue/managed/pdk/tower18_2008_12/model/all_dh6k.scs" "tt_typ") )
            desVar( "power_in" 3.6 )
            desVar( "iload" 50m )
            desVar( "cload" 200p )
            desVar( "ilow" 30m )
            desVar( "ihigh" 60m )
            desVar( "ripple_amp" 0 )
            desVar( "ripple_freq" 0 )
     temp_v = 37
     
    monteCarlo( ?numIters "1" ?startIter "1"
        ?analysisVariation 'processAndMismatch ?sweptParam "Temperature"
        ?sweptParamVals "37" ?saveData t
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )
    monteExpr( "Phase_Margin" "getData(\"phaseMargin\" ?result \"stb_margin\")" )
    monteExpr( "Gain_Margin" "getData(\"gainMargin\" ?result \"stb_margin\")" )
    monteRun()
           }
         )

      if( cor_v==2
           {       
             resultsDir( "/home/dexue/simulation/entheto/60mA_ldo_typeC/spectre/60mA_ldo_typeC_mc/schematicSS" )
             modelFile(
                 '("/home/dexue/managed/pdk/tower18_2008_12/model/all_dh6k.scs" "ss_high")
             )
            desVar( "power_in" 3.42 )
            desVar( "iload" 50m )
            desVar( "cload" 1n )
            desVar( "ilow" 30m )
            desVar( "ihigh" 60m )
            desVar( "ripple_amp" 0 )
            desVar( "ripple_freq" 0 )
            temp_v = 5
     
    monteCarlo( ?numIters "1" ?startIter "1"
        ?analysisVariation 'processAndMismatch ?sweptParam "Temperature"
        ?sweptParamVals "37" ?saveData t
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )
    monteExpr( "Phase_Margin" "getData(\"phaseMargin\" ?result \"stb_margin\")" )
    monteExpr( "Gain_Margin" "getData(\"gainMargin\" ?result \"stb_margin\")" )
    monteRun()
           }
         )
    )

    • Post Points: 20
  • Mon, Oct 5 2009 9:57 PM

    Re: Ocean script confusion: illegal duplicate field symbol in list of fields Reply

    This is covered in my sourcelink solution 11487734.

    The fundamental problem is that you are defining duplicate monteExpr with the same name. In general, after you call monteRun() (or run() for that matter) it keeps all the previous analyses and outputs - it does not start from scratch again.

    So either move the monteExpr() outside of the loop, or use delete('monteExpr) prior to redefining them again.

    More details and other suggestions are in the solution.

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Oct 6 2009 9:59 AM

    • lunren
    • Top 500 Contributor
    • Joined on Thu, Oct 1 2009
    • Posts 21
    • Points 315
    Re: Ocean script confusion: illegal duplicate field symbol in list of fields Reply

    Hi Andrew,

     Very helpful.  Thanks a lot.

     Lunren

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by lunren at 05 Oct 2009 01:55 PM. Topic has 2 replies.