Uvm_fatal triggers $finish?

I’m using UVM 1.1d

In my simulation, I consider the test to fail when `uvm_fatal is triggered. In such event, I would like the return status of vsim to be non zero, such that a $? check would work.

However, it appears in uvm_pkg::uvm_report_object::die, there is a $finish. Thus the simulation is consider to have no error.

End time: 20:39:12 on Oct 28,2021, Elapsed time: 0:00:15

Errors: 0, Warnings: 0

What’s the best way for the outer-layer shell script to know that a fatal condition has occurred? I’m considering introducing a transcript parsing script to extract test status. Is there an easier way?

In reply to StrayCat:

There are easier tool specific ways of getting the TESTSTATUS after the simulation has finished.

However, this Mentor/Siemens EDA sponsored public forum is not for discussing tool specific usage or issues. Please read your tool’s user manual or contact your tool vendor directly for support.

In reply to dave_59:

Adding to Dave’s comment, I would recommend that you reserve the exit status of the simulation process to detect “non-graceful” simulation completion - i.e. if the simulation encountered a catastrophic error due to a licensing error, an elaboration failure, or an outright crash, that should result in a non-zero exit code.

If the simulator finishes gracefully but the simulation itself failed for one reason or another (UVM_FATAL or UVM_ERROR) you can make that determination in some other way that will likely be simulator-specific.

–Jon

In reply to jcraft:

Thank you both. I did not realize this is a vendor-specific implementation. I had found the Questa-specific option.