Commit b4d09c9e authored by Tristan Gingold's avatar Tristan Gingold Committed by Maciej Lipinski

sys_top_dma.vhd: clear fifo errors and max at the start of a transfer

parent 81d2b6d6
......@@ -159,11 +159,16 @@ begin
samples_valid_d <= samples_valid_i;
-- Fifo stats
if fifo_full = '1' and samples_valid_i = '1' and fifo_errs /= x"ff" then
fifo_errs <= fifo_errs + 1;
end if;
if unsigned(wr_count) > fifo_max then
fifo_max <= unsigned(wr_count);
if samples_start_i = '1' then
fifo_errs <= (others => '0');
fifo_max <= (others => '0');
else
if fifo_full = '1' and samples_valid_i = '1' and fifo_errs /= x"ff" then
fifo_errs <= fifo_errs + 1;
end if;
if unsigned(wr_count) > fifo_max then
fifo_max <= unsigned(wr_count);
end if;
end if;
end if;
......
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