blob: d0eb8137146cd926bddc08bd2b695ab0e135bdc8 (
plain)
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
|
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port (
d, clk: in std_logic;
q: out std_logic
);
end entity dff;
architecture behave of dff is
begin
process (clk)
begin
if clk = '1' then
q <= d;
end if;
end process;
end architecture behave;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
end entity dff;
architecture behave of dff is
component dff is
port (
d, clk: in std_logic;
q: out std_logic
);
end component;
signal d_in: std_logic;
signal clk_in: std_logic;
signal q_out: std_logic;
begin
d_ff:
dff port map ( d_in, clk_in, q_out);
no_label:
process
begin
if clk_in = '1' then
q_out <= d_in;
end if;
end process;
end architecture behave;
|