• 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
  • ShawnLogan
    ShawnLogan over 11 years ago

    Dear Wayne,

     In line 2 of your script, the netlist location is shown as /homes/cadence/research/exam/netlist. I think if you examine the ocean script generated in the ADE, the ocean script design() command will point to the netlist file contained within the netlist directory - something like design("/homes/cadence/research/exam/netlist/netlist"). Without the netlist directory at the same level as the psf directory *your resultsDir()", the name of your signal in the psf simulation data may not be the same as the that of the schematic hierarchy since the amap directory within the /netlist directory - which provides that link - is missing.

    You can check this by including the ocean command outputs() after loading the results directory and selecting the transient results.

    There is an amaps directory in the /netlist directory that maps node names and when you run ADE, it is invoked so you can plot the signal name  /V2_OUTP_Q/PLUS. When you run standalone ocean, if it does not know the location of the netlist directory, it may not have access to that file. Hence, the node name to access the signal is different than the hierarchical nde name. To avoid this issue, the entire netlist directory should be on the same directory level as the /psf directory. A possible workaround provided by Cadence is to create a soft link to the netlist directory that appears on the same level as your /psf directory. This can be done with the ocean system() command. An example is:

    system("ln -s <path1>/netlist <path2>/netlist")

    where <path1> is the location of your /netlist directory and <path2> is the location of your /psf directory. This will place a symbolic link of the /netlist directory adjacent your existing /psf directory. 

     

    I hope this helps.

    Shawn 

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

    Dear Wayne,

     In line 2 of your script, the netlist location is shown as /homes/cadence/research/exam/netlist. I think if you examine the ocean script generated in the ADE, the ocean script design() command will point to the netlist file contained within the netlist directory - something like design("/homes/cadence/research/exam/netlist/netlist"). Without the netlist directory at the same level as the psf directory *your resultsDir()", the name of your signal in the psf simulation data may not be the same as the that of the schematic hierarchy since the amap directory within the /netlist directory - which provides that link - is missing.

    You can check this by including the ocean command outputs() after loading the results directory and selecting the transient results.

    There is an amaps directory in the /netlist directory that maps node names and when you run ADE, it is invoked so you can plot the signal name  /V2_OUTP_Q/PLUS. When you run standalone ocean, if it does not know the location of the netlist directory, it may not have access to that file. Hence, the node name to access the signal is different than the hierarchical nde name. To avoid this issue, the entire netlist directory should be on the same directory level as the /psf directory. A possible workaround provided by Cadence is to create a soft link to the netlist directory that appears on the same level as your /psf directory. This can be done with the ocean system() command. An example is:

    system("ln -s <path1>/netlist <path2>/netlist")

    where <path1> is the location of your /netlist directory and <path2> is the location of your /psf directory. This will place a symbolic link of the /netlist directory adjacent your existing /psf directory. 

     

    I hope this helps.

    Shawn 

    • 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