Uvm test never ends even with the phase.raise_objection/phase.drop_objection mecanism in the test run_phase

Hello, i am facing issues finishing a test in uvm tb, i have the objection mecanism in the run_phase of the test, but it does not stop the test. This is the test class that i am using.
class serdes_base_test extends uvm_test;

serdes_virtual_base_sequence h_base_sequence;
virtual task run_phase (uvm_phase phase);
endtask : main_phase
virtual function void raise_objection(uvm_phase phase);
endfunction : raise_objection
virtual function void drop_objection(uvm_phase phase);
endfunction : drop_objection
endclass : serdes_base_test

//---------------- Serdes Directed Test -------------------
class lb_cs_direct_ds_direct_test extends serdes_base_test;

lb_cs_direct_ds_direct_same_config_all_ds_1 h_seq;
function new(string name = “lb_cs_direct_ds_direct_test”,uvm_component parent);
endfunction : new
virtual task create_and_start_virtual_sequence();
h_seq = lb_cs_direct_ds_direct_same_config_all_ds_1 :: type_id :: create (“h_seq”);
endtask : create_and_start_virtual_sequence

endclass : lb_cs_direct_ds_direct_test

I added to the virtual sequence the starting_phase.raise/drop_objection and the result is the same, i realized in the post_body section starting_phase is always null so that is why the objection does not drop. This is part of the virtual sequence i am using.

class serdes_virtual_base_sequence extends uvm_sequence;

serdes_sequence h_seq;

virtual task pre_body();
if(starting_phase != null)
	  starting_phase.raise_objection(this, {"Raising Objection for sequence '",get_full_name(), "'"});
endtask : pre_body

virtual task body();
endtask : body
virtual task post_body();
if(starting_phase != null)
starting_phase.drop_objection(this, {“Dropping Objection for sequence '”,get_full_name(), “'”});
endtask : post_body
virtual task generate_stimulus();
repeat(h_chip_config.trans_count) begin
endtask : generate_stimulus
virtual task start_serdes_sequence();
endtask : start_serdes_sequence
endclass : serdes_virtual_base_sequence

//------- Serdes_Virtual_Direct_Sequence --------
class lb_cs_direct_ds_direct_same_config_all_ds_1 extends serdes_virtual_base_sequence;
uvm_object_utils(lb_cs_direct_ds_direct_same_config_all_ds_1) //------------------------------------------------ function new(string name = "lb_cs_direct_ds_direct_same_config_all_ds_1"); super.new(name); endfunction : new //------------------------------------------------ virtual task start_serdes_sequence(); fork begin for(int i=0; i < NUMBER_OF_DATA_SLICES; i++) begin
int j = i;
`uvm_do_on_with(h_seq,p_sequencer.h_ds_tx_sequencer[j],{h_seq.data_l == 40’hAAAAAAAAAA;})
wait fork;
endtask : start_serdes_sequence
endclass : lb_cs_direct_ds_direct_same_config_all_ds_1

I have tried removing the pre_body/post_body section and including the raise/drop mecanism in the body but the resul is the same. The driver is reporting item_done to the sequencer too. This is the run_pase in the driver

virtual task run_phase(uvm_phase phase);
forever begin
endtask // run_phase

Can anyone give me ideas in how to solve this problem? Thank you

In reply to jcaballero1987:

You should only have one objection, and this should be at the test level. Raise the objection at the start of the test’s run_phase(), and drop the objection when all the test sequences have completed. Remove all other objections.

In reply to cgales:

Hi cgales,

Thank you so much for your answer, that was my first step, just to have the objection in the run_phase of the test, i know if i have it here i don’t need it in the sequence but it does not stop the test.
I added the objection to the sequence just to see if the result was different.

Could you give me any other idea to fix the problem?

Thank you so much

In reply to jcaballero1987:

Are you sure that your sequence is completing? If you have only one objection, then the run_phase() should finish as soon as it is dropped.

You can use the +UVM_OBJECTION_TRACE on your command line, but it can be somewhat verbose.

In reply to cgales:

Hi cgales,

Thank you for your help, using UVM_OBJECTION_TRACE i realized what the problem was. I was raising an objection in the scoreboard when receiving a pkt and dropping it when the pkt was processed, i just didn’t realize that i was waiting to receive 35 pkts(because i have to do aligment) before processing the first one, so at the end of the test i had 34 raised objections preventing the tb to finish.

Thank you again