port (
SYSTEM_CLK : in std_logic;
- TX_CLK : in std_logic;
+ TX_CLK : in std_logic;
RX_CLK : in std_logic;
RESET : in std_logic;
RXD : in std_logic_vector(15 downto 0);
elsif SYNCH_CURRENT = NORMAL_OPERATION_2 then
fifo_data_in <= '0' & (not RX_K(0)) & RXD;
elsif SYNCH_CURRENT = NORMAL_OPERATION_1 then
- fifo_data_in <= '0' & (not RX_K(1)) & RXD(7 downto 0) & RXD(15 downto 8);
+ fifo_data_in <= '0' & (not RX_K(1)) & rxd_synch_i(7 downto 0) & RXD(15 downto 8);
else
fifo_data_in <= (others => '0');
end if;
rx_rst_i <= '0';
resync_counter_up <= '0';
resync_counter_clr <= '1';
- if rxd_synch_i = x"bc50" then
- SYNCH_NEXT <= WAIT_1;--NORMAL_OPERATION_1;--WAIT_1;
- elsif rxd_synch_i = x"50bc" then
+-- if rxd_synch_i = x"bc50" then
+-- SYNCH_NEXT <= WAIT_1;--NORMAL_OPERATION_1;--WAIT_1;
+ --els
+ if rxd_synch_i = x"50bc" or rxd_synch_i = x"c5bc" then
SYNCH_NEXT <= WAIT_2;--NORMAL_OPERATION_2; --WAIT_2;
else
SYNCH_NEXT <= RESYNC1;
rx_rst_i <= '0';
resync_counter_up <= '0';
resync_counter_clr <= '1';
- if rxd_synch_i = x"bc50" and rx_k_synch_i(1) = '1' then
- SYNCH_NEXT <= WAIT_1;--NORMAL_OPERATION_1;
- elsif rxd_synch_i = x"50bc" and rx_k_synch_i(0) = '1' then
+-- if rxd_synch_i = x"bc50" and rx_k_synch_i(1) = '1' then
+-- SYNCH_NEXT <= WAIT_1;--NORMAL_OPERATION_1;
+ --els
+ if (rxd_synch_i = x"50bc" or rxd_synch_i = x"c5bc") and rx_k_synch_i(0) = '1' then
SYNCH_NEXT <= WAIT_2;--NORMAL_OPERATION_2;
else
SYNCH_NEXT <= IDLE;
fsm_debug_register(2 downto 0) <= "011";
resync_counter_up <= '1';
resync_counter_clr <= '0';
- if resync_counter(27) = '1' and rxd_synch_i = x"bc50" and rx_k_synch_i(1) = '1' then
+ if resync_counter(27) = '1' and (rxd_synch_i = x"bc50" or rxd_synch_i = x"bcc5") and rx_k_synch_i(1) = '1' then
SYNCH_NEXT <= NORMAL_OPERATION_1;
elsif resync_counter(26) = '1' and (rxd_synch_i /= x"bc50" or rx_k_synch_i(1) = '0') then
SYNCH_NEXT <= RESYNC1;
fsm_debug_register(2 downto 0) <= "011";
resync_counter_up <= '1';
resync_counter_clr <= '0';
- if resync_counter(27) = '1' and rxd_synch_i = x"50bc" and rx_k_synch_i(0) = '1' then
+ if resync_counter(27) = '1' and (rxd_synch_i = x"50bc" or rxd_synch_i = x"c5bc") and rx_k_synch_i(0) = '1' then
SYNCH_NEXT <= NORMAL_OPERATION_2;
- elsif resync_counter(26) = '1'and (rxd_synch_i /= x"50bc" or rx_k_synch_i(0) = '0') then
+ elsif resync_counter(26) = '1'and (rxd_synch_i(7 downto 0) /= x"bc" or rx_k_synch_i(0) = '0') then
SYNCH_NEXT <= RESYNC1;
else
SYNCH_NEXT <= WAIT_2;