In reply to bmaassar:
In reply to chr_sue:
Yes, so out_pkts come from an agent.monitor.port. I connected this agent.monitor.port to file log subscribers and the outputs to the files look correct. Then, there’s no problem with the port.
Each agent.monitor.port is connected to the analysis_export of a subscriber (part of the scoreboard) extended from the uvm_subscriber class. I added prints for every write that is being done and I don’t see duplicates. Then, there shouldn’t be a problem with the subscriber.
The uvm_analysis_port of the subscriber is connected to the analysis_export of the fifo_out, and as mentioned, the try_peek exposes the duplicates in the fifo, so it must be one of the fifo and/or its axp!
I’m only showing the parts of the code where the packets are monitored and logged on the output. The input generation, monitoring and prediction work fine.
There is data available in the log-file, for the purposes of the blog I wrote “packet A info”, instead of the actual data, which is there…
I’m using get, as shown in the code provided in the question:
fifo_out[link_id].get(pkt_item);
I guess your problem is caused by the try functions. Becaus it looks only if there is an item or not. Using get is always waiting for the next item. It is blocking. Using try_peek or try_get might show the same item several times.