• 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 for getting dynamic energy consumption

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 14534
  • 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 for getting dynamic energy consumption

Carmichaeli
Carmichaeli over 11 years ago

Hi everyone,

I designed a circuit through cadence virtuoso and extracted the spice netlist (.scs) from the ADE. Then I want to do circuit simulation many many times with different input variables by OCEAN SCRIPT. I know a little about the Ocean Script on how to use the For Loops, but I don't know how to get the dynamic energy consumption just by coding in ocn file.

It seems that the ADE can generate an ocean script file for one state automatically. If I use the calculator, the value of dynamic consumption can be calculated and shown in the Result Display Window by click "Tools" -> "Table" in the calculator window (I use average(i("/V0/PLUS" ?result "tran-tran"))*1.8 to get the value). But after saving (in ADE), I can't find any code segment containing this part (like integ, average or other computation) in that ocean file (also can't find them in the spectre netlist I just extracted). The spectre netlist and ocean script file seems just gave me the settings about this simulation or generated the psf file. I just can get the correct result through the calculator way. If I add my own code I always get zero.

Can anyone help me get the dynamic consumption in the ocean script way or give me a few examples?

Thank you extremely!

Here is ocn file,

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

simulator( 'spectre )

design( "/homes/grad/cadence/Design/inverter_simulate/simulation/inverter_simulate/spectre/schematic/netlist/netlist")

resultsDir( "/homes/grad/cadence/Design/inverter_simulate/simulation/inverter_simulate/spectre/schematic" )

modelFile( 

    '("/homes/grad/cadence/models/spectre/tsmc20N.m" "")

    '("/homes/grad/cadence/models/spectre/tsmc20P.m" "")

)

analysis('tran ?stop "30n"  )

envOption(

'analysisOrder  list("tran") 

)

save( 'v "/out" "/in") 

temp( 27 ) 

run()

 

  • Cancel
Parents
  • Carmichaeli
    Carmichaeli over 11 years ago

    Thank you for your reply and it's helpful!

    I met another problem. I want to design another circuit which is not based on virtuoso. I mean I just wrote the circuit netlist directly on a blank text document by hand. Then I also wrote an ocean document(.ocn) by hand and found immediately that another file (input.scs) is required (but may not appear in ocean script file(.ocn). Later, it run and generated the psf, but some errors appeared like "The output '/V0/PLUS' you selected does not exist."

    The simulation works good when I use the ocn file that is extracted automatically from ADE. So, do I need some other documents to do the simulation which is just in the Ocean environment?

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

    simulator( 'spectre )

    design( "/homes/cadence/research/exam/netlist")

    resultsDir( "/homes/cadence/research/exam" )

    modelFile( '("$CDK_DIR/models/spectre/nom/models.scs" "") )

    out = outfile("/homes/cadence/research/exam/mresl_t.txt" "w")

    for( cntrl 1 8 analysis('tran ?stop "30n" )

    desVar( "vq" 1.0+0.1*cntrl )

    envOption( 'analysisOrder list("tran") )

    save( 'i "/V0/PLUS" )

    temp( 27 )

    run()

    openResults("/homes/cadence/research/exam/psf")

    selectResult('tran) linshi=1.0+0.1*cntrl

    dec = (average(i("/V0/PLUS" ?result "tran-tran")) * linshi)

    fprintf(out "%f\n" dec) )

    close(out)

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

    Thank you so much!

    Wayne. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Carmichaeli
    Carmichaeli over 11 years ago

    Thank you for your reply and it's helpful!

    I met another problem. I want to design another circuit which is not based on virtuoso. I mean I just wrote the circuit netlist directly on a blank text document by hand. Then I also wrote an ocean document(.ocn) by hand and found immediately that another file (input.scs) is required (but may not appear in ocean script file(.ocn). Later, it run and generated the psf, but some errors appeared like "The output '/V0/PLUS' you selected does not exist."

    The simulation works good when I use the ocn file that is extracted automatically from ADE. So, do I need some other documents to do the simulation which is just in the Ocean environment?

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

    simulator( 'spectre )

    design( "/homes/cadence/research/exam/netlist")

    resultsDir( "/homes/cadence/research/exam" )

    modelFile( '("$CDK_DIR/models/spectre/nom/models.scs" "") )

    out = outfile("/homes/cadence/research/exam/mresl_t.txt" "w")

    for( cntrl 1 8 analysis('tran ?stop "30n" )

    desVar( "vq" 1.0+0.1*cntrl )

    envOption( 'analysisOrder list("tran") )

    save( 'i "/V0/PLUS" )

    temp( 27 )

    run()

    openResults("/homes/cadence/research/exam/psf")

    selectResult('tran) linshi=1.0+0.1*cntrl

    dec = (average(i("/V0/PLUS" ?result "tran-tran")) * linshi)

    fprintf(out "%f\n" dec) )

    close(out)

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

    Thank you so much!

    Wayne. 

    • 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