Setting the Verbosity only for few /sequences/objects/interfaces in uvm?

How do I control the verbosity of certain components so that I can set a verbosity to only few of the components?

Lets say, for example in the verification of a particular feature, the test, few set of components/sequences/objects/interfaces etc are involved. I would like to set the verbosity of only these to be UVM_HIGH. I do not want to set the global severity to be set UVM_HIGH since lot of unrelated debug messages could come in which might increase the log size.

What would be a cleaner way of doing this? Its okay to use an additional commandline-plusarg for triggering this. Basically, the requirement would be that the test/components/sequences/objects/interfaces involved for a particular feature verification should take the global severity or the feature specific severity depending on which is higher.

Please note that one cannot use the built in report methods of uvm_component since, the uvm_info statements can be inside uvm_object extended classes as well as interfaces.

In reply to vvs3693:

For a certaim test you can call for a component ‘set_report_verbosity_level(UVM_HIGH)’ to set the verbosity to UVM_HIGH while setting for other components the verbosity to UVM_LOW by calling ‘set_report_verbosity_level(UVM_LOW)’ for these components.

In reply to chr_sue:

In reply to vvs3693:
For a certaim test you can call for a component ‘set_report_verbosity_level(UVM_HIGH)’ to set the verbosity to UVM_HIGH while setting for other components the verbosity to UVM_LOW by calling ‘set_report_verbosity_level(UVM_LOW)’ for these components.

I guess this can be used only for, uvm_component types; how do I do it for uvm_object/interfaces or say the sequences ?

In reply to vvs3693:

The method is defined in class ‘uvm_report_object’. This is a base class for both uvm_object and uvm_component (see the UVM Refernce Guide).
There are even more methods definded to deal with your problem.
Nice methods are also ‘set_report_severity_override’ and ‘set_report_severity_id_override’.

In reply to vvs3693:

You can set the verbosity for a particular message by using its ID.

  • set_report_severity_id_verbosity()
  • set_report_id_verbosity()

For classes not derived from uvm_report_object, which is mostly as the same a those derived from uvm_component, you need to set this using the global reporter, which is uvm_top.

Another option is to use a different context when reporting a message. And change the verbosity setting for that context. To use another context, you can do

obj.uvm_report_info("ID","MESSAGE",verbosity);

or

`uvm_info_context("ID","MESSAGE",verbosity,obj)

where obj is another object derived from uvm_report_object. That could be another component like the agent or sequencer where this sequence is running, or you could construct another object

class my_item extends uvm_sequence_item;
static uvm_report_object log=new("my_item");
...
`uvm_info_context("ID","message",UVM_HIGH,log)
// use my_item::log.set_report_verbosity_level(level);