Reputation: 21
I encountered an issue when setting verbosity for an object in component. I want to set the verbosity of specific components (uvm_test_top.env.subenv_a) to UVM_HIGH, command line argument is as below:
1.+UVM_VERBOSITY=UVM_LOW
2.+uvm_set_verbosity=*subenv_a*,_ALL_,UVM_HIGH,build,0
The object (object_a) will do some configurations in build phase of component: subenv_a.
I didn't saw the UVM_HIGH info in object_a is printed and the UVM_HIGH info for all the components in component subenv_a will be printed.
Seems that command "+uvm_set_verbosity" just take effect on component,but not object in component.
So what should i do to print UVM_HIGH info for an object in component.
Thanks Ken
Upvotes: 2
Views: 2500
Reputation: 42623
Only classes derived from uvm_component
have knowledge of their parentage. By knowledge I mean uvm_component
is set up to link parents with children as a database that can be traversed via a named hierarchy. You can:
object_a
from uvm_report_object
instead of uvm_object
. Then from your component, do object_a_h.set_report_handler(get_report_handler);
. Now all messages from object_a
appear as if they came from your component and share the same report settings.this
as a context to your object_a
, and use the uvm_info_context()
macros instead of uvm_info
. This has the same effect as above.object_a
and add a extra +uvm_set_verbosity
switch for that ID.object_a
from uvm_component
instead of uvm_object
and make your component its parent. This might be the simplest solution, but has the most overhead if there many of these objects.Upvotes: 3