diff --git a/top/firmware/hdl/LinkAggregator.vhd b/top/firmware/hdl/LinkAggregator.vhd index 18d34c787780d25db7ab54ce61a0e451e26342ed..351ccfd1860902acd0c0044260435cefd93cbea0 100644 --- a/top/firmware/hdl/LinkAggregator.vhd +++ b/top/firmware/hdl/LinkAggregator.vhd @@ -353,14 +353,17 @@ begin if packet_start = '1' then counter <= 0; else - counter <= counter + 1; + if counter = 64 then + counter <= counter; + else + counter <= counter + 1; + end if; end if; -- If counter is at the end of a packet, then start to readout the contents of the aggregated FIFOs - readout_reset <= '0'; - if counter = 64 then - counter <= counter; - elsif counter = 48 then + if counter = 48 then readout_reset <= '1'; + else + readout_reset <= '0'; end if; end if; end process pReadoutReset;