aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/examples/dff/negdff.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-15 07:37:15 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-15 07:37:52 +0200
commitd941c8f65bbbb90f97c17e26b5610624c2198b10 (patch)
tree59f5a31839273b345e2eba52f15c3dc073ccba45 /testsuite/examples/dff/negdff.vhdl
parent81bb4346368e4769251e66ec0e43e2d1d17c2c45 (diff)
downloadghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.tar.gz
ghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.tar.bz2
ghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.zip
Add tests/examples for dff (both pos and neg edge).
Diffstat (limited to 'testsuite/examples/dff/negdff.vhdl')
-rw-r--r--testsuite/examples/dff/negdff.vhdl20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/examples/dff/negdff.vhdl b/testsuite/examples/dff/negdff.vhdl
new file mode 100644
index 0000000..2d2fb11
--- /dev/null
+++ b/testsuite/examples/dff/negdff.vhdl
@@ -0,0 +1,20 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity negdff is
+ port(
+ clk : in std_logic;
+ d : in std_logic;
+ q : out std_logic
+ );
+end entity;
+
+architecture arch of negdff is
+begin
+ process (clk)
+ begin
+ if falling_edge(clk) then
+ q <= d;
+ end if;
+ end process;
+end architecture;