# How to stop the simulation only when specific errors occur

**URL:** <https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748>\
**Category:** UVM\
**Tags:** UVM, uvm\_error\
**Created:** [January 15, 2017, 1:10pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748 "2017-01-15T13:10:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [January 15, 2017, 1:10pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/1 "2017-01-15T13:10:57Z")

</div>

I use the following command in the simulation file for stop the simulation:  
+UVM\_MAX\_QUIT\_COUNT

The issue is that the simulation stops when any error (uvm\_error/uvm\_fatal\_ occur). Is there an option to manage the errors, so some errors will cause the simulation to stop and some no?

---

<div class="post-metadata">

**Author:** ![yashwanth\_madisetty](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/y/ba8739/32.png) [@yashwanth\_madisetty](https://verificationacademy.com/forums/u/yashwanth_madisetty)\
**Post date:** [January 16, 2017, 3:12am UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/2 "2017-01-16T03:12:07Z")

</div>

May be you can change that specific error to fatal :)

Thanks,  
-Yashwanth

---

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [January 16, 2017, 1:47pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/3 "2017-01-16T13:47:27Z")

</div>

_In reply to [yaswanth021](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/2):_

The simulation stop also in case of error when I use +UVM\_MAX\_QUIT\_COUNT.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 16, 2017, 2:02pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/4 "2017-01-16T14:02:29Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/3):_

On which value you are setting UVM\_MAX\_QUIT\_COUNT?  
In case of a fatal the simulation stops immidiately

---

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [January 16, 2017, 2:15pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/5 "2017-01-16T14:15:57Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/4):_

1

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 16, 2017, 2:33pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/6 "2017-01-16T14:33:39Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/5):_

With UVM\_MAX\_QUIT\_COUNT=1 you are advicing the simulator to stop after the first error. You see it works perfectly. If you want the simulator to tolerate some errors you have to set UVM\_MAX\_QUIT\_COUNT to any value different from 1. In my projects I use a value between 10 and 30.

---

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [January 16, 2017, 4:38pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/7 "2017-01-16T16:38:17Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/6):_

> _In reply to [saritr](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/6):_  
> With UVM\_MAX\_QUIT\_COUNT=1 you are advicing the simulator to stop after the first error. You see it works perfectly. If you want the simulator to tolerate some errors you have to set UVM\_MAX\_QUIT\_COUNT to any value different from 1. In my projects I use a value between 10 and 30.

How can I manage the simulator to tolerate some errors?

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 16, 2017, 4:47pm UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/8 "2017-01-16T16:47:49Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/7):_

Youz have 2 options:  
(1) from the CLI (command line interface) you can issue:  
+UVM\_MAX\_QUIT\_COUNT=10  
(2) from your test you can call  
set\_report\_max\_quit\_count(10).

In both cases the simulation will stop after 10 errors.

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [January 17, 2017, 4:12am UTC](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/9 "2017-01-17T04:12:32Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/how-to-stop-the-simulation-only-when-specific-errors-occur/32748/8):_  
If you want to change how a message behaves, you can either override the severity of a message (i.e. change from error to warning) or you can change the actions associated with a message (remove the UVM\_COUNT action so it does not stop when reaching the max\_quit\_count).

[https://verificationacademy.com/verification-methodology-reference/uvm/docs\_1.1a/html/files/base/uvm\_report\_object-svh.html#uvm\_report\_object.set\_report\_severity\_override](https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.1a/html/files/base/uvm_report_object-svh.html#uvm_report_object.set_report_severity_override)  
[https://verificationacademy.com/verification-methodology-reference/uvm/docs\_1.1b/html/files/base/uvm\_object\_globals-svh.html#uvm\_action](https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.1b/html/files/base/uvm_object_globals-svh.html#uvm_action)  
[https://www.vmmcentral.org/uvm\_vmm\_ik/files3/base/uvm\_cmdline\_processor-svh.html#uvm\_cmdline\_processor.+uvm\_set\_action](https://www.vmmcentral.org/uvm_vmm_ik/files3/base/uvm_cmdline_processor-svh.html#uvm_cmdline_processor.+uvm_set_action)
