• 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. Return a script value as ADE output

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14106
  • 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

Return a script value as ADE output

Matth83
Matth83 over 12 years ago

Hi there,

Probably a basic question... I'm loading a script as an output in my ADE L/XL (with ocnEval("myscript")) and would like it to return a value in the ADE/Outputs/Value column.

Actually, my script always returns 'nil' per default, so nothing gets printed as 'Value'.
I can get the result I'm looking for from the script (eg. the value of the integrated noise power in my circuit) , could even enter an 'eval(noisePower)' as an output but this would evaluate the noise power of the previous run (the 'eval' command is run before the script is evaluated)...

Is there a way for my script to return something else but 'nil' when using ocnEval()?

I've tried using when() as well as prog()+return() which indeed give me my noise power if I write them from CIW, but they don't seem to return anything when included in my script as sub-commands.

Thank you for your feedback,
Regards,
Matth

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Matth,

    The best way is to add a line on the first line in your OCEAN script:

    axlAddOutputs(list("BW" "Peak"))

    and then in your script, you can do your calculations and when you're ready you can do:

    axlOutputResult(resultOfYourCalc "BW")

    and then:

    axlOutputResult(resultOfOtherCalc "Peak")

    etc. So your script can output as many outputs as you like - you advertise the list of outputs on the first line, and then output them at a convenient spot (doesn't have to be the end) in your script.

    You can also just use axlOutputResult(someValue) to output the value of the "script" (without having a name).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Matth83
    Matth83 over 12 years ago

    Thank you very much Andrew, it worked well for a single run.

    Actually, I had a bit more work with my script since it detects what type of simulation was started (ADE L single, or parametric, or ADE XL) and calls a subscript to execute the routine (in my case, evaluate the noise power of my circuit).
    In the case of a parametric simulation, my script first lists the parametric runs (l_Runs) and then does something like:

    foreach(RunName l_Runs
          resultDir_dd = strcat(paramDir "/" RunName)
          resultDir = strcat(resultDir_dd "/psf")
          evalstring(strcat("ocnEval(" subscript ")"))      ;# calling the subscript
          axlOutputResult(NP)
    )

    With the above loop, the script returns only the last value of the Noise Power (here given by the subscript as 'NP') with axlOutputResult(NP) instead of a set of Noise Powers corresponding to each parametric run.
    So I had to list the '(Run NP) inside the loop and to call axlOutputResult(artListToWaveform(list(Runs NPs))) after the loop.

    In the case of an ADE XL, my script lists all corners and then executes a foreach(Corner l_Corners ... ) in the same fashion as the parametric simulation, but leaving axlOutputResult(NP) inside the loop is enough to get my noise power as an output for each corner.
    Everything works fine now!

    Thanks again Andrew,
    Kind regards,
    Matth

    • 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