Uvm_config_db does not give error message when setting to wrong hier

Hi,

I was attempting to set default sequence to the wrong hierarchy.


uvm_config_db#(uvm_object_wrapper)::set(this, "env.apb_mstr_vsqr.main_phase", "default_sequence", usb_phy_reg_basic_read_write_virt_seq::type_id::get());

But the env does not have apb_mstr_vsqr and there is no error message for this default.
And the test was passing without running the test sequence.
Is there any way to get this error message?

In reply to sri205:

Since uvm_config_db set() calls are typically made in the build_phase(), there is no way of knowing what the hierarchy looks like. This makes it very difficult in determining what is set in error.

Also, you should NEVER use the default_sequence. It is very difficult to debug (as you discovered), and can cause unintended difficulties. Instead, you should start() your sequences in your test sequence.

Additionally, you should NEVER use any phase other than the run_phase(). By keeping everything in the run_phase(), you maintain compatibility with other IPs and environments.

In reply to sri205:

Hi,
I was attempting to set default sequence to the wrong hierarchy.


uvm_config_db#(uvm_object_wrapper)::set(this, "env.apb_mstr_vsqr.main_phase", "default_sequence", usb_phy_reg_basic_read_write_virt_seq::type_id::get());

But the env does not have apb_mstr_vsqr and there is no error message for this default.
And the test was passing without running the test sequence.
Is there any way to get this error message?

The config_db does not have a checking mechanism. You can put in to the config_db a value to a hierarchy whicj does not exist and it is not complaining.

Hi @cgales and @chr_sue
Thanks a lot for your suggestions. Also can +UVM _ CONFIG _ DB _ TRACE help in this case ?

Regards,
Sri

In reply to sri205:

You can call on an object print_config or print_config_with_audit in you UVM code.
And +UVM_CONFIG_DB_TRACE turns on tracing of configuration DB access. Users simply need to put the argument on the command line.