process (clk, reset)
begin
- if (reset = '1') then
- tx_shift_reg <= "1111111111";
- tx_flag <= "0000000000";
- tx_ready <= '1';
+ if (rising_edge(clk)) then
+ if (reset = '1') then
+ tx_shift_reg <= "1111111111";
+ tx_flag <= "0000000000";
+ tx_ready <= '1';
- elsif (rising_edge(clk)) then
- if (we = '1') then
- tx_shift_reg <= '1' & data & '0';
- tx_flag <= "1000000000";
- tx_ready <= '0';
-
- else
- tx_shift_reg <= '1' & tx_shift_reg(9 downto 1);
- tx_flag <= '0' & tx_flag(9 downto 1);
-
- if (tx_flag(1) = '1') then
- tx_ready <= '1';
+ else
+ if (we = '1') then
+ tx_shift_reg <= '1' & data & '0';
+ tx_flag <= "1000000000";
+ tx_ready <= '0';
+
+ else
+ tx_shift_reg <= '1' & tx_shift_reg(9 downto 1);
+ tx_flag <= '0' & tx_flag(9 downto 1);
+
+ if (tx_flag(1) = '1') then
+ tx_ready <= '1';
+ end if;
+
end if;
-
end if;
end if;
end process;