• 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. Ocean script query

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 126
  • Views 14788
  • 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

Ocean script query

eppramod
eppramod over 15 years ago
May be this has already been discussed here... Can anyone help here? Pramod My query is Is there a way in OCEAN script to avoid the job getting failed just because you have one measurement failing? This is the same way hspice prints “failed” in the measurement files and allow simulation to conclude. I have some measurements (using cross) which may not find values in some corners and which may find in some other. I have multiple measures and may be in some corner one among them will fail but others will pass. Right now if one measurement fails it stops the simulation after mentioning the error.
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    I disagree with Lawrence a little on this. I think that actually the right way to handle this is using the first approach in that solution (I think the approaches in the solution came from something I said in an internal discussion anyway). That is to do this kind of thing:

    when(member('ac results())
    PM=phaseMargin(VF("/out"))
    when(PM
    fprintf(fp "Phase margin = %f\n" PM)
    )
    )

    In other words, it's better to explicitly check for various things - in this case, we check that the ac results are present (maybe it failed for some reason) prior to trying to calculate the phaseMargin. In other words, at each stage, check the result of an expression was non-nil before using it in another expression or print.

    Using errset() is fine when you have no control over the code being executed - but using it to trap errors is a slightly lazy approach and doesn't allow much precision in pinpointing where the error occurred (not strictly true, but true if you just stick errset around a massive piece of code). Far better to code defensively, checking for unexpected results at each point, and handling the problem as soon as it occurs.

    Best Regards,

    Andrew.

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

    I disagree with Lawrence a little on this. I think that actually the right way to handle this is using the first approach in that solution (I think the approaches in the solution came from something I said in an internal discussion anyway). That is to do this kind of thing:

    when(member('ac results())
    PM=phaseMargin(VF("/out"))
    when(PM
    fprintf(fp "Phase margin = %f\n" PM)
    )
    )

    In other words, it's better to explicitly check for various things - in this case, we check that the ac results are present (maybe it failed for some reason) prior to trying to calculate the phaseMargin. In other words, at each stage, check the result of an expression was non-nil before using it in another expression or print.

    Using errset() is fine when you have no control over the code being executed - but using it to trap errors is a slightly lazy approach and doesn't allow much precision in pinpointing where the error occurred (not strictly true, but true if you just stick errset around a massive piece of code). Far better to code defensively, checking for unexpected results at each point, and handling the problem as soon as it occurs.

    Best 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