UVM_DRIVER completion

Hi, can anyone please explain me how the forever loop in run task of uvm_driver breaks? Since the forever thread is running, I was wondering, how simulation ends?

In reply to debashis_paul:

Through the

phase.drop_objection()

call inside your uvm test.

In reply to debashis_paul:

Hi, can anyone please explain me how the forever loop in run task of uvm_driver breaks? Since the forever thread is running, I was wondering, how simulation ends?

The driver forever loop breaks when no seq_items will be generated. The get_next_item/get call is blocking and stops the forever loop.

In reply to chr_sue:

In reply to debashis_paul:
The driver forever loop breaks when no seq_items will be generated. The get_next_item/get call is blocking and stops the forever loop.

Hi chr_sue,

as get_next_item is a blocking call, so it will keep waiting till a new sequence/object is available. and my understanding is that it will keep waiting inside the forever loop, and hence the forever thread will be continuously alive.
I am unable to understand, how the forever loops break? Please help

In reply to debashis_paul:

When the UVM run_phase() starts, the UVM scheduler will fork off every registered components run_phase(). This is how the run_phase() in your driver starts.

As part of the run_phase() in your test, an objection will be raised prior to starting sequences. When all of the test sequences have completed, the objection will be dropped. When the UVM scheduler has determined that all outstanding objections for a phase have been dropped, it will kill all of the run_phase() tasks that were forked at the start. The killing of these run_phases() is what causes your driver to stop. The forever block never exits.