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 pc_get : std_logic;
61 signal pc_spalte : hspalte;
62 signal pc_zeile : hzeile;
63 signal pc_char : hbyte;
64 signal pc_done : std_logic;
65 signal pc_busy : std_logic;
67 signal do_it, finished : std_logic;
69 signal sys_res_n_sync : std_logic;
70 signal btn_a_sync : std_logic;
72 signal rx_new, rxd_sync : std_logic;
73 signal rx_data : std_logic_vector (7 downto 0);
74 signal tx_new, tx_done : std_logic;
75 signal tx_data : std_logic_vector (7 downto 0);
78 textmode_vga_inst : entity work.textmode_vga(struct)
80 VGA_CLK_FREQ => 25000000,
81 BLINK_INTERVAL_MS => 500,
86 sys_res_n => sys_res_n_sync,
88 command_data => command_data,
91 vga_res_n => sys_res_n_sync,
100 vpll_inst : entity work.vpll(syn)
107 display_inst : entity work.display(beh)
110 sys_res_n => sys_res_n_sync,
112 d_new_eingabe => d_new_eingabe,
113 d_new_result => d_new_result,
114 d_new_bs => d_new_bs,
116 d_spalte => d_spalte,
122 command_data => command_data,
127 history_inst : entity work.history(beh)
130 sys_res_n => sys_res_n_sync,
135 s_backspace => s_backspace,
137 d_new_eingabe => d_new_eingabe,
138 d_new_result => d_new_result,
139 d_new_bs => d_new_bs,
141 d_spalte => d_spalte,
152 p_finished => p_finished,
155 pc_spalte => pc_spalte,
156 pc_zeile => pc_zeile,
163 parser_inst : entity work.parser(beh)
166 sys_res_n => sys_res_n_sync,
174 p_finished => p_finished,
181 scanner_inst : entity work.scanner(beh)
184 sys_res_n => sys_res_n_sync,
186 new_data => new_data,
192 s_backspace => s_backspace,
199 ps2_inst : entity work.ps2_keyboard_controller(beh)
201 CLK_FREQ => 33330000,
206 sys_res_n => sys_res_n_sync,
208 new_data => new_data,
214 -- debouncer fuer sys_res_n
215 sys_res_n_debounce_inst : debounce
217 CLK_FREQ => 33330000,
225 data_in => sys_res_n,
226 data_out => sys_res_n_sync
229 -- synchronizer fuer rxd
230 sync_rxd_inst : entity work.sync(beh)
237 sys_res_n => sys_res_n_sync,
242 -- debouncer fuer btn_a
243 btn_a_debounce_inst : debounce
245 CLK_FREQ => 33330000,
252 sys_res_n => sys_res_n_sync,
254 data_out => btn_a_sync
258 rs232rx_inst : entity work.uart_rx(beh)
260 CLK_FREQ => 33330000,
265 sys_res_n => sys_res_n_sync,
272 rs232tx_inst : entity work.uart_tx(beh)
274 CLK_FREQ => 33330000,
279 sys_res_n => sys_res_n,
286 pc_com_inst : entity work.pc_communication(beh)
289 sys_res_n => sys_res_n,
300 pc_zeile => pc_zeile,
301 pc_spalte => pc_spalte,
308 end architecture top;