• 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. Functional Verification
  3. getting xrun to quit on error during simulation

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 18887
  • 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

getting xrun to quit on error during simulation

Chris Jones
Chris Jones over 4 years ago

We have a need for xrun to exit during the simulation step of our system verilog design when an error occurs. The error we want to exit on is generally from an assertion (*E,ASRTST) but also could be from a $error in the verilog. The solution seemed to be upgrading the error to a fatal using -xmfatal ASRTST, but this seems to only elevate errors that occur during compile or elaboration, but not in the simulate step. Are there any other methods of getting an error to cause the simulator to exit? the only other solution we've found is to change $error to $fatal, but this doesn't seem like a good long term solution as the code that will generate the error is not maintained by us.

  • Cancel
  • StephenH
    StephenH over 4 years ago

    Hi Chris.

    -xmfatal can be used the way you want, but you have to pass it to the simulation run, it sounds like you are passing it to the compile/elab command.

    There is also a -errormax switch, also used at simulation time, which causes the simulator to exit after N errors, regardless of the mnemonic code for the error; this owuld be a more generic solution than using -xmfatal.

    Regards,
    Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Chris Jones
    Chris Jones over 4 years ago in reply to StephenH

    Hi Stephen, 

    Thanks for the reply. The command I'm using to run the simulation is 'xrun -xmfatal ASRTST fil1.sv' does this not pass the -xmfatal through to simulation? Do I need to run the simulation as a separate command, I'm assuming xmsim, though I've never used it before.

    Best,

    Chris

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 4 years ago in reply to Chris Jones

    Strange, you're using it correctly then, but it's not working for the ASRTST errors, I'm not sure why that would be.

    You can look in xcelium.d/run.d/xmsim.args, to see what got passed to the simulator phase, and for me at least, I do see -xmfatal in there! :-/

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Chris Jones
    Chris Jones over 4 years ago in reply to StephenH

    I tried again doing xrun -elaborate then xmsim -xmfatal with no luck. I checked the xmsim.args file and there is a -xmfatal when I run the xrun command, however my error is still not being elevated to fatal.

    • 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