How does uvm_component go to Clean-up phases from Run_phases?

In reply to dv_lee86:

The build phases and cleanup phases are implemented as functions, so they are all expected to complete in 0 time.

The run phases will consume time, so the UVM scheduler will fork these tasks in parallel. After forking the tasks, the UVM scheduler uses the objection mechanism to determine what tasks are still actively generating stimulus. When the stimulus tasks are finished and drop their objections, it will then kill all the remaining tasks that were forked. This mechanism allows drivers/monitors to execute in forever loops since they have no knowledge of when to finish.