In reply to mitesh.patel:
In reply to Muthamizh:
Because, write method from monitor is called outside the forever begin. ideally when, you sampled anything from interface it should be write to analysis port.
please find the link, it is showing packet received messages from scoreboard.
Link:-
Edit code - EDA Playground
Thank you so much. It is very very helpful. Thanks a lot