Viktorinox
Viktorinox

Reputation: 140

uvm_sequence_item get_type_name should be virtual

Looking at the uvm base classes, I noticed uvm_sequence_item method get_type_name is not defined as virtual. That means if I have a derived class that is downcasted to uvm_sequence_item handle, then get_type_name call on this handle will return wrong value ?

Upvotes: 1

Views: 409

Answers (1)

Matthew
Matthew

Reputation: 13977

get_type_name is virtual in 1.2. Here is an excerpt of the source code of uvm_object:

virtual function string get_type_name (); return "<unknown>"; endfunction

get_type_name is not overridden in uvm_sequence_item. (So where are you getting your information?) Even if it were, you do not have to label a method as virtual if the base-class method is virtual.

Upvotes: 1

Related Questions