I have connected monitor ports to scoreboard ports & getting transactions into scoreboard ports.
I have declared ports like below.
uvm_analysis_export #(svt_axi_transaction) axi_wr_analysis_export ;
uvm_analysis_export #(sv_transaction) axi_rd_analysis_export ;
uvm_tlm_analysis_fifo #(svt_axi_transaction) axi_wr_analysis_fifo ;
uvm_tlm_analysis_fifo #(sv_transaction) axi_rd_analysis_fifo ;
connect_phase:
axi_wr_analysis_export.connect(axi_wr_analysis_fifo.analysis_export) ;
axi_rd_analysis_export.connect(axi_rd_analysis_fifo.analysis_export) ;
fork
begin // Get AXI Write packet
forever begin
axi_wr_analysis_fifo.get(wr_axi_pkt) ;
uvm_report_info(get_full_name(),$psprintf("Packet read from WRITE FIFO = \n%s", wr_axi_pkt.sprint()),UVM_LOW);
axi_wr_asso_arr_pkt[wr_axi_pkt.id] = wr_axi_pkt;
uvm_report_info(get_full_name(),$psprintf("Packet read from WRITE Analys port = \n%s", axi_wr_asso_arr_pkt[wr_axi_pkt.id].sprint()),UVM_LOW);
uvm_report_info(get_full_name(),$psprintf("WR ID value = %0h, arr[id] = %0h", wr_axi_pkt.id,axi_wr_asso_arr_pkt[wr_axi_pkt.id]),UVM_LOW);
//axi_wr_asso_arr_pkt.delete() ;
end
end
begin // Get eead transaction and check
forever begin
axi_rd_analysis_fifo.get(rd_axi_pkt) ;
uvm_report_info(get_full_name(),$psprintf("Packet read from FIFO = \n%s", rd_axi_pkt.sprint()),UVM_LOW);
//uvm_report_info(get_full_name(),$psprintf("Packet read from Asso array = \n%s", axi_wr_asso_arr_pkt[rd_axi_pkt.awid].sprint()),UVM_LOW);
uvm_report_info(get_full_name(),$psprintf("RD FIFO ID value = %0h, arr[id] = %0h, awaddr = %0h, rdata = %0h", rd_axi_pkt.awid,axi_wr_asso_arr_pkt[rd_axi_pkt.awid],rd_axi_pkt.awaddr,rd_axi_pkt.rdata),UVM_LOW);
if(axi_wr_asso_arr_pkt.exists(rd_axi_pkt.awid)) begin
axi_checks(rd_axi_pkt, axi_wr_asso_arr_pkt[rd_axi_pkt.awid]) ;
end // Packet ID match in AXI write packets end
else
uvm_report_error(get_full_name(),$psprintf("AXI RD Packet is not found\n"));
end // Forever end
end
join
Issue :
if(axi_wr_asso_arr_pkt.exists(rd_axi_pkt.awid)) begin //This condition is not matching
Both values of rd_axi_pkt.awid and wr_axi_pkt.id are same.
So else part is executing.
uvm_report_error(get_full_name(),$psprintf("AXI RD Packet is not found\n"));
Can anyone help me on this.
Adding some debug comments :
uvm_report_info(get_full_name(),$psprintf("the size of Asso array = %0d", axi_wr_asso_arr_pkt.size()),UVM_LOW);
Result :
the size of Asso array_1 = 1 (1st forever begin loop)
the size of Asso array_2 = 0 (2nd forever begin loop)
Regards,
Raj