If I define a few phases in base test but done’t override them in extended test ::
class Base_test extends uvm_test ;
`uvm_component_utils(Base_test)
function void build_phase ( uvm_phase phase ) ;
$display("In build_phase of base test ");
super.build_phase(phase) ;
// May contain config_db::get()
endfunction
function void connect_phase ( uvm_phase phase ) ;
$display("In connect_phase of base test ");
super.connect_phase(phase) ;
endfunction
endclass
class Ext_test extends Base_test ;
`uvm_component_utils(Ext_test)
endclass
[1] So if I run Ext_test will the base class phases be called ( Ext class with inherit all methods of base class )?
(2) Also I have a vague memory of having read a question on this forum regarding the phase argument used in all phases .
I remember reading that they weren’t necessary for all phases ? Is it true with uvm 1.2 too ?
(3) If user doesn’t call super.xyz_phase(phase) in any user-defined base component ( like base test above ) extended from uvm base component ( like uvm_test above ) , can it ever cause an issue ? . Is it possible its required in certain scenarios ? Or can it be skipped in total
The UVM phases follow the same rules of any virtual method—the most derived overridden method gets called.
All of the UVM phases require the exact same argument prototypes—another rule of any virtual method. It’s just that the non-time-consuming function based phases like build_phase have no practical use for the argument. They put it there just there for cosmetic uniformity.
[1] So if I run Ext_test will the base class phases be called ( Ext class with inherit all methods of base class )?
Yes If you don’t override the method in child class then it use the base class method if method is virtual(phase methods are virtual).
(2) Also I have a vague memory of having read a question on this forum regarding the phase argument used in all phases .
I remember reading that they weren’t necessary for all phases ? Is it true with uvm 1.2 too ?
Phase argument is require in all phase.
(3) Also calling super.xyz_phase(phase) isn’t required for all user-defined base components ( like base test above ) extended from uvm base components ( like uvm_test above ) , right ? . Can it ever give an issue ?
You don’t need to override every phase method. so no need of super.xyz_phase(phase) for every phase.
Whatever you have done in your base_test is correct. there is no need of explicit start_of_simulation_phase method. so no super.start_of_simulation_phase(phase).