3

I'm looking for ideas of how to disable a uvm_warning that occurs in the `uvm_object_utils macro.

UVM_WARNING @0: reporter [TPRGED] Type name 'xxx_packet' already registered with factory. No string-based lookup support for multiple types with the same type name.

I don't care about string-based lookup, and I'd like to be able to use the same class name in multiple tests (I'm using per-test packages to make this work). So I'd really like to disable this warning. However, even the command line disable doesn't seem to help.

I tried:

+uvm_set_action=*,TPRGED,UVM_WARNING,UVM_NO_ACTION

This works for other warnings, but in this case the warning seems to occur even before command line arguments are processed.

toolic
  • 57,801
  • 17
  • 75
  • 117

1 Answers1

3

These messages come because of static initializations; you will not be able to turn them off.

If you don't want to register string names with the factory, use the `uvm_object_param_utils macro instead of `uvm_object_utils. The only difference is that it does not register a string with the factory. See Parameterized Classes, Static Members and the Factory Macros for more information.

toolic
  • 57,801
  • 17
  • 75
  • 117
dave_59
  • 39,096
  • 3
  • 24
  • 63
  • 1
    Bless you Dave. I wish I'd asked earlier. I've been annoyed and uselessly tilting at those warnings for a few months now. I've tried every way I could think of to get my call to 'set_report_id_action' to happen earlier in the sim. – Ashley Winn Mar 08 '16 at 04:29