In addition to the predefined phases available in uvm , the user has the option to add his own phase to a component. This is typically done by extending the uvm_phase class the constructor needs to call super.new which has three arguments
- name of the phase task or function
- top down or bottom up phase
- task or function
The call_task or call_func and get_type_name need to be implemented to complete the addition of new phase.
Example
class custom_phase extends uvm_phase;
function new();
super.new(“custom”,1,1);
endfunction
task call_task ( uvm_component parent);
my_comp_type comp;
if ( $cast(comp,parent) )
comp.custom_phase();
endtask
virtual function string get_type_name();
return “custom”;
endfunction
endclass