-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.vhdl
54 lines (37 loc) · 1.01 KB
/
test.vhdl
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
library ieee;
use ieee.std_logic_1164.all;
entity test is
end entity;
architecture structural of test is
signal clk : std_logic := '0';
signal rst : std_logic := '1';
signal enable : std_logic := '0';
signal alpha_code : std_logic_vector(2 downto 0);
signal morse_code : std_logic;
constant CLK_PERIOD : time := 50 ps;
begin
main : entity work.main(structural) port map (
clk => clk,
rst => rst,
enable => enable,
alpha_code => alpha_code,
morse_code => morse_code
);
clk <= not clk after CLK_PERIOD / 2;
stim : process is
begin
wait for 10 * CLK_PERIOD;
rst <= '1';
alpha_code <= "000";
enable <= '0';
wait for 2 * CLK_PERIOD;
enable <= '1';
wait for 80 * CLK_PERIOD;
alpha_code <= "010";
enable <= '0';
wait for 2 * CLK_PERIOD;
enable <= '1';
wait for 120 * CLK_PERIOD;
std.env.stop;
end process;
end architecture;