V Test
V Test
// Factory Registration
`uvm_component_utils(ram_base_test)
//------------------------------------------
// METHODS
//------------------------------------------
end
if(has_ragent)
begin
//for read agent
// set is_active to UVM_ACTIVE
m_rd_cfg.is_active = UVM_ACTIVE;
// Get the virtual interface from the config database
if(!uvm_config_db #(virtual
ram_if)::get(this,"","vif",m_rd_cfg.vif))
`uvm_fatal("VIF CONFIG","cannot get()interface vif from
uvm_config_db. Have you set() it?")
//assign m_rd_cfg to m_tb_cfg.m_rd_cfg
m_tb_cfg.m_rd_cfg = m_rd_cfg;
end
// setting the env parameters
m_tb_cfg.has_wagent = has_wagent;
m_tb_cfg.has_ragent = has_ragent;
endfunction
if(has_wagent)
// Create the instance for ram_wr_agent_config
m_wr_cfg=ram_wr_agent_config::type_id::create("m_wr_cfg");
if(has_ragent)
// Create the instance for ram_rd_agent_config
m_rd_cfg=ram_rd_agent_config::type_id::create("m_rd_cfg");
super.build_phase(phase);
// create the instance for env
ram_envh=ram_tb::type_id::create("ram_envh", this);
endfunction
//------------------------------------------
// CLASS DESCRIPTION
//------------------------------------------
// Factory Registration
`uvm_component_utils(ram_single_addr_test)
//------------------------------------------
// CLASS DESCRIPTION
//------------------------------------------
// Factory Registration
`uvm_component_utils(ram_ten_addr_test)
//------------------------------------------
// CLASS DESCRIPTION
//------------------------------------------
// Factory Registration
`uvm_component_utils(ram_odd_addr_test)
//------------------------------------------
// CLASS DESCRIPTION
//------------------------------------------
// Factory Registration
`uvm_component_utils(ram_even_addr_test)