Hi,
My tb architecture consists of xtn item,sequence,agent,agent_cfg,agent_top,scoreboard,env_cfg ,env,test.
I have got struck with respect to setting and getting config class objects.
Firstly i was having doubt with respect to usage of config class object.
1.Is it like good to have config class for each agent or single config is enough.
Yes i am aware that ,by keeping config class as dynamic it adds on to more flexibility like which agent is being active or dynamic and even for different virtual interface.
What are the other advantages and disadvantages?
2.If i have kept it as dynamic ,then how to set them and get them.
As of now i am trying with this method
//in agent_top
foreach(m_agent[i])
uvm_config_db #(master_agent_cfg)::set(this,$sformatf("m_agent[%0d]",i),"master_agent_cfg",e_cfg.m_cfg[i]);
//in agent
foreach(m_cfg[i])
(!uvm_config_db #(master_agent_cfg)::get(this,"","master_agent_cfg",m_cfg[i]))
The errors are as follows-
a.Getting errors here like null object access.
I cross checked this error as i had declared m_cfg as dynamic,but dint assign it using new operator.It got resolved.
Even after this,I am not getting the handle.
b.After debugging the above error,again i am getting error in the connect phase of agent.
drv_h.seq_item_port.connect(seqr_h.seq_item_export) //in this line
again the same error of null object access.
So the error does mean that .driver and sequencer are not created.I feel somewhere its related to m_cfg only.
Can anyone please help me on this issue?
Thanks & regards,
Shubham