• 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. Way to use SKILL script to save WAVEFORM into a file in...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 124
  • Views 20884
  • 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

Way to use SKILL script to save WAVEFORM into a file in ADE-XL Run

RFStuff
RFStuff over 5 years ago

Dear All,

I have to run a multi-corner ADE-XL simulation and I have to save the waveforms into separate files.

Later I can use these files in pwl source for other test-benches. This way I can fasten the simulation for later cases.

But, I am wondering how I can save the waveform (NOT manually) into files through ADE-XL run. Can it be done through SKILL script.

Could anybody please help me in this regard.

Kind Regards,

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 5 years ago

    Dear rfstuff,

    >I have to run a multi-corner ADE-XL simulation and I have to save the waveforms into separate files.

    > Later I can use these files in pwl source for other test-benches. This way I can fasten the simulation for later cases.

    I am sure this can be accomplished multiple ways...two or three methods that I use follow.

    1. Write a short ocean script to traverse the ADE-XL directory structure, open each set of results, use getData() to access the waveforms of interest, and write the waveforms you want to text files using either an fprintf() statement or OcnPrint(). I have attached an ocean script that might serve as a template.

    2. Alternatively, you can plot all the corner results on one graph in ViVa, select them all and, using your right mouse button, "Send to...Export..." or "Send to...Table" . The former might be best if the number of time points in the waveform is large.

    I am sure many other very skilled designers have other methods of accomplishing your goal.

    Shawn

    Fullscreen sample_ocean_script.txt Download
    ; Main routine
    
    simulator('spectre)
    
    base_results=strcat("<path_to_your_results>/results/data/Interactive.0/")
    sub_dir = strcat("<ADE-XL test name>")
    
    TSTOP = 30e-09
    
    init_val = 1
    final_val = <number_of_corners>
    
    sim_case = init_val
    while( sim_case < (final_val + 1)
    
    printf("sim_case = %d\n" sim_case)
    sprintf(sim_case_val "%d" sim_case)
    
    ; Define unique output file for each ADE-XL set of simulation results
    
    fname = strcat("<your output file name>" "_" sim_case_val ".csv")
    fp_params = outfile( fname "w")
    
    results=strcat( base_results sim_case_val sub_dir "psf")
    printf("Results directory\n%s\n" results)
    
    openResults( results )
    selectResult( 'tran)
    ;ocnPrint( ?output "outputs.txt" outputs())
    
    ; Load waveform "vc"
    
    vc = getData("/vc" ?results "tran" ?resultsDir results)
    
    tstart = 0
    tstop = TSTOP
    sim_time = tstart
    
    delta_t = (tstop - tstart)/1000.0
    
    while( sim_time < (tstop + 0.10*delta_t)
    
    fprintf(fp_params "Time,vc\n")
    fprintf(fp_params "%1.8e,%1.8e\n" sim_time value( vc sim_time))
    
    sim_time = sim_time + delta_t
    
    ) ; end while loop
    
    close(fp_params)
    
    sim_case = sim_case + 1
    
    ) ; end sim_case loop
    
    
    exit()
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to ShawnLogan

    One way could be to use the code in this thread. Load this file in your .cdsinit using:

    load("abDumpWaveform.il")

    and then add an output expression in ADE XL such as this:

    abDumpWaveform(VT("/outdiff") strcat(openResults() "/dump.txt")) && 1

    The VT() would be whatever signal you wish to save, and the "dump.txt" is the file name you want (it will save this at the same level as the netlist and psf dir for each simulation point in ADE). The && 1 part is just to ensure the expression returns a number to prevent any errors.

    If you then run a simulation and go over the point you're interested in and do Right Mouse->Open Terminal you'll then see there's a dump.txt file in that directory.

    Hope that helps?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 5 years ago in reply to Andrew Beckett

    Thanks a lot Shawn and  Andrew.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 5 years ago in reply to RFStuff

    Dear Andrew,

    We can save N multiple waveforms in a single file.
    abDumpWaveforms("data.out" VT("/c") VT("/z") VT("/a") ?format "%-10g" ?separator ",").

    But, is there an efficient way we can have the single file to be used in a testbench for N vsources ?

    Kind Regards,
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • RFStuff
    RFStuff over 5 years ago in reply to RFStuff

    Dear Andrew,

    We can save N multiple waveforms in a single file.
    abDumpWaveforms("data.out" VT("/c") VT("/z") VT("/a") ?format "%-10g" ?separator ",").

    But, is there an efficient way we can have the single file to be used in a testbench for N vsources ?

    Kind Regards,
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to RFStuff

    See my response in your other post (I would have answered this sooner but have been away this week).

    Andrew

    • 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