Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.07 KB | None | 0 0
  1.     SIGNAL start      : STD_LOGIC := '0';
  2. begin
  3.  
  4.     process(clk) begin
  5.         if rising_edge(clk) then
  6.             if UART_Tx_start = '1' then
  7.                 start <= '1';
  8.             elsif UART_clk_EN = '1' then
  9.                 pres_state       <= next_state;
  10.                 UART_Tx_data_out <= data_out;
  11.                 if (next_state = st_idle) then
  12.                     UART_Tx_busy <= '0';
  13.                 else
  14.                     UART_Tx_busy <= '1';
  15.                 end if;
  16.                 if start = '1' then
  17.                     start <= '0';
  18.                 end if;
  19.             end if;
  20.         end if;
  21.     end process;
  22.    
  23.     process (pres_state,start) begin
  24.         case pres_state is
  25.             when st_idle  =>
  26.                 if start = '1' then
  27.                     next_state <= st_start;
  28.                 else
  29.                     next_state <= st_idle;
  30.                 end if;
  31.                 data_out     <= '1';
  32.             when st_start =>
  33.                 next_state <= st_b0;
  34.                 data_out   <= '0';
  35.             when st_b0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement