blob: c1c7809a9f0f7a66d0a955ba1891850f689b34fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
entity DFF is
port (CLK, CLEAR, D : in bit;
Q : out bit);
end;
architecture BEHAV of DFF is
begin
process (CLK, CLEAR)
begin
if (CLEAR = ‘1’) then
Q <= ‘0’;
elsif (CLK’event and CLK = ‘1’) then
Q <= D;
end if;
end process;
end BEHAV;
|