-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb_tx_clock.vhd
67 lines (55 loc) · 1.22 KB
/
tb_tx_clock.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY tb_tx_clock IS
END tb_tx_clock;
ARCHITECTURE behavior OF tb_tx_clock IS
COMPONENT tx_clock
PORT(
clk : IN std_logic;
enable : IN std_logic;
dato_in: in std_logic:='0';
dato_in2: in std_logic_vector(7 downto 0);
dato_serial : OUT std_logic;
freq_out: out std_logic
);
END COMPONENT;
signal dato_in: std_logic;
signal clk : std_logic := '0';
signal enable : std_logic := '0';
signal dato_in2: std_logic_vector(7 downto 0);
signal dato_serial : std_logic;
signal freq_out: std_logic;
BEGIN
uut: tx_clock PORT MAP (
clk => clk,
enable => enable,
dato_in2 => dato_in2,
dato_serial => dato_serial,
freq_out => freq_out
);
dato_process :process
begin
dato_in2 <= "11000001";
wait;
end process;
enable_process :process
begin
enable <='0';
wait for 6000 ns;
enable <= '1';
wait for 93 us;
enable <= '0';
wait for 20000 ns;
enable <= '1';
wait for 93 us;
enable <= '0';
wait;
end process;
clk_process :process
begin
clk <= '0';
wait for 10 ns;
clk <= '1';
wait for 10 ns;
end process;
END;