Duplicate items in uvm_tlm_analysis_fifo used in scoreboard

In reply to chr_sue:
Thank you for the quick reply.
The intent is to log packets on all output links in parallel, there’s a fifo and queue associated with each link based on index link_id so it is passed. The first begin is there because I run this “output packets thread” in parallel with an “input packets thread” using another fork-join not shown. The fork-join in the shown piece code might be redundant; it was added while debugging just in case.
The link_id is in the in the printout. In the example shown it’s zero and all packets go come out of the same link. I see different values being printed in my transcript so it’s being passed correctly.

I just tried the following btw:
After fifo_out[link_id].get(pkt_item); in the provided code, I do


fifo_out[link_id].get(pkt_item);
if (fifo_out[link_id].try_peek(pkt_item2))
 `uvm_info($sformatf("SCOREBOARD: peeking at fifo %0d after a get", link_id), pkt_item2.convert2string(), UVM_LOW)
    else
          `uvm_info("SCOREBOARD:", "try_peek failed", UVM_LOW)

      #1ns;
      `uvm_info($sformatf("SCOREBOARD: Read a packet out[%0d]:", link_id),  pkt_item.convert2string(), UVM_LOW)

Result sample:


# UVM_INFO scoreboard.svh(458) @ 2341646000: uvm_test_top.m_env.sb [SCOREBOARD: peeking at fifo 0 after a get] packet A info
# UVM_INFO scoreboard.svh(463) @ 2341647000: uvm_test_top.m_env.sb [SCOREBOARD: Read a packet out[0]:] packet A info
# UVM_INFO scoreboard.svh(460) @ 2341647000: uvm_test_top.m_env.sb [SCOREBOARD:] try_peek failed
# UVM_INFO scoreboard.svh(463) @ 2341648000: uvm_test_top.m_env.sb [SCOREBOARD: Read a packet out[0]:] packet A info

So there must be something wrong with that fifo_out and/or axp_pkt_out!