In reply to ravichandrareddyp:
Hi,
One possible solution I think of is to use macro as mentioned below,
uvm_analysis_imp_decl(_agent1_tran) uvm_analysis_imp_decl(_agent2_tran)
class agent3 extends uvm_agent;
…
/* analysis import for received Agent1 transaction */
uvm_analysis_imp_agent1_tran #(A1_TRAN,agent3 ) agnt1_export;
/* analysis import for received Agent2 transaction */
uvm_analysis_imp_agent2_tran #(A2_TRAN,agent3 ) agnt2_export;
…
…
function new(string name=“”, uvm_component parent=null);
super.new(name, parent);
agnt1_export=new(“agnt1_export”,this);
agnt2_export=new(“agnt2_export”,this);
endfunction: new
function write_agent1_tran(A1_TRAN);
//Transaction received from Agent1
endfunction
function write_agent2_tran(A2_TRAN);
//Transaction received from Agent2
endfunction
endclass
Provide connection of Agent1 and Agent2 ports with declared analysis_imports of Agent3.