- next_state_pc : process (btn_a, pc_done, rx_new, rx_data, spalte, state,
- tx_data_i ,tx_done_i, zeile)
- begin
- state_next <= state;
- case state is
- when IDLE =>
- if (rx_new = '1' and rx_data = x"0a" ) or btn_a = '1' then
+ when PRINT_NO0_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO1;
+ end if;
+ when PRINT_NO1 =>
+ tx_data_i_next <= x"28"; -- '('
+ new_i_next <= '1';
+ if tx_done_i = '1' then
+ state_next <= PRINT_NO1_WAIT;
+ end if;
+ when PRINT_NO1_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO2;
+ end if;
+ when PRINT_NO2 =>
+ tx_data_i_next <= zeile2char(std_logic_vector(to_unsigned(zeile,7)), 1);
+ new_i_next <= '1';
+ if tx_done_i = '1' then
+ state_next <= PRINT_NO2_WAIT;
+ end if;
+ when PRINT_NO2_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO3;
+ end if;
+ when PRINT_NO3 =>
+ tx_data_i_next <= zeile2char(std_logic_vector(to_unsigned(zeile,7)), 2);
+ new_i_next <= '1';
+ if tx_done_i = '1' then
+ state_next <= PRINT_NO3_WAIT;
+ end if;
+ when PRINT_NO3_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO4;
+ end if;
+ when PRINT_NO4 =>
+ tx_data_i_next <= x"29"; -- ')'
+ new_i_next <= '1';
+ if tx_done_i = '1' then
+ state_next <= PRINT_NO4_WAIT;
+ end if;
+ when PRINT_NO4_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO5;
+ end if;
+ when PRINT_NO5 =>
+ tx_data_i_next <= x"24"; -- '$'
+ new_i_next <= '1';
+ if tx_done_i = '1' then
+ state_next <= PRINT_NO5_WAIT;
+ end if;
+ when PRINT_NO5_WAIT =>
+ if tx_done_i = '0' then
+ state_next <= PRINT_NO6;
+ end if;
+ when PRINT_NO6 =>
+ tx_data_i_next <= x"20"; -- ' '
+ new_i_next <= '1';
+ if tx_done_i = '1' then