Hi,
I am facing a problem with queue. I have two task and each starts simultaneously using fork.
In one task I am pushing the data into the queue while in another task i am waiting of posedge clock and popin the data. I see one data is missing in doing that,that is 2 packet out of 5 packets. Is that Data is missing or overwritten.
Can any one help in this.
Sceanrio:
class eth_monitor extend uvm_monitor;
virtual scb_interface scb_if;
ax_eth_item eth_q[$],rx_item;
event rcv_start;
`uvm_componenet_utils(eth_monitor)
task receive();
forever begin
fork
begin
receive_method(rx_item)
eth_q.push_back(rx_item);
->rcv_start;
end
send_to_scb();
join_none
end
endtask:receive
task send_to_scb();
ax_eth_item scb_item;
@rcv_start;
forever begin
scb_item = ax_eth_item::type_id::create("scb_item");
@posedge sc_if.clk;
scb_item = eth_q.pop_front();
// problem here when dispalyed i see only 4 packets instead of 5 packets,missing // is second packet
end
task main_phase();
receive();
endtask:main_phase
endtask:send_to_scb