UVM_TEST

//======================================================================
//build_phase
//======================================================================
function void apb_timer_test:: build_phase(uvm_phase phase);
env_cfg=env_config::type_id::create(“env_cfg”);

// master_agent_config creation
if(env_cfg.has_apb_agent)
begin
apb_agent_cfg=apb_agent_config::type_id::create(“apb_agent_cfg”);
if(!uvm_config_db#(virtual apb_timer_if)::get(this,“”,“vif”,apb_agent_cfg.vif))
`uvm_fatal(“VIRTUAL_INTERFACE”,“getting unsuccessful”)
apb_agent_cfg.is_active=UVM_ACTIVE;
env_cfg.apb_agent_cfg=apb_agent_cfg;
end
super.build_phase(phase);

// env_creation
env_p=env::type_id::create(“env_p”,this);

// env_config setting
uvm_config_db#(env_config)::set(this,“*”,“env_config”,env_cfg);
endfunction

  1. why are we creating the agent configuration objects in test?
  2. env_cfg.apb_agent_cfg=apb_agent_cfg; why are we using this piece of code here ? (maybe connecting something)
  3. super.build_phase(phase); why are we referring to parent after creating the master_agent_configuration ?

can anyone please tell me, how to understand these things in uvm

Regards,
abhishek

In reply to abhishek403:

Have you gone through the Basic UVM course? All your questions will be answered there.

In reply to cgales:

Thanks cgales i will go through once and ill come back to you