aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/examples/dff/negadff.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/examples/dff/negadff.vhdl')
-rw-r--r--testsuite/examples/dff/negadff.vhdl23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/examples/dff/negadff.vhdl b/testsuite/examples/dff/negadff.vhdl
new file mode 100644
index 0000000..5f1fb0a
--- /dev/null
+++ b/testsuite/examples/dff/negadff.vhdl
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity negadff is
+ port(
+ clk : in std_logic;
+ rst : in std_logic;
+ d : in std_logic;
+ q : out std_logic
+ );
+end entity;
+
+architecture arch of negadff is
+begin
+ process (clk, rst)
+ begin
+ if rst = '1' then
+ q <= '0';
+ elsif falling_edge(clk) then
+ q <= d;
+ end if;
+ end process;
+end architecture;