Commit 221a6143 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wr_mini_nic: go through RX_MEM_FLUSH only when needed

Otherwise we do twice the same write to memory and we permanently lose one
nrx_avail. This way, after some time minic may drop frames because it will think
its buffer has not enough space (based on nrx_avail value).
parent a1075fd9
......@@ -809,8 +809,12 @@ begin -- behavioral
--nrx_error <= '1' when nrx_stat_error='1' or nrx_avail=to_unsigned(0, nrx_avail'length) else '0';
nrx_done <= '1';
-- flush the remaining packet data into the DMA buffer
nrx_state <= RX_MEM_FLUSH;
-- flush the remaining packet data into the DMA buffer if needed
if(nrx_toggle='1') then
nrx_state <= RX_MEM_FLUSH;
else
nrx_state <= RX_UPDATE_DESC;
end if;
if(nrx_valid = '1' or nrx_toggle = '1') then
if nrx_mem_a + 1 >= nrx_bufstart + nrx_bufsize then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment