• 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. Writing a waveform and sampled version of that into a file...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 125
  • Views 22977
  • 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

Writing a waveform and sampled version of that into a file without using ocnPrint

yayla
yayla over 14 years ago

Hi all,

       I have recently started to learn ocean script and tried to make some analysis. I have looked at the forum to find a solution but I couldn't. My problem is that I am running a tran analysis and saving voltages by writing save('v "/outp"). After that, I am sampling this wave with some step as

out_sampled = sample(VT("outp") 1e-8 4e-8 "linear" 1e-12)

My question is that without using ocnPrint how I could save wave itself (VT("/outp") and out_sampled) into a file. Probably, I will need to use fprintf() but I am not quite sure how to do that.

I will appreciate if you could help.

 

Thanks,

 yayla

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    In fact rather than using cds_interpsig it's probably even easier to use the Matlab function interp1.

    net51=cds_srr('Results/psf','tran-tran','net51')
    newX=1e-9:0.2e-9:8e-9
    net51samp=interp1(net51.time,net51.V,newX)
    plot(net51.time, net51.V,newX,net51samp)

    If I plot this:

    stem(newX,net51samp)

    I get the attached picture/

    Regards,

    Andrew.

    • sampled.png
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    In fact rather than using cds_interpsig it's probably even easier to use the Matlab function interp1.

    net51=cds_srr('Results/psf','tran-tran','net51')
    newX=1e-9:0.2e-9:8e-9
    net51samp=interp1(net51.time,net51.V,newX)
    plot(net51.time, net51.V,newX,net51samp)

    If I plot this:

    stem(newX,net51samp)

    I get the attached picture/

    Regards,

    Andrew.

    • sampled.png
    • View
    • Hide
    • 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