When overriding UVM objects or components, the original type shall be a superclass of the override type. Sigasi Visual HDL warns you on attempts to override UVM objects by type when this condition is not met:
class base_object extends uvm_object; `uvm_object_utils(base_object); // ... endclass class my_object extends base_object; `uvm_object_utils(my_object); // ... endclass class my_component extends uvm_component; `uvm_component_utils(my_component) virtual function void build_phase(input uvm_phase phase); // Incorrect override of UVM object 'class base_object': expected derived class but was 'class my_component' uvm_factory::get().set_type_override_by_type(base_object::get_type(), my_component::get_type()); uvm_factory::get().set_type_override_by_type(base_object::get_type(), my_object::get_type()); // Incorrect override of UVM object 'class my_object': expected derived class but was 'class base_object' my_object::type_id::set_type_override(base_object::get_type()); base_object::type_id::set_type_override(my_object::get_type()); endfunction endclass
Note, that overrides by name (e.g. set_type_override("packet", "huge_packet")
) are not checked by this rule
Rule configuration
This rule can be disabled for your project, or its severity and parameters can be modified in the project linting settings. Alternatively, it can be manually configured with the following template:
151/severity/${path}={error|warning|info|ignore}