• 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 SKILL
  3. How could i get a Plot with a Xaxis in volt by the ocean...

Stats

  • Locked Locked
  • Replies 21
  • Subscribers 143
  • Views 21175
  • 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

How could i get a Plot with a Xaxis in volt by the ocean script?

OLyonnais
OLyonnais over 15 years ago

Hello

I'm trying to get a plot by the ocean script but when i observe my 3 outputs signals i have 3 lines (constant) whereas when i lauch that by a classical simulation (interface analog environment) i obtain the correct waveform with the Vn in horizontal scale

Indeed, i think i have a trouble on my Xaxis because in one case (by the analog environment) "Vn" (my sweep variable from 0 to 1.1) is on the X axis and on the other case, i have nothing, the time i think...

 

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

ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design(     "/../spectre/schematic/netlist/netlist")
resultsDir( "/../spectre/schematic" )
definitionFile(
    "models.scs"
)
analysis('dc ?saveOppoint t  ?param "Vn"  ?start "1.1"
        ?stop "0"  ?lin "1000"  )

desVar(      "Vn" 1    )
temp( 27 )
run()
selectResult( 'dcOp )
plot(getData("/S") getData("/SB") getData("/BL") )

 

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

thank you for your answer and sorry for my "basic" english

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    That's because you have selectResult('dcOp) and it should be selectResult('dc). What you're accessing is the dc operating point, which doesn't change throughout the sweep - that's the initial operating point at the beginning of the sweep, and what you actually want is the result of the dc analysis itself.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • OLyonnais
    OLyonnais over 15 years ago

     

    Great, thank you Andrew.

    By the way, i have a other question about variable in an expression of monteCarlo analyse.

     

     Vdd_half=0.5 for example

     "Normal" simulation:

      analysis('tran ?stop TempoSimu  )

      temp( myTemp )
      run()
      selectResult( 'tran )

      Delay_WL_S_rise = delay(clip(v("/WL" ?result "tran-tran") 2.8e-08 3.6e-08) Vdd_half 1 "either" clip(v("/S" ?result "tran-tran")     2.81e-08 3.21e-08) Vdd_half 1 "either" 0 0 nil nil)

    i obtain the result, it's work ...

     

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

     in the "monteExpr" when i do the same thing, its impossible, i need to put the right value directly. Have you got an idea (syntax) to allow me to put the variable instead of the value?

     

     MonteCarlo simulation:

    monteExpr( "Delay_WL_S_rise" "Delay_WL_S_rise=delay(clip(v(\"/WL\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) 0.50 1 \"either\" clip(v(\"/S\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) 0.50 1 \"either\" 0 0 nil nil)" )

     

    Thank you for your answer...

    Axel
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Axel,

    I think (I've not tested this), you should be able to do:

    desVar("Vdd_half" 0.5)

    and then in the monteExpr call VAR(\"Vdd_half\") wherever you have the 0.5 right now.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    You may have to use the pv() syntax instead of VAR() for output expressions. We've experienced nothing but grief trying to use VAR() directly (in an ADE XL and OCEAN XL context). Andrew (P).
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Andrew,

    There certainly was an issue with using VAR() in Monte Carlo simulations which was fixed in IC614 ISR1. So maybe your grief will be resolved by that?

    Andrew (B)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    I'll have to give it a try.

    Different griefs exist in IC6.1.4.501; waiting on ISR2 before considering a move for the next project. You know the drill. ;-)

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • OLyonnais
    OLyonnais over 15 years ago

     Well, so i declare Vdd_half as "desvar" and after, for using it in the monteExpr, i need to use VAR() or pv() ?

    but after i'm lost for that... sorry :)  i have unbound variable \"Vdd_half\" with VAR(), pv() or without nothing.

    on ocean ref or skill guide they don't speak about these function... how can i use them?

     

    thank you both of you

     

    Axel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Axel,

    Here's a very simple OCEAN script I have using VAR and pv() approaches:

    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design( "/export/home/users/andrewb/simulation/rcac/spectre/schematic/netlist/netlist")
    resultsDir( "/export/home/users/andrewb/simulation/rcac/spectre/schematic" )
    path( "./models" )
    modelFile(
    '("res.scs" "")
    )
    analysis('tran ?stop "100n" )
    desVar( "sup" 3 )
    desVar( "rval" 1k )
    desVar( "cval" 1p )
    temp( 27 )
    monteCarlo( ?numIters "100" ?startIter "1"
    ?analysisVariation 'process ?sweptParam "None"
    ?sweptParamVals "27" ?saveData nil
    ?nomRun "yes" ?append nil
    ?saveProcessParams t
    ?samplingMethod 'LHS)
    monteExpr( "RT" "riseTime(clip(VT(\"/net5\") 8e-09 1e-07) 0 nil VAR(\"sup\") nil 10 90 nil \"time\" nil nil)" )
    monteExpr( "RVAL" "VAR(\"rval\")" )
    monteExpr( "RVAL2" "pv(\"top-level\" \"rval\" ?result 'designParamVals)" )
    monteRun()

    Both work. In this case I have the variable "sup" (which is constant) which is used within the RT measure. Then I have rval (which has a statistical distribution on it, inside the res.scs model file). You can see two different ways of accessing that variable, with VAR and pv(). Both give a distribution as in the attached picture.

    The pv function is definitely covered in the OCEAN Reference manual (chapter 7, Data Access Commands in IC5141). Didn't check the VAR() function, but it corresponds to the var button in the info tab (in wavescan calculator), or the var button in the AWD calculator.

    Regards,

    Andrew.

    • monteResults.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    In my web browser, the attachment picture in the last post is chopped off and only shows two out of the three subwindows - if you click on the attachment name though you'll see all three monteExpr histograms.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • OLyonnais
    OLyonnais over 15 years ago

     

    Hi Andrew,

    Thank you for your help. I was trying to do the same thing for my application,

    ie: put Vdd_half as a desVar and put VAR(\"Vdd_half\") in the monteExpr.

    I think i've put exactly the same thing that on your script for your variable 3 and.........ERROR !!

    Whereas when i put 0.55 instead of VAR(..) it works ! i don't understand how it works on your test. Do you see something wrong?

    Here is the main part ofmy ocean script:

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

    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design(     "/auto/ax/simulation/Timing_tb/spectre/schematic/netlist/netlist")
    resultsDir( "/auto/ax/simulation/Timing_tb/spectre/schematic" )
    definitionFile(
        "models.scs"
    )
    analysis('tran ?stop "80n"  )

    desVar("Vdd_half" 0.55)
    temp( 27 )
    monteCarlo( ?numIters "2" ?startIter "1"
        ?analysisVariation 'processAndMismatch ?sweptParam "None"
        ?sweptParamVals "27" ?saveData t
        ?nomRun "yes" ?append nil
        ?saveProcessParams t
    )

    monteExpr( "Delay_WL_S_rise" "delay(clip(v(\"/WL\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) VAR(\"Vdd_half\") 1 \"either\" clip(v(\"/S\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) 0.55 1 \"either\" 0 0 nil nil)" )
    monteRun()

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

    ERROR SPECTRE 8003 error evaluating ocean expression delay(clip(v(\"/WL\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) VAR("Vdd_half") 1 \"either\" clip(v(\"/S\" ?result \"tran-tran\") 2.871401e-08 3.685221e-08) 0.55 1 \"either\" 0 0 nil nil)

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

     

     

    thanks

    Axel

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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