Uvm_config_db set from module, get from testcase?

In reply to jwatt_f:

In your top-level module, you should set the value with:


uvm_config_db#(data_type)::set(null, "uvm_test_top", "DATA_NAME", data_handle);

In your testcase, you should get the value with:


if (!uvm_config_db#(data_type)::get(this, "", "DATA_NAME", data_handle))
  `uvm_error(get_full_name(), "Unable to get DATA_NAME");

For a parameterized class, create a typedef of the class with the required parameter and use the typedef as ‘data_type’.