Hi,
Please help me out for the below issue.
Below virtual function is getting called three times for valid packet(if condi), two times for droping packet(else condi).when I try to print count1,count2 for each call, It is giving same value not incrementing…
virtual function int get_canDrop(uvm_transaction posted);//DROP_LOGIC, override function
static int count1,count2;
if(rx_misc_intf.rxif_prev_partial_pkt_drop_cnt_sb==rx_misc_intf.rxif_partial_pkt_drop_cnt)begin
count1 ++;
`uvm_info("RX_SB",$sformatf("count1 %0d",count1),UVM_LOW)
`uvm_info("RX_SB",$sformatf("no drop in pkt, previous partilal drop %0d rx_misc_intf %0d at time %0t",rx_misc_intf.rxif_prev_partial_pkt_drop_cnt_sb,rx_misc_intf.rxif_partial_pkt_drop_cnt,$time),UVM_LOW)
return 0;
end
else begin
count2 ++;
`uvm_info("RX_SB",$sformatf("count2 %0d",count2),UVM_LOW)
`uvm_info("RX_SB",$sformatf("pkt dropped partially previous, partilal drop %0d rx_misc_intf %0d at time %0t",rx_misc_intf.rxif_prev_partial_pkt_drop_cnt_sb,rx_misc_intf.rxif_partial_pkt_drop_cnt,$time),UVM_LOW)
return 1;
end
endfunction