Regarding uvm_config_db

In reply to chr_sue:

hi,
Im trying to integrate my ral files with environment
i set this config db in top module

uvm_config_db#(reg_block)::set(null,“uvm_test_top”,“reg_model”,reg_model_v);

then , im getting it at test case:

if(!(uvm_config_db#(reg_block)::get(null,“”,“reg_model”,reg_model))) begin
uvm_fatal({get_full_name(),"::build_phase"},"RAL CONFIG OBJ GET FAILED") end reg_model=reg_block::type_id::create("reg_model",this); if(!(uvm_config_db#(reg_block)::set(this,"*","reg_model_v",reg_model))) begin uvm_fatal({get_full_name(),“::build_phase”},“RAL CONFIG OBJ SET FAILED”)
end
and then this to reg_env:

if(!(uvm_config_db#(reg_block)::get(this,“”,“reg_model_v”,reg_model_env))) begin
`uvm_fatal({get_full_name(),“::build_phase”},“CONFIG OBJ GET FAILED”)
end
…thanks in advance for the solution