• 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. Any way to format the print statement in spice?

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 15626
  • 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

Any way to format the print statement in spice?

RK56
RK56 over 8 years ago

Hi,

I'm new to OCEAN/MDL..

I need to print all the voltages and currents in the circuit for further text processing. I don't know the nodes and terminals beforehand.

SPICE syntax .print v(*) i(*) works fine but I want to  format the output as below. 

Node1 voltage1

Node2 voltage2

Term1 current1

Term2 current2

1. Is there any way to format the .print statement in SPICE syntax?

2. Which is the right tool to do this task? OCEAN or MDL or SPICE or any other ?

Thanks

Ramakrishnan

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

    I don't think there's a direct way of doing it with .print (or the spectre syntax print statement) (I may be wrong, as I don't use it very often). I did wonder whether you could just use the write= parameter of the dc analysis, but that's not including all the currents - just some of them.

    One way is to run the simulation as usual (assuming that your dc operating point was in an analysis called dcOp) and then in OCEAN:

    openResults("/path/to/results.raw")
    selectResult('dcOp)
    dumpFile=outfile("./report.txt")
    foreach(out outputs(?map nil)
      fprintf(dumpFile "%s %g\n" out getData(out))
    )
    close(dumpFile)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    I don't think there's a direct way of doing it with .print (or the spectre syntax print statement) (I may be wrong, as I don't use it very often). I did wonder whether you could just use the write= parameter of the dc analysis, but that's not including all the currents - just some of them.

    One way is to run the simulation as usual (assuming that your dc operating point was in an analysis called dcOp) and then in OCEAN:

    openResults("/path/to/results.raw")
    selectResult('dcOp)
    dumpFile=outfile("./report.txt")
    foreach(out outputs(?map nil)
      fprintf(dumpFile "%s %g\n" out getData(out))
    )
    close(dumpFile)

    Regards,

    Andrew.

    • 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