I see weird behavior of message verbosity control functions.
- set_report_verbosity_level()
- set_report_verbosity_level_hier()
- set_report_id_verbosity_level()
- set_report_id_verbosity_level_hier()
set_report_verbosity_level() affects sub components if it is called before sub components’ instantiation, which is not expected behavior. It should control only that component layer in which it is called.
set_report_id_verbosity_level_hier() is not effective to the messages in sub components if it is called before sub components’ instantiation. Therefore, it must be called after build_phase() if we want control message verbosity in the components lower than 2 layers below. Hence, the message verbosity inside build_phase in that components is not controlled.
Are these bugs of UVM(1.2)?
Here is an example environment of EDA Playground. Test class tries to control the message verbosity of its sub components.
You can comment out lines marked by ######
virtual function void build_phase(uvm_phase phase);
//this.set_report_verbosity_level (UVM_LOW); // ###### !!!!, All messages are disabled.
//this.set_report_id_verbosity_hier("MSG_ENV" , UVM_LOW); // ###### !!!!, MSG_ENV is not disabled.
//this.set_report_id_verbosity ("MSG_TEST" , UVM_LOW);
env = my_env::type_id::create("env", this);
//this.set_report_id_verbosity_hier("MSG_ENV" , UVM_LOW); // !!! Effective after instance creation
//this.set_report_verbosity_level_hier (UVM_LOW);
//this.set_report_verbosity_level (UVM_LOW); // !!! Need to set this after sub-component creation
//this.set_report_id_verbosity_hier("MSG_AGENT", UVM_LOW); // ###### !!!!, MSG_AGENT is not disabled.
`uvm_info("MSG_TEST", "Test build phase executed", UVM_MEDIUM)
endfunction