How uvm_phases work?

This may be a novice question, please bear with me.

I am aware of the different phases available in uvm_component. What I am trying to understand is when we write/override a task/funtion and gives argument as task run_phase**(uvm_phase phase)**; what role does this uvm_phase phase as argument play in making the task or function “phase aware” ?

In reply to debashis_paul:
It is possible to add user-defined phases that need may be synchronized to an existing phase, and used in multiple domains. The umm_phase argument is a handle to the actual phase after coordination among all the other domains. But even if you do not use any user-defined phases, you can thing of the phase argument as a singleton that represents the current phase state (or the this state)that is shared by all the other umm_components.

In reply to dave_59:

Thanks for your response Dave.

If i may state what i understood from your statements,

  1. If we give as argument (uvm_phase phase) to a user-defined task/function, than only it becomes phase aware.

I am unable to understand your statement “But even if you do not use any user-defined phases, you can think of the phase argument as a singleton that represents the current phase state (or the this state)that is shared by all the other umm_components.”

Please help more.

In reply to debashis_paul:
The user-defined task/function has to be virtual method known to the UVM phasing base classes. run_phase() already defined by the UVM. You can think of each phase as part of a finite-state machine and the uvm_phase argument to each phase method is an object that represents the state of that FSM.