initial counter working
[hwmod.git] / src / beh_uart_tx_tb.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 entity beh_uart_tx_tb is
7 end entity beh_uart_tx_tb;
8
9 architecture sim of beh_uart_tx_tb is
10
11         constant clk_period  : time := 10ns;
12         signal clock : std_logic;
13         signal reset : std_logic;
14         signal done : std_logic;
15         signal newsig : std_logic;
16 begin
17         inst : entity work.uart_tx(beh)
18         port map (
19                  sys_clk => clock,
20                  sys_res => reset,
21                  --=> txd,
22                  --=> tx_data,
23                  tx_new => newsig,
24                  tx_done => done
25         );
26
27         stimuli : process
28         begin
29                 newsig <= '0';
30                 wait for 10ns;
31                 --send 'Hallo Welt'
32                 newsig <= '1';
33                 wait for 1000ns;
34
35                 assert false report "Test finished" severity failure;
36         end process stimuli;
37
38         res_gen : process
39         begin
40                 reset <= '0';
41                 wait for 20ns;
42                 reset <= '1';
43                 wait for 1000ns;
44         end process res_gen;
45
46         clock_gen : process
47         begin
48                 clock <= '0';
49                 wait for clk_period/2;
50                 clock <= '1';
51                 wait for clk_period/2;
52         end process clock_gen;
53
54 end sim;