-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-latch-sre-nor.vhd
64 lines (49 loc) · 1.15 KB
/
test-latch-sre-nor.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
library ieee;
use ieee.std_logic_1164.all;
entity test_latch_sre_nor is
end entity test_latch_sre_nor;
architecture behavior of test_latch_sre_nor is
component latch_sre_nor is
port (
S : in std_logic;
R : in std_logic;
E : in std_logic;
Q : out std_logic;
NQ : out std_logic
);
end component;
signal S : std_logic := '0';
signal R : std_logic := '0';
signal E : std_logic := '0';
signal Q : std_logic;
signal NQ : std_logic;
begin
latch_1: latch_sre_nor port map (S => S, R => R, E => E, Q => Q, NQ => NQ);
process
begin
wait for 5 ms;
S <= '1';
wait for 1 ms;
S <= '0';
wait for 5 ms;
E <= '1';
wait for 5 ms;
S <= '1';
wait for 1 ms;
S <= '0';
wait for 5 ms;
E <= '0';
wait for 5 ms;
R <= '1';
wait for 1 ms;
R <= '0';
wait for 5 ms;
E <= '1';
wait for 5 ms;
R <= '1';
wait for 1 ms;
R <= '0';
wait for 5 ms;
E <= '0';
end process;
end architecture behavior;