How to drop all raised objection?

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?

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


In reply to Paresh:

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.

In reply to Paresh:

In reply to perumallatarun:

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?

In reply to electron:

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.

In reply to chr_sue:

Thank you so much chr_sue :)

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


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