Skip to content

Commit

Permalink
pcap: avoid pcap_fsm jumping in ACTV/DMA states before achieving the …
Browse files Browse the repository at this point in the history
…last IRQ state
  • Loading branch information
Shu ZHANG committed Sep 21, 2021
1 parent ae3894c commit d2d4f93
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/pcap/hdl/pcap_dma.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,11 @@ if rising_edge(clk_i) then
-- Position compare completed
elsif (pcap_completed = '1' and writing_sample = '0') then
last_tlp <= '1';
-- if last_tlp, wait for next buffer address assigned by PS
if (fifo_count = 0 and next_dmaaddr_valid = '1') then
pcap_fsm <= IRQ;
if (fifo_count = 0) then
-- if last_tlp, wait for next buffer address assigned by PS
if (next_dmaaddr_valid = '1') then
pcap_fsm <= IRQ;
end if;
else
dma_start <= '1';
sample_count <= sample_count + transfer_size;
Expand Down

0 comments on commit d2d4f93

Please sign in to comment.