Hi UVM forum,
Hi have class named packet_object that extends uvm_object.
many other classes extend packet_object and each one of them do something else.
I want to make sure that each class implements certain methods.
I use interface class to do it and it works, but I am little bit concern that this method is not so common.
Is there a better and more conventional way to do it?
class interface packet_must;
pure virtual function string get_packet_name();
endclass
class packet_object extends uvm_object implements packet_must;
...
virtual function string get_packet_name(); end_function
endclass
class packet_eth extends packet_object implements packet_must;
...
virtual function string get_packet_name();
return "packet eth";
endfunction
endclass