• 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. How to deposit simulation result into a file?

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17999
  • 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

How to deposit simulation result into a file?

Alex Liao
Alex Liao over 10 years ago

Hi, I am wondering is there a way to save an output into a file, like a .txt which it is easy to read from.

 

Specifically, in the "Setting outputs" of Virtuoso Analog Design Environment (ADE) I have: 

Name: PhaseMargin

Expression: (phaseMargin((VF("/Vout") / (VF("/Vin+") - VF("/Vin-")))) + 180)

 

After simulation, I got 80 degree displayed.

But is there a way to save this '80' into a .txt file?

I am using SpectreS as the simulator. I think there are some commands to output results.

 

Any answer is appreciated.

Thanks,

Alex


  • Cancel
Parents
  • Alex Liao
    Alex Liao over 10 years ago

    Hi Lawrence,

    Big thanks to you. I understand what you were saying. Because I were doing a circuit verification and the circuit associated with its artist state are from another guy. He used spectreS and I did not convert it yet. Is hspice the latest or spectre is better if consider a conversion? 

     

    I tried the openResults() and then went to ocnPrint(). It worked so as to my initial purpose. Use runSimulation to get data and use ocnPrint() to get the result.

    Q1: One thing about the result.txt is that I do not know how to format it. Say I want to write some plain text before each print result.

    For example ( ";statement" is an comment according the SKILL):

    ********************** ** ;plainText 

    Gain is: ;plainText 

      65dB ;ocnPrint Result

    PhaseMargin is: ;plainText 

    80 ;ocnPrint Result

    GainBandwidth is: ;plainText 

    5MHZ  ;ocnPrint Result

    ************************* ;plainText 

    Also I am thinking even I could write the result.txt using C++ for instance, if I run the ocnPrint() the second time, it would overwrite my previous contents. Is there a way to control how to write to a file? better use one ocnPrint() to write multiple wave/variable or execute multiple ocnPrint()s?

     Q2A:

    When I have the getResult.ocn, I use:

    ocean -replay getResult.ocn or ocean -restore getResult.ocn  (Any difference?)

    to execute it. 

     

    Q2B: After executing the ocean script it always make the command line go into ocean interactive mode.

    Because I am going to call this iteratively through C++ System("call command"), a bit worried about being into ocean interactive mode.

    Therefore I tried  icfb -nograph -restore getResult.ocn

    I get error message:

     *WARNING* Could not locate rgb.txt file in /usr/lib/X11

    *WARNING* This file is required for color operations with the non-graphical

    *WARNING* X server and many WARNING messages may follow this one!

    /users/vlsi/CMC/tools/cadence/IC5141USR6_lnx86/tools.lnx86/dfII/bin/Xndx: error while loading shared libraries: libgdbm.so.2: cannot open shared object file: No such file or directory.

     

    When I delete the -nograph, it can run but bring up me a icfb window which is not good in the case of C++ iterative call of the ocnScript. I could have thousand of icfb popped up. Any idea on why I cannot proceed with -nograph property? or a way of not stepping into ocean interactive mode after execution of ocnScript?

     

    Kind Regards,

    Alex 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Alex Liao
    Alex Liao over 10 years ago

    Hi Lawrence,

    Big thanks to you. I understand what you were saying. Because I were doing a circuit verification and the circuit associated with its artist state are from another guy. He used spectreS and I did not convert it yet. Is hspice the latest or spectre is better if consider a conversion? 

     

    I tried the openResults() and then went to ocnPrint(). It worked so as to my initial purpose. Use runSimulation to get data and use ocnPrint() to get the result.

    Q1: One thing about the result.txt is that I do not know how to format it. Say I want to write some plain text before each print result.

    For example ( ";statement" is an comment according the SKILL):

    ********************** ** ;plainText 

    Gain is: ;plainText 

      65dB ;ocnPrint Result

    PhaseMargin is: ;plainText 

    80 ;ocnPrint Result

    GainBandwidth is: ;plainText 

    5MHZ  ;ocnPrint Result

    ************************* ;plainText 

    Also I am thinking even I could write the result.txt using C++ for instance, if I run the ocnPrint() the second time, it would overwrite my previous contents. Is there a way to control how to write to a file? better use one ocnPrint() to write multiple wave/variable or execute multiple ocnPrint()s?

     Q2A:

    When I have the getResult.ocn, I use:

    ocean -replay getResult.ocn or ocean -restore getResult.ocn  (Any difference?)

    to execute it. 

     

    Q2B: After executing the ocean script it always make the command line go into ocean interactive mode.

    Because I am going to call this iteratively through C++ System("call command"), a bit worried about being into ocean interactive mode.

    Therefore I tried  icfb -nograph -restore getResult.ocn

    I get error message:

     *WARNING* Could not locate rgb.txt file in /usr/lib/X11

    *WARNING* This file is required for color operations with the non-graphical

    *WARNING* X server and many WARNING messages may follow this one!

    /users/vlsi/CMC/tools/cadence/IC5141USR6_lnx86/tools.lnx86/dfII/bin/Xndx: error while loading shared libraries: libgdbm.so.2: cannot open shared object file: No such file or directory.

     

    When I delete the -nograph, it can run but bring up me a icfb window which is not good in the case of C++ iterative call of the ocnScript. I could have thousand of icfb popped up. Any idea on why I cannot proceed with -nograph property? or a way of not stepping into ocean interactive mode after execution of ocnScript?

     

    Kind Regards,

    Alex 

    • 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