Uvm_config_db set from module, get from testcase?

In reply to cgales:

In reply to jwatt_f:
The second argument to set() is not the module where the set() is being called. It is the ‘target’ instance name of where get() will be called.
In your top-level module, you should always target ‘uvm_test_top’. This is the name of the top-level class created by the run_test() call. In your test class, you should get() every item set in the top-level and place it in the required agent’s configuration object, and then pass the agent’s configuration object in the config_db, targeting the correct agent’s hierarchy.
The UVM Cookbook explains how to use the config_db correctly.

Thanks for the info!

The ::get is called in the testcase, the ::set in the top level module. I don’t have a config object, just the testcase and the instance of the class created at the top level.

I’ve reviewed the cookbook and it doesn’t describe what happens at the top (infers it).

So, in the module I’ve tried the following:
uvm_pkg::uvm_config_db#[[class typedef])::set(null, “[test_instance_name]”, “[name]”, [local_instance_value);
uvm_pkg::uvm_config_db#([class typedef])::set(uvm_root::get(), “[test_instance_name]”, “[name]”, [local_instance_value]);
uvm_pkg::uvm_config_db#([class typedef])::set(uvm_root::get(), “[instance_name_inside_test]”, “[name]”, [local_instance_value]);
uvm_pkg::uvm_config_db#([class typedef])::set(null, “uvm_test_top.*”, [instance_name_inside_test]", “[name]”, [local_instance_value]);

In the testcase:
uvm_pkg::uvm_config_db#([class typedef])::get(this, “”, “[testcase_instance_name]”, tc_local_var);
uvm_pkg::uvm_config_db#([class typedef])::get(this, “”, “[local_instance_name]”, tc_local_var);

None of the above works, still can’t find the handle.