• 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. Printing to a file using fprintf

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 13751
  • 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

Printing to a file using fprintf

ajitg
ajitg over 7 years ago

Hi,

I have a simulation for generating MOS transistor data using a 4 nested sweeps (VGS, L, VDS, VSB) for a 4-terminal NMOS device. I am able to setup the simulation and run it with all working OK. However, I am trying to get the results into a .csv or .dat file in a clean manner.

I am using IC617 with Spectre version 16.1.0.479.isr9.

I know this question was asked before over here https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/33105/parametric-analysis  but the solution to use MATLAB is not something I can do at the current time. I will have to stick with using OCEAN or using a manual click and save as .csv

My setup is such that the VGS sweep is configured in ADE XL analysis window and the other sweeps are configured within the parametric analysis window (from top to bottom VSB,VDS,l)

My initial way to print the data into a .csv file was to use ocnPrint() which I know works best for plotting waveform data:

selectResult('dc)selectResult('dc)ocnPrint(?output "~/MOS_sweep/gm.csv" ?numberNotation 'scientific getData("M0:gm"))

This results in a .csv file that is a little cumbersome to read in MATLAB, in that it has blocks of 2-D data (with VGS and l as the sweep variables) and then multiple such blocks for swept values of VDS and VSB. 

By right clicking the parameter under the 'dc folder in Results Browser and creating a table, however the data is listed a 2-D data which is much more convenient to me. My question is how to invoke the table and save that as a .csv file from OCEAN?

AG

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    There is no OCEAN support for invoking the table and saving the contents as CSV, unfortunately. 

    Perhaps you can write a perl script to reformat the data from ocnPrint? Potentially you could write code to process the swept data and output in whatever format you want, but that may not be that easy. Perhaps you could use the code in this post?

    Regards,

    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