X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=hwmod.git;a=blobdiff_plain;f=src%2Fpc_communication.vhd;h=89dff252be4bc9cd13891311d76123ad7465a19a;hp=b40444682580dddb605740bbba66703fa8517077;hb=030287b141ae40fd8c7e9e8060ee7a96ba109499;hpb=4daed56adb94596e6e991086a40f52e4a0b34efe diff --git a/src/pc_communication.vhd b/src/pc_communication.vhd index b404446..89dff25 100644 --- a/src/pc_communication.vhd +++ b/src/pc_communication.vhd @@ -24,6 +24,7 @@ entity pc_communication is pc_zeile : out hzeile; pc_spalte : out hspalte; pc_get : out std_logic; + pc_busy : in std_logic; --signals if the history module actually grants our request. pc_done : in std_logic; pc_char : in hbyte ); @@ -104,17 +105,21 @@ begin end case; end process output_pc; - next_state_pc : process (btn_a, pc_done, rx_new, rx_data, spalte, state, - tx_data_i ,tx_done_i, zeile) + next_state_pc : process (btn_a, pc_busy, 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 + if (rx_new = '1' and rx_data = x"0a" ) or btn_a = '0' then state_next <= FETCH; end if; when FETCH => - state_next <= WAIT_HIST; + if pc_busy = '1' then + state_next <= WAIT_HIST; + else + state_next <= FETCH; + end if; when WAIT_HIST => if (pc_done = '1') then state_next <= FORWARD;