diff --git a/lib/emac/src/emac_rx.vhd b/lib/emac/src/emac_rx.vhd index 918635b..3c1ef2b 100644 --- a/lib/emac/src/emac_rx.vhd +++ b/lib/emac/src/emac_rx.vhd @@ -267,7 +267,11 @@ byte_counter: begin if rising_edge(mii_rx_clk) then if byte_count_rst = '1' then - byte_count <= (others => '0'); + if fcs_chk_en = '0' then + byte_count <= to_unsigned(0, RAM_ADDR_WIDTH); + else + byte_count <= unsigned(to_signed(-4, RAM_ADDR_WIDTH)); + end if; elsif sipo32_en = '1' and sipo32_din_vld = '1' then byte_count <= byte_count + 1; end if;