diff --git a/lib/emac/src/emac_top_jb.vhd b/lib/emac/src/emac_top_jb.vhd index 3e91db3..85cdb2b 100644 --- a/lib/emac/src/emac_top_jb.vhd +++ b/lib/emac/src/emac_top_jb.vhd @@ -110,14 +110,14 @@ registers_read: begin if rising_edge(CLK_I) then rx_ctrl_in.data_read <= '0'; - ACK_O <= rx_ctrl_out.data_vld; - DAT_O <= rx_dout; - if (STB_I and CYC_I) = '1' then + ACK_O <= '0'; + if CYC_I = '1' then + ACK_O <= STB_I and not WE_I; case ADDR_I(5 downto 2) is when "0000" => DAT_O <= (others => '0'); - ACK_O <= not WE_I; + DAT_O <= (others => '0'); DAT_O(31) <= tx_ctrl_in.tx_er; DAT_O(30) <= mii_rx_er; DAT_O(29) <= mii_col; @@ -126,13 +126,13 @@ registers_read: DAT_O(16) <= rx_ctrl_out.rx_vld; DAT_O(5) <= tx_int_en; DAT_O(4) <= rx_int_en; - when "0001" => - ACK_O <= not WE_I; DAT_O <= tx_ctrl_out.tx_size & rx_ctrl_out.rx_size; when "0010" => - rx_ctrl_in.data_read <= not WE_I; + rx_ctrl_in.data_read <= STB_I and not WE_I; + ACK_O <= rx_ctrl_out.data_vld; + DAT_O <= rx_dout; when others => null; end case;