From: Ingo Froehlich Date: Thu, 7 Feb 2019 13:03:22 +0000 (+0100) Subject: fixed timeout error X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=69807ec3100424a125c833bb79fbb2ca9f4ae876;p=trbnet.git fixed timeout error --- diff --git a/media_interfaces/sync/sci_reader.vhd b/media_interfaces/sync/sci_reader.vhd index e450e2b..61c9e3f 100644 --- a/media_interfaces/sync/sci_reader.vhd +++ b/media_interfaces/sync/sci_reader.vhd @@ -113,8 +113,6 @@ begin end if; when SCTRL => if sci_reg_i = '1' then - --BUS_TX.data <= MEDIA_STATUS_REG_IN(32*(to_integer(unsigned(BUS_RX.addr(4 downto 0))))+31 downto 32*(to_integer(unsigned(BUS_RX.addr(4 downto 0))))); - --BUS_TX.ack <= '1'; LOC_BUS_RX.read <= BUS_RX.read; LOC_BUS_RX.write <= BUS_RX.write; SCI_WR <= '0'; @@ -140,7 +138,7 @@ begin sci_state <= IDLE; when GET_WA => - if cnt = 4 then + if cnt = 4 or BUS_RX.read = '1' or BUS_RX.write = '1' then cnt := 0; sci_state <= IDLE; else @@ -152,17 +150,27 @@ begin end if; when GET_WA_WAIT => sci_state <= GET_WA_WAIT2; + if BUS_RX.read = '1' or BUS_RX.write = '1' then + sci_state <= IDLE; + end if; when GET_WA_WAIT2 => sci_state <= GET_WA_FINISH; + if BUS_RX.read = '1' or BUS_RX.write = '1' then + sci_state <= IDLE; + end if; when GET_WA_FINISH => wa_position(cnt*4+3 downto cnt*4) <= SCI_RDDATA(3 downto 0); sci_state <= GET_WA; cnt := cnt + 1; + if BUS_RX.read = '1' or BUS_RX.write = '1' then + sci_state <= IDLE; + end if; end case; --- if (BUS_RX.read = '1' or BUS_RX.write = '1') and sci_state /= IDLE and sci_reg_i = '0' then --- BUS_TX.nack <= '1'; BUS_TX.ack <= '0'; --- end if; + if (BUS_RX.read = '1' or BUS_RX.write = '1') and sci_state /= IDLE and sci_reg_i = '0' then + BUS_TX.nack <= '1'; + BUS_TX.ack <= '0'; + end if; end process;