2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
5 use work.textmode_vga_component_pkg.all;
6 use work.textmode_vga_pkg.all;
7 use work.textmode_vga_platform_dependent_pkg.all;
8 use work.ps2_keyboard_controller_pkg.all;
9 use work.debounce_pkg.all;
10 use work.sync_pkg.all;
14 sys_clk : in std_logic;
15 sys_res_n : in std_logic;
22 vsync_n : out std_logic;
23 hsync_n : out std_logic;
24 r : out std_logic_vector(RED_BITS - 1 downto 0);
25 g : out std_logic_vector(GREEN_BITS - 1 downto 0);
26 b : out std_logic_vector(BLUE_BITS - 1 downto 0);
28 ps2_clk : inout std_logic;
29 ps2_data : inout std_logic
33 architecture top of calc is
35 signal new_data : std_logic;
36 signal data : std_logic_vector(7 downto 0);
38 signal vga_clk, free : std_logic;
40 signal command : std_logic_vector(COMMAND_SIZE - 1 downto 0);
41 signal command_data : std_logic_vector(3 * COLOR_SIZE + CHAR_SIZE -1 downto 0);
43 signal d_new_eingabe, d_new_result, d_new_bs : std_logic;
44 signal d_zeile : hzeile;
45 signal d_spalte : hspalte;
46 signal d_get, d_done : std_logic;
47 signal d_char : hbyte;
49 signal s_char : hbyte;
50 signal s_take, s_done, s_backspace : std_logic;
52 signal p_rget : std_logic;
53 signal p_rdone : std_logic;
54 signal p_read : hbyte;
55 signal p_wtake : std_logic;
56 signal p_wdone : std_logic;
57 signal p_write : hbyte;
58 signal p_finished : std_logic;
60 signal do_it, finished : std_logic;
62 signal sys_res_n_sync : std_logic;
64 signal rx_new, rxd_sync : std_logic;
65 signal rx_data : std_logic_vector (7 downto 0);
66 signal tx_new, tx_done : std_logic;
67 signal tx_data : std_logic_vector (7 downto 0);
70 textmode_vga_inst : entity work.textmode_vga(struct)
72 VGA_CLK_FREQ => 25000000,
73 BLINK_INTERVAL_MS => 500,
78 sys_res_n => sys_res_n_sync,
80 command_data => command_data,
83 vga_res_n => sys_res_n_sync,
92 vpll_inst : entity work.vpll(syn)
99 display_inst : entity work.display(beh)
102 sys_res_n => sys_res_n_sync,
104 d_new_eingabe => d_new_eingabe,
105 d_new_result => d_new_result,
106 d_new_bs => d_new_bs,
108 d_spalte => d_spalte,
114 command_data => command_data,
119 history_inst : entity work.history(beh)
122 sys_res_n => sys_res_n_sync,
127 s_backspace => s_backspace,
129 d_new_eingabe => d_new_eingabe,
130 d_new_result => d_new_result,
131 d_new_bs => d_new_bs,
133 d_spalte => d_spalte,
144 p_finished => p_finished,
147 pc_spalte => (others => '0'),
148 pc_zeile => (others => '0'),
155 parser_inst : entity work.parser(beh)
158 sys_res_n => sys_res_n_sync,
166 p_finished => p_finished,
173 scanner_inst : entity work.scanner(beh)
176 sys_res_n => sys_res_n_sync,
178 new_data => new_data,
184 s_backspace => s_backspace,
191 ps2_inst : entity work.ps2_keyboard_controller(beh)
193 CLK_FREQ => 33330000,
198 sys_res_n => sys_res_n_sync,
200 new_data => new_data,
206 -- debouncer fuer sys_res_n
207 sys_res_n_debounce_inst : debounce
209 CLK_FREQ => 33330000,
217 data_in => sys_res_n,
218 data_out => sys_res_n_sync
221 -- synchronizer fuer rxd
222 sync_rxd_inst : entity work.sync(beh)
229 sys_res_n => sys_res_n_sync,
235 rs232rx_inst : entity work.uart_rx(beh)
237 CLK_FREQ => 33330000,
242 sys_res_n => sys_res_n_sync,
249 rs232tx_inst : entity work.uart_tx(beh)
251 CLK_FREQ => 33330000,
256 sys_res_n => sys_res_n,
262 end architecture top;