• 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. SKILL: Print voltage to a text file in ADE XL over corn...

Stats

  • Replies 7
  • Subscribers 125
  • Views 16561
  • Members are here 0

SKILL: Print voltage to a text file in ADE XL over corners

Anonymous
Anonymous over 8 years ago

Hello,

I have a simple SKILL script that I load and run in the CIW window after an ADE-L simulation finishes to output a sampled waveform to a text file for Matlab post processing.  A simplified example follows:

writePort = outfile("f1.txt")

for( i 0 Num_pts-1

   tx = i*t_clk

   this_t = t_start + tx

   v1 = value(VT("/v1node") this_t)

   fprintf(writePort "%10.6g " v1)

)

fprintf(writePort "\n")

The problem is when I try this after running a corner sweep in ADE-XL I get "srrWave:0x51f13e70" type of data.  I assume the voltage is now a structured array, with multiple waveforms (one per corner), and I need to use a function to access each corner data waveform separately.  What is the easiest way to do this?

I have played with ocnPrint() which does indeed work.  However, it also outputs column data with corner information spread throughout the numerical data in the file.  This makes the file bigger and requires more text processing (e.g., slower) in Matlab.  I was wondering if there was another solution closer in nature to my original script.

Many thanks in advance for any tips!

Kind regards,

Chris

  • Cancel
  • Sign in to reply
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Chris,

    A much simpler solution would be to use the Spectre Toolbox for Matlab (run <MMSIMinstRoot>/bin/cdnshelp and search for "matlab toolbox"). This would allow  you to use the cds_srr function directly within Matlab to read the PSF data directly (at the root of the PSF results for the entire ADE XL run) and avoid any text processing at all. You'll then get Matlab multi-dimensional data indexed by the sweep variables.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Chris,

    A much simpler solution would be to use the Spectre Toolbox for Matlab (run <MMSIMinstRoot>/bin/cdnshelp and search for "matlab toolbox"). This would allow  you to use the cds_srr function directly within Matlab to read the PSF data directly (at the root of the PSF results for the entire ADE XL run) and avoid any text processing at all. You'll then get Matlab multi-dimensional data indexed by the sweep variables.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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