3681c6907efcbb495e46fb2502c73269bb044482
[hwmod.git] / src / pc_communication.vhd
1 library ieee;
2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
4 use work.gen_pkg.all;
5
6
7 entity pc_communication is
8         port (
9                 sys_clk : in std_logic;
10                 sys_res_n : in std_logic;
11
12                 --button
13                 btn_a : in std_logic;
14
15                 --uart_tx
16                 tx_data : out std_logic_vector(7 downto 0);
17                 tx_new : out std_logic;
18                 tx_done : in std_logic;
19
20                 --uart_rx
21                 rx_data : in std_logic_vector(7 downt 0); --not really required
22                 rx_new : in std_logic_vector;
23
24                 -- History
25                 d_zeile : out hzeile;
26                 d_spalte : out hspalte;
27                 d_get :  out std_logic;
28                 d_done : in std_logic;
29                 d_char : in hbyte --;
30         );
31 end entity pc_communication;
32
33
34
35 architecture beh of display is
36         signal push_history, push_history_next : std_logic;
37 begin
38
39         sync_push_history : process (sys_clk, sys_res_n)
40         begin
41                 if sys_res_n = '0' then
42                         push_history <= '0';
43                 elsif rising_edge(sys_clk) then
44                         push_history <= push_history_next;
45                 end if;
46         end process sync_push_history;
47
48         push_history : process(rx_new, rx_data, btn_a)
49         begin
50                 if ( (rx_new = '1' and rx_data = X"41") or btn_a '1') then
51                         push_history_next <= '1';
52                 else
53                         push_history_next <= '0';
54                 end if;
55         end process push_history;
56
57 --      sync_pc : process ()
58 --      begin
59 --      end process sync_pc;
60 --
61 --      next_state_pc : process ()
62 --      begin
63 --      end process next_state_pc;
64 --
65 --      output_pc : process ()
66 --      begin
67 --      end process output_pc;
68 end architecture beh;