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;
13 CLK_50MHZ : in std_logic;
14 sys_res : in std_logic;
21 vsync_n : out std_logic;
22 hsync_n : out std_logic;
23 r : out std_logic_vector(RED_BITS - 1 downto 0);
24 g : out std_logic_vector(GREEN_BITS - 1 downto 0);
25 b : out std_logic_vector(BLUE_BITS - 1 downto 0);
27 ps2_clk : inout std_logic;
28 ps2_data : inout std_logic
32 architecture top of calc is
34 signal sys_res_n : std_logic;
36 signal new_data : std_logic;
37 signal data : std_logic_vector(7 downto 0);
39 signal vga_clk, free : std_logic;
41 signal command : std_logic_vector(COMMAND_SIZE - 1 downto 0);
42 signal command_data : std_logic_vector(3 * COLOR_SIZE + CHAR_SIZE -1 downto 0);
44 signal d_new_eingabe, d_new_result, d_new_bs : std_logic;
45 signal d_zeile : hzeile;
46 signal d_spalte : hspalte;
47 signal d_get, d_done : std_logic;
48 signal d_char : hbyte;
50 signal s_char : hbyte;
51 signal s_take, s_done, s_backspace : std_logic;
53 signal p_rget : std_logic;
54 signal p_rdone : std_logic;
55 signal p_read : hbyte;
56 signal p_wtake : std_logic;
57 signal p_wdone : std_logic;
58 signal p_write : hbyte;
59 signal p_finished : std_logic;
61 signal do_it, finished : std_logic;
63 signal rx_new, rxd_sync : std_logic;
64 signal rx_data : std_logic_vector (7 downto 0);
65 signal tx_new, tx_done : std_logic;
66 signal tx_data : std_logic_vector (7 downto 0);
68 sys_res_n <= not sys_res;
71 textmode_vga_inst : entity work.textmode_vga(struct)
73 VGA_CLK_FREQ => 25000000,
74 BLINK_INTERVAL_MS => 500,
79 sys_res_n => sys_res_n,
81 command_data => command_data,
84 vga_res_n => sys_res_n,
93 clk_vga_s3e_inst : entity work.clk_vga_s3e(beh)
100 display_inst : entity work.display(beh)
102 sys_clk => CLK_50MHZ,
103 sys_res_n => sys_res_n,
105 d_new_eingabe => d_new_eingabe,
106 d_new_result => d_new_result,
107 d_new_bs => d_new_bs,
109 d_spalte => d_spalte,
115 command_data => command_data,
120 history_inst : entity work.history(beh)
122 sys_clk => CLK_50MHZ,
123 sys_res_n => sys_res_n,
128 s_backspace => s_backspace,
130 d_new_eingabe => d_new_eingabe,
131 d_new_result => d_new_result,
132 d_new_bs => d_new_bs,
134 d_spalte => d_spalte,
145 p_finished => p_finished
149 parser_inst : entity work.parser(beh)
151 sys_clk => CLK_50MHZ,
152 sys_res_n => sys_res_n,
160 p_finished => p_finished,
167 scanner_inst : entity work.scanner(beh)
169 sys_clk => CLK_50MHZ,
170 sys_res_n => sys_res_n,
172 new_data => new_data,
178 s_backspace => s_backspace,
185 ps2_inst : entity work.ps2_keyboard_controller(beh)
187 CLK_FREQ => 50000000,
191 sys_clk => CLK_50MHZ,
192 sys_res_n => sys_res_n,
194 new_data => new_data,
200 -- synchronizer fuer rxd
201 sync_rxd_inst : entity work.sync(beh)
207 sys_clk => CLK_50MHZ,
208 sys_res_n => sys_res_n,
214 rs232rx_inst : entity work.uart_rx(beh)
216 CLK_FREQ => 50000000,
220 sys_clk => CLK_50MHZ,
221 sys_res_n => sys_res_n,
228 rs232tx_inst : entity work.uart_tx(beh)
230 CLK_FREQ => 50000000,
234 sys_clk => CLK_50MHZ,
235 sys_res_n => sys_res_n,
241 end architecture top;