bradpinn Posted March 7, 2023 Report Share Posted March 7, 2023 Hello Kindly support with the following question: Considering a verification environment that imports 2 packages, pkg_A and pkg_B. Both packkages contain some common class definitions (i.e. same class name, class properties, etc.): pkg_A.sv pkg_B.sv class some_name; class some_name; `uvm_object_utils(some_name) `uvm_object_utils(some_name) ,,,, ... This makes the same class name to be registered to the factory twice, leading to the : 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? Thank you Quote Link to comment Share on other sites More sharing options...
bcassell Posted March 8, 2023 Report Share Posted March 8, 2023 The easy answer is don't wildcard import packages, ever! Except for uvm_pkg. As for `uvm_object_utils , if you add package scoping that'll resolve your issue. `uvm_object_utils(pkg_A::some_name) More detail provided here:https://blog.verificationgentleman.com/2015/12/06/packages-class-names-and-uvm.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.