• 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. export ADE output expressions to CSV

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 14294
  • 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

export ADE output expressions to CSV

yeh1
yeh1 over 4 years ago

Is there a way to print the ADE output expressions to a CSV file, when some of the expressions fail to evaluate in ocean/skill, without using Assembler? e.g. if part of the expression is nil (e.g. dB20() of a value which is 0), ocean stops with this message:

*Error* difference: can't handle (nil - nil)
*Error* load: error while loading file - "2.ocn" at line 211

Assembler seems to handle the error better; it just returns "eval err" on the nil results and continues to print the valid results.

1. Is there some error handling option in ocean, to continue if the result is nil?

2. I tried  waveout.il groups.google.com/.../ or www.thecadforums.com/.../andrew-becketts-program-to-write-waveforms-to-an-ascii-file.32869
but when it gets to a nil result it gives:
Error* quotient: Attempted to divide by zero - (4.59756e-21 0.0)

3. Or better, is there some way to import a psf results dir run from plain Spectre into Assembler/Explorer just to print out a CSV of the output expressions? I tried to copy the psf dir into an existing maestro run dir and re-evaluate the expressions in Assembler, but the expressions did not re-evaluate.

  • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear yeh1,

    yeh1 said:
    Is there a way to print the ADE output expressions to a CSV file, when some of the expressions fail to evaluate in ocean/skill, without using Assembler?


    I am afraid I am not sure I understand the context of your basic question, but can certainly answer your question 1. Specifically, it sounds as if you have an ocean/SKILL script that you are running and it has some expressions that are not evaluating correctly. However, you want to print the expressions to a comma-separated variable file. It seems to me as if the expressions must be in the ocean/SKILL script you have - so why do you need to print them to a new file?

    In any case, let me answer your question:

    yeh1 said:
    1. Is there some error handling option in ocean, to continue if the result is nil?

    The error handling in ocean can be rather difficult to decipher. Hence, from my perspective, I have defined SKILL/ocean procedures to provide added error checking and report any potential errors in a manner that is easier to understand and allows a quick correction. As an example, the ocean function getData() can be used to access waveforms from a spectre results directory. However, if a desired output is not found in the data base, getData() provides only a nil condition with no information about the waveform it cannot locate. Hence, I defined procedure as shown below called "getWave()" that provides a more detailed output indicating which net name it cannot find.

    I use similar functions for other ocean expressions that provide little information to assist in debugging. As a further example, I often use the if() content where the argument is the ocean function name. When it evaluates to nil, I include a printf() statement in the if() expression where the printf() provides a more meaningful bit of text indicating the nature of the ocean funciton that produces a "nil".

    Does these examples help at all? In short, it is really up to you to add error checking to facilitate debugging ADE or ocean expressions.

    yeh1 said:
    3. Or better, is there some way to import a psf results dir run from plain Spectre into Assembler/Explorer just to print out a CSV of the output expressions?

    I am not aware of a way to import the psf results from a single simulation to Assembler/Explorer without updated the psf of the main Assembler/Explorer database so it is aware of the added data. There may be a way, but I have not found a means to do this in my experience.

    Shawn

    Sample error checking ocean() procedure getWave() for standard ocean function getData()

    include statement added to ocean script to load function getWave(): load("/home/smlogan/ocean_files/getWave.il")

    ---------------------------------------------------------------------------------------------------------------------------
    ; Waveform loading routine

    procedure( getWave( signal_name ana_type results_directory)

    let( list(my_wave)

    ; Loads a waveform from a database, but adds error checking in case waveform is not in database

    my_wave = getData( signal_name ?result ana_type ?resultsDir results_directory)

    if( my_wave then
       my_wave = my_wave
    else
       printf("Error! Did not find waveform \"%s\" from results directory:\n%s\n" signal_name results_directory)
    )

    )
    )

    Example of use of if() function to detect an error in freq() ocean function where assigns error value "err_val" (numeric constant I define) to variable modout_p_freq in lieu of creating "nil" and exiting ocean

    modout_p_freq = if(freq(modout_p "rising" ?xName "time" ?mode "user" ?threshold vth) frequency(clip(modout_p cross(modout_p vth num_cycles "rising" nil nil nil) cross(modout_p vth -2 "rising" nil nil nil)))/1e+09 err_val)

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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yeh1
    yeh1 over 4 years ago in reply to ShawnLogan

    Thanks, using the if() function is helpful.

    • 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