-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathResetGen.vhd
67 lines (54 loc) · 1.33 KB
/
ResetGen.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
-- Module ResetGen
--
-- Generate a reset pulse.
--
library ieee;
use ieee.std_logic_1164.all;
library lattice;
use lattice.all;
entity ResetGen is
port (
CLK_I : in STD_LOGIC;
HOLD_NRST_I : in STD_LOGIC;
NRST_O : out STD_LOGIC
);
end ResetGen;
architecture Behavioral of ResetGen is
component FD1S1A
generic (GSR : STRING := "ENABLED");
port (
CK : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC
);
end component;
-- signal rst : std_logic := '0';
-- signal rst_done : std_logic := '0';
signal nhold : std_logic := '0';
begin
nhold <= not HOLD_NRST_I;
FD1P3AX_Inst : FD1S1A
port map (
CK => CLK_I,
D => nhold,
Q => NRST_O
);
-- NRST_O <= rst;
-- rst_proc: process (CLK_I)
-- begin
-- if rising_edge(CLK_I) then
-- if HOLD_NRST_I = '1' then
-- rst <= '0';
-- rst_done <= '0';
-- else
-- if (rst = '0') and (rst_done = '0') then
-- rst <= '0';
-- rst_done <= '1';
-- else
-- rst <= '1';
-- rst_done <= '0';
-- end if;
-- end if;
-- end if;
-- end process rst_proc;
end Behavioral;