Hi,
I’m new to handling multi env in single testbench.
one env is apb env another one is main env.
Inside the user_defined_apb_env, i set the ral model using config db like below
if (model == null) begin
model = ral_model::type_id::create("model");
model.build();
model.set_hdl_path_root(hdl_path);
model.lock_model();
end
uvm_config_db#(uvm_reg_block)::set(this,"user_defined_apb_env.*", "regmodel", model)
in base test , again i set the ral block using config data base like below.
ral_block_pro m_model;
function void connect_phase(uvm_phase phase);
m_model = main_env_inst.apb_env_inst.model;
if(!$cast(m_model, this.m_model))
`uvm_fatal(get_type_name(),"can't get ral model");
uvm_config_db#(ral_block_pro)::set(null, "*","REG_MODEL",m_model);
endfunction
==================================================
in scoreboard, i need to access ral block so i tried like below
ral_block_pro m_model;
function void connect_phase(uvm_phase phase);
if(!uvm_config_db#(ral_block_pro)::get(null,"","REG_MODEL",m_model))
`uvm_error("", "could not get ral block inside scoreboard"
endfunction
am getting below fatal error.
could not get ral block inside scoreboard
Please help me on this.