Hai All,
Iam setting and agent instance in env like this
agent agt;
sys_env env;
scoreboard sco;
sco = scoreboard :: type_id :: create("sco",this);
env = sys_env :: type_id :: create("sys_env",this);
agt = env.agt;
uvm_config_db #(agent)::set(this,"*","AGENT",agt);
and in my scoreboard iam getting like this
agent agt;
if(!uvm_config_db #(agent)::get(this,"*","AGENT",agt))begin
`uvm_fatal("message","message")
end
and iam not seeing fatal error in build phase rather during runtime when i try to access an memory inside my agent in a runtime task iam seeing a null reference error for the agent instance
data = agt.mem.read(address);
Error-[NOA] Null object access
dv/env/scoreboard.sv, 1328
The object at dereference depth 1 is being used before it was
constructed/allocated.
Please make sure that the object is allocated before using it