may I know how the ap aray created in build_phase can be accessed later.
uvm_analysis_port #(req_trans) ap_a[];
function void build_phase (uvm_phase phase);
..
..
for(int i = 0; i < num_of_agents; i++) begin
$sformat(inst_name, "req_agent[%0d]", i);
m_req_agent[i] = req_agent::type_id::create(inst_name, this);
ap_a[i] = new($sformatf("ap_a[%0d]",i), this);
end
function void connect_phase (uvm_phase phase);
for(int i = 0; i < num_of_agents; i++) begin
m_req_agent[i].ap_a.connect(this.ap_a[i]);
end
endfunction