Considering a verification environment that imports 2 packages, pkg_A and pkg_B.
Both packages contain some common class definitions (i.e. same class name, class properties, etc.):
pkg_A.sv
class *some_name*;
`uvm_object_utils(*some_name*)
pkg_B.sv
class *some_name*;
`uvm_object_utils(*some_name*)
This makes the same class name to be registered to the factory twice, leading to:
UVM_WARNING @ 0: reporter [TPRGED] Type name some_name already registered with factory. No string-based lookup support for multiple types with the same type name.
Consider that both pkg_A and pkg_B have numerous class with same name. How can this be fixed?