• 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. Question about exporting simulation results to csv format...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 16804
  • 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

Question about exporting simulation results to csv format, with ocean script

dskang
dskang over 4 years ago

Hello,

I have a question about ocean script.

As I mentioned on title, I'm trying to do ac simulation and export simulation results to csv file.

In ADLE gui, I could do it by clicking some buttons, 

like this.

Now I'm trying to do the same thing with ocean script, I made ocean script by exporting it from ADLE and adding some lines in it. What I've tried until now is: turn on ocnSetXLMode, and read simulation results by getData and put it to csv file by using ocnXlExportOutputView. But in the outfile there wasn't anything. Could anyone tell me what can be fixed or what should I do?

As I'm really novice in ocean so my code maybe seem very weird. By the way, the exit() is for running several script automatically and sequentially.

Thank you in advance.

Regards,

Dongsuk Kang

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear Dongsuk,

    In the syntax I read for the ocxlExportOutputView(0 function, which is also provided in the On-line support article at URL:

    support.cadence.com/.../ArticleAttachmentPortal

    there is a second argument you are missing if you want to print a specific view. From the manual as shown below, you did not specify for example "Detail" if you want your expressions printed. Please also note that your ocean script does not have any expressions defined to evaluate. You simply defined two output waves - both of which will be complex numbers at each frequency. Did you define any expressions? If you goal is to capture the waveforms in a .csv file, you will need to evaluate rm and ro at each frequency you want using a while or for loop - or alternately to print all - use the ocnPrint() function to send them to a file.

    Shawn

    ocnxlExportOutputView

    ocnxlExportOutputView( 
    t_fileName
    t_viewType
    ) => t / t_error

    Description

    Exports the results view to the specified .csv or .html file.

    Argument

    t_fileName

    Path and name of file to which the results need to be exported. Append .htm or .html to the filename to write in HTML format and .csv to write in CSV format.

    If no file extension is specified, a .csv file is created by default.

    The file is saved in the current working directory.

    t_viewType

    Name of the view type that needs to be exported.

    Possible values:

    "" or Current: writes the currently visible view

    Detail

    Detail-Transpose

    Optimization

    Summary

    Yield

    Default value: ""

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

    Dear Shawn,

    Thank you so much for the help. About the cadence support, I still couldn't get license number so I couldn't access to it. 

    However, I tried ocnPrint command and it worked. Between ocnPrint and exportoutput view, latter one seems to be more easy to use in my first view (because ocnPrint had many options ...) so I chose it, but I think I was wrong. For now, I think this is enough for me.

    About exportoutputview, I firstly found it at cadence SKILL API finder, but I couldn't find out what each viewtypes means. So I thought letting viewtype at default value will be okay.

    Thank you again!

    Regards,

    Dongsuk

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

    Dear Dongsuk,

    dskang said:
    For now, I think this is enough for me.

    Great! Thank you for letting us know.

    I am glad you have a way to solve your need! I would suggest you contact whomever manages your Cadence tools to ask for your license code. The On-line support portal has a lot of very valuable information if you will be using Cadence tools.

    Shawn

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

    Hi Dongsuk,

    It's not really a surprise that this doesn't work - you've taken an OCEAN (not OCEAN-XL) script and added a little bit of OCEAN XL around it, but not enough that it is really running as OCEAN XL. For a start, an OCEAN XL script should define tests using ocnxlBeginTest/ocnxlEndTest (you don't have that), and would not run the simulation using run() (which is for OCEAN which is single-test based) but instead use ocnxlRun(). You'd only expect to have the "output table" exported to CSV if you'd actually set up some outputs using functions like ocnxlOutputExpr() - which you haven't either.

    If you're really going to use this approach, I would suggest that you start with an ADE XL or Assembler view, set it up interactively so that you have one or more tests, have some output expression which give scalar results, and then save the OCEAN script from this to see what it looks like.

    Regards,

    Andrew

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

    Dear Shawn,

    Thank you for the advice, I'll contact the manager and ask for the license code. I was already several time blocked to access to such information and starts to feel I need the one.

    Regards,

    Dongsuk

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dskang
    dskang over 4 years ago in reply to Andrew Beckett

    Dear Andrew,

    Thank you for the advice, I firstly started with Ocean (exported from ADLE), and I added some OCEAN XL commands to do what I wanted, so I also thought adding OCEAN XL command at OCEAN script might not worked.

    Maybe I should also study on OCEAN XL to find which one will be better for my future work.

    - actually, I tried to find how to export OCEAN XL from ADLE XL like exporting OCEAN from ADLE, but I couldn't find it out. Also I couldn't find manuals like OCEAN. Are these also can be found at cadence support?

    Regards,

    Dongsuk

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dskang
    dskang over 4 years ago in reply to Andrew Beckett

    Dear Andrew,

    Thank you for the advice, I firstly started with Ocean (exported from ADLE), and I added some OCEAN XL commands to do what I wanted, so I also thought adding OCEAN XL command at OCEAN script might not worked.

    Maybe I should also study on OCEAN XL to find which one will be better for my future work.

    - actually, I tried to find how to export OCEAN XL from ADLE XL like exporting OCEAN from ADLE, but I couldn't find it out. Also I couldn't find manuals like OCEAN. Are these also can be found at cadence support?

    Regards,

    Dongsuk

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to dskang

    In ADE XL you simply do File->Save Script - it's pretty easy to find.

    All the documentation is in your installation; no need to go to support.cadence.com for this - if you click on the Help menu in any Virtuoso window there's a type-in box at the top labelled "Search". In that box, type "OCEAN" and you should find two manuals in this results - the OCEAN Reference and OCEAN XL Reference. You can also find these as PDFs in the IC installation directory:

    <ICinstDir>/doc/oceanref/oceanref.pdf and <ICinstDir>/doc/ocnxl/ocnxl.pdf

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dskang
    dskang over 4 years ago in reply to Andrew Beckett

    Oh, I see. I thought there might be something like Save OCEAN XL script ....

    Thank you for the other information. I'll take a close look into it.

    Sincerely,

    Dongsuk

    • 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