Forever loop break

In reply to cuonghl:

Hi Cuonghl

Are you trying to say that regardless of the implementation in the run phase, the run phase should terminate at some point of time during the simulation and the execution proceeds to extract phase? Please consider the code below. What makes the forever loop break? My understanding is, the execution should get stuck forever inside the loop as get method is blocking. It should not return unless the item is available in the fifo and hence the execution should get stuck forever. If i remove the int_fifo.get(), then the execution remains inside the forever loop indefinitely. Any pointers will be appreciated!!!

uvm_tlm_analysis_fifo #(gpio_sequence_item) 	 int_fifo;
...
task evsock_alarm_center::run_phase(uvm_phase phase);	   
   forever begin		     
     int_fifo.get(gpio_item);	              
   end
endtask