• 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 SKILL
  3. how to get exit code !=0 when there is a skill error in...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 3509
  • 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

how to get exit code !=0 when there is a skill error in a skill script?

marcelpreda
marcelpreda over 1 year ago

Hi there,

I have a script (python) which executes multiple skill scripts in parallel (postprocessing multiple simulation results in parallel to speedup the process).

There is a loop like below

virtuoso -nograph -replay "/.../batch_N.il" -log "/.../batch_N.log"

N is a counter: 1, 2, ...

Some skill batch files may crash and I would like to report the batches which were not successfully executed.
The problem is that always the exit code of the skill process is 0, even when we see the error stacktrace.
I would like to have an exist code !=0 , and not to parse the log.

The batch_N.il skill code consist of few load() statements and a call of one or two user defined procedures.

Is there a clean/simple solution to get exit code != 0 if there is a crash anywhere in the code?

Thank you,

Marcel

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Marcel,

    I assume you don't mean a "crash" but a SKILL error somewhere within the code. If so, you can surround the code with:

    if(errset({
      ... all the code
      } t) then
      exit(0)
    else
      exit(1)
    )

    Of course, maybe you want this to be a generic wrapper, and then the bit within the errset could just load() the file you want (maybe using getShellEnvVar to retrieve the file name). Anyway, the principle is to catch the error and turn the success/failure into a suitable exit status.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • marcelpreda
    marcelpreda over 1 year ago in reply to Andrew Beckett

    Hi Andrew,

    you read my mind: when I said "crash", I meant syntax error, unbound variable, division by zero or by nil, etc ...

    Luckily the crash already provide exit code != 0 Slight smile

    And your code example works like a charm, thanks a lot.

    At first glance the braces confused me, but checking the skill documentation [progn()] cleared it up.


    Best Regards,

    Marcel
     

    • 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