• 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. ocean script - data print to file

Stats

  • Locked Locked
  • Replies 27
  • Subscribers 129
  • Views 23591
  • 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

ocean script - data print to file

jugemu1234
jugemu1234 over 16 years ago

Hi,

I am very new to SKILL or ocean script . I have problems with following script. Firstly I created this ocean.ocn by ADE>Session>Save ocean script... Then added some lines to output data to file. However it ends up outputing error after successful simulation but I do not know what is wrong with this then tried to figure out by myself but couldnt.

I am sure this would be easy thing to do for some people. Hope someone help me out at the earliest oppotunity.

Thanks in advance.

---------------------------------
ocnWaveformTool( 'awd )
simulator( 'spectre )
design( "/netlist")
resultsDir( "/MydfII/simulation/sim_osc2/spectre/schematic" )
path( "/multiplelib" )
modelFile(
'("active_thin.scs" "tt")
)
analysis('tran ?stop "1.1u" ?errpreset "conservative" ?write "spectre.ic"
?writefinal "spectre.fc" ?annotate "status" ?finalTimeOp t ?maxiters "5"
?threshold "0.0" ?detail "node" ?sort "name" )
desVar( "Lvar" 1 )
save( 'v "/net019" "/dvss!" "/dvdd!" )
temp( 27 )
out = outfile("results.txt" "a")
run()

results()
selectResults('tran)
outputs()
ocnPrint(?output out frequency(clip(VT("/net019"),1u,1.1u)) )

close(out)


 

  • Cancel
  • starsky
    starsky over 15 years ago

    Andrew,

    Thanks a lot. It worked!

     

    Regards,

    Starsky

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

    Hi there,

    Ive been trying stb analysis and it would make my life easier if i can do that analysis in script.But there is no special function on calculater to see, say, phase margin from stb analysis. How can I output the text of simulation results for stb analysis? ( how shall I write to retrieve PM of stb analysis in my ocean script code? )

    Thanks,

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

    getData("phaseMargin" ?result "stb_margin")

    will do this. Or

    getData("gainMargin" ?result "stb_margin")

    for the gain margin. Easiest way of finding this expression is to run in ADE, and then use the Result->Direct Plot->Main form. Select the metric you want on the direct plot form (e.g. stb/phaseMargin) and then hit the "Add to Outputs" button). Then double click on the entry in the ADE outputs pane and you can see the expression used - it will be as above.

    Regards,

    Andrew.

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

     Hi,

    Thanks for your reply. 

    I wrote codes as you mentioned but I got weird results with following codes.

    PM= getData("phaseMargin" ?result "stb_margin")
    DCgain= value(db(mag(getData("loopGain" ?result "stb"))),0,?histoDisplay nil ,?noOfHistoBins 1 )
    UGF= getData("phaseMarginFreq" ?result "stb_margin")

    Outpus were like followings individually.

    nan       -49.6481            nan

    I have no idea what "nan" means to say and how to make it work properly.

    Maybe you can help me again.

     Thanks,

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

     Wrong simulation.

    Pls forget/delete previous post.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago

     Hi,

       it's a pity of missing your discussion, but i learnt a lot from your posts above, i looked through the ocean reference but i didn't find any command can do the "save script" job except sevSaveOceanScript , it's used to save the session script, but for me ,i don't want the "save script to file" form turn up, in another word, i want to apply the "save script"  function in my own procedure, does anyone know if there is this function.

    Regards,

    zfeng

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago

     Hi,

       sorry for posting my question here, i have found there is a discussion here , and it give out an appropriate solution.

    Regards,

    zfeng

    • 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