aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue2361/jkff.vhdl19
-rwxr-xr-xtestsuite/synth/issue2361/testsuite.sh8
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue2361/jkff.vhdl b/testsuite/synth/issue2361/jkff.vhdl
new file mode 100644
index 000000000..0417089e2
--- /dev/null
+++ b/testsuite/synth/issue2361/jkff.vhdl
@@ -0,0 +1,19 @@
+entity jkff is
+ port (
+ j_n, k_n, clk : in bit;
+ q, q_n : inout bit);
+end entity;
+
+architecture behavioral of jkff is
+begin
+ flip_flop : process (j_n, k_n, clk) is
+ begin
+ case j_n & k_n & clk is
+ when "010" | "011" => q <= '1';
+ when "100" | "101" => q <= '0';
+ when "001" => q <= q_n;
+ when others => q <= unaffected;
+ end case;
+ end process;
+ q_n <= not q;
+end architecture;
diff --git a/testsuite/synth/issue2361/testsuite.sh b/testsuite/synth/issue2361/testsuite.sh
new file mode 100755
index 000000000..9ca84e726
--- /dev/null
+++ b/testsuite/synth/issue2361/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_only jkff
+
+echo "Test successful"