-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTART_MANAGEMENT.vhd
71 lines (55 loc) · 1.33 KB
/
START_MANAGEMENT.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
68
69
70
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity START_MANAGEMENT is
port(
--DEBUG
CLOCK_MNG0: in std_logic;
CLOCK_MNG1: in std_logic;
CTS_MNG: in std_logic;
START_MNG: in std_logic;
RESET_START: in std_logic;
RST_MNG: in std_logic;
FF_OUT_START: out std_logic;
LOAD_CONTROL: out std_logic
);
end START_MANAGEMENT;
architecture rtl of START_MANAGEMENT is
component D_FF is
port(
CLK: in std_logic;
D: in std_logic;
RESET: in std_logic;
ENABLE:in std_logic;
Q: out std_logic
);
end component;
signal TEMP_OUT_FF0: std_logic;
signal TEMP_OUT_FF1: std_logic;
signal CONTROL_START_ENABLE_FF0:std_logic;
begin
U1: D_FF
port map(
CLK => CLOCK_MNG0,
D=> START_MNG,
ENABLE=>CONTROL_START_ENABLE_FF0,
RESET=>RESET_START,
Q=> TEMP_OUT_FF0
);
U2: D_FF
port map(
CLK => CLOCK_MNG1,
D=> TEMP_OUT_FF0,
ENABLE=>'1',
RESET=>RST_MNG,
Q=> TEMP_OUT_FF1
);
CONTROL_START_ENABLE_FF0<='1' when CTS_MNG='1' and TEMP_OUT_FF1='0' else
'0' when CTS_MNG='0' and TEMP_OUT_FF1='1' else
'0' when CTS_MNG='1' and TEMP_OUT_FF1='1' else
'0' when CTS_MNG='0' and TEMP_OUT_FF1='0' else
'0';
LOAD_CONTROL<= '1' when TEMP_OUT_FF0='1' and TEMP_OUT_FF1='0' else
'0';
FF_OUT_START<='1' when TEMP_OUT_FF0='1' else
'0';
end rtl;