Initial commit
This commit is contained in:
26
first/dff.vhdl
Normal file
26
first/dff.vhdl
Normal file
@@ -0,0 +1,26 @@
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
|
||||
entity dff is
|
||||
port(
|
||||
clk : in std_logic;
|
||||
rst : in std_logic;
|
||||
|
||||
d : in std_logic;
|
||||
q : out std_logic
|
||||
);
|
||||
end entity dff;
|
||||
|
||||
architecture behavior of dff is
|
||||
begin
|
||||
process(clk, rst) is
|
||||
begin
|
||||
if (rst = '1') then
|
||||
q <= '0';
|
||||
else
|
||||
if rising_edge(clk) then
|
||||
q <= d;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
end architecture behavior;
|
||||
Reference in New Issue
Block a user