UVM Phasing

function void phase_ready_to_end(uvm_phase phase);
 super.phase_ready_to_end(phase);
 if(phase.get_imp() == uvm_shutdown_phase::get()) begin
 if (run_count <= `no_of_runs) begin
 phase.jump(uvm_pre_reset_phase::get());
 run_count++;
 end
 end 
 endfunction

In the above piece of code, what is the actual meaning and purpose of phase.get_imp( ) and also what is the shutdown phase exactly? According to the above code when will the reset phase be called and how does this actually work? I tried to search for resources to understand this but I dint quite get it properly. Could someone please explain this?

In reply to Muthamizh:
Phase jumping is for the most advanced users. We recommend using sequences to structure the execution of your tests. As you have found, there is very little documentation on phases, so you have to be good at reading the source code.

Each UVM phase has a singleton object that you access with the static method get(). For the most part, get_imp() returns the same singleton object as what was passed through the phase argument. So what this code is doing is checking if shutdown_phase is ready to end, and if so, jump back to the pre_reset_phase until the run_count has reached no_of_runs.

The meaning of the shutdown phase is described here. It is an ad-hoc definition, which is another reason we recommend using sequences instead.