# How to drop all raised objection?

**URL:** <https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755>\
**Category:** UVM\
**Tags:** UVM, uvm\_objection, KillTheObjection\
**Created:** [April 26, 2016, 6:21am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755 "2016-04-26T06:21:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![electron1](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/electron1/32/2235_2.png) [@electron1](https://verificationacademy.com/forums/u/electron1)\
**Post date:** [April 26, 2016, 6:21am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/1 "2016-04-26T06:21:52Z")

</div>

Hi All,

My requirement is whenever I see TIMEOUT timer expired, I wanted to move out from run\_phase and proceed ahead with remaining phases like exract\_phase, report\_phase, checker\_phase, final\_phase etc.

I raised many objections from different places, like from sequence, monitors, scoreboards. Now if my TIMEOUT timer expired due to not dropping the objection, then I can’t move out from run\_phase ever. And my expectations never meets.

Somehow I need to kill all the raised objection or kill run\_phase whenever I see TIMEOUT things. I can’t find any command to kill all the raised objection.

Any other alternatives or how to kill all the objections?

---

<div class="post-metadata">

**Author:** ![Paresh](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@Paresh](https://verificationacademy.com/forums/u/Paresh)\
**Post date:** [April 26, 2016, 10:26am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/2 "2016-04-26T10:26:11Z")

</div>

Hi,  
You should raise\_objection() and drop\_objection() in the run\_phase() of your test.Do not use them in any components or sequences as it is difficult to track down. By using these in your tests, you will only have one outstanding objection per test.

Drain time is an additional amount of time that the run\_phase() will execute after all objections are dropped. This can be set in test it self for any additional processing time needed after all your test sequences have completed.

I think this will help

```verilog

```

---

<div class="post-metadata">

**Author:** ![perumallatarun](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/4bbf92/32.png) [@perumallatarun](https://verificationacademy.com/forums/u/perumallatarun)\
**Post date:** [April 26, 2016, 10:41am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/3 "2016-04-26T10:41:18Z")

</div>

_In reply to [Paresh](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/2):_

Yeah it is recommended to use raise and drop objections only in your test.You can also use them in another components but debugging will be very difficult.  
It is often prescribed to have only one raise and drop objections in running a simulation.

---

<div class="post-metadata">

**Author:** ![electron1](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/electron1/32/2235_2.png) [@electron1](https://verificationacademy.com/forums/u/electron1)\
**Post date:** [April 26, 2016, 11:51am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/4 "2016-04-26T11:51:20Z")

</div>

_In reply to [Paresh](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/3):_

_In reply to [perumallatarun](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/3):_

Yes I know managing objection from multiple components are very difficult to debug, However I have taken in scoreboards and monitors because of I also need to synchronize reference model (in C++ language).

Is there a way to drop all the objection at a time?

---

<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:** [April 26, 2016, 8:09pm UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/5 "2016-04-26T20:09:54Z")

</div>

_In reply to [electron](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/4):_

The question is not if ojections are hard to debug. You might confuse the execution of a test. For this reason it is recommended ti minimize the number of objections. Synchronizing a C++ refernce model does not need a special objection approach. The reference model will stop compairing when no data are delieverd to the scoreboard/reference model.  
The method get\_objectors returns you all objectors. Then you can starting to drop them by executing drop\_objection. For details see the UVM refernce manual.

---

<div class="post-metadata">

**Author:** ![electron1](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/electron1/32/2235_2.png) [@electron1](https://verificationacademy.com/forums/u/electron1)\
**Post date:** [April 27, 2016, 7:07am UTC](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/6 "2016-04-27T07:07:03Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/how-to-drop-all-raised-objection/31755/5):_

Thank you so much chr\_sue :)

I am putting the code here, which is working perfectly as per my expectation.

```verilog

virtual task run_phase(uvm_phase phase);
  uvm_objection objection;
  uvm_object object_list[$];
  TIMEOUT_TIMER_EXPIRED = 0;
  #(this.SYS_GLOBAL_TIMEOUT);

  // Fetching the objection from current phase
  objection = phase.get_objection();

  // Collecting all the objects which doesn't drop the objection 
  objection.get_objectors(object_list);
        
  // Dropping the objection forcefully
  foreach(object_list[i]) begin
    while(objection.get_objection_count(object_list[i]) != 0) begin
      objection.drop_objection(object_list[i]);
    end
  end
  TIMEOUT_TIMER_EXPIRED = 1;
endtask: run_phase

```
