Hello all
In my TB In test.sv ,I have created a reg_model and assigned it to an instance of regmodel inside a config_object.sv and have set it using config_db.
In test.env
uvm_config_db #(ral_env_cfg)::set(this,"*","ral_env_cfg",ral_cfg);
in env
if(!uvm_config_db#(ral_env_cfg)::get(this,"","ral_env_cfg",ral_cfg))
`uvm_fatal("config","cannot get() ral_env_cfg. Have you set it ?")
else
`uvm_info(get_type_name(),"CONFIG WORKING",UVM_LOW)
In base_seq.sv
if(!uvm_config_db#(ral_env_cfg)::get(null,"","ral_env_cfg",ral_cfg))
`uvm_fatal("config","cannot get() ral_env_cfg in vbase_seq. Have you set it ?")
else
`uvm_info(get_type_name(),"CONFIG INSIDE SEQ WORKING",UVM_NONE)
m_pcie_rm = ral_cfg.m_pcie_rm;
//tried uvm_root::get() and this in the place of NULL
I have used the get method in env and base sequence. Env has worked properly but the get method in base_seq doesn’t work. I see env created before this fatal error occurred in the log file.