aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-09 16:30:31 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-09 16:31:20 +0200
commitfd1ad4c1b4611b5dc29d5e809b2fd16c0446b0f8 (patch)
treee57813ba1a4857199756e5d178a16eb0917670a7 /testsuite
parent23c923649a05e35bf57da3b290ea2136e761f565 (diff)
downloadghdl-fd1ad4c1b4611b5dc29d5e809b2fd16c0446b0f8.tar.gz
ghdl-fd1ad4c1b4611b5dc29d5e809b2fd16c0446b0f8.tar.bz2
ghdl-fd1ad4c1b4611b5dc29d5e809b2fd16c0446b0f8.zip
testsuite/synth: add a test for false latch
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/case01/case05.vhdl26
-rwxr-xr-xtestsuite/synth/case01/testsuite.sh2
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/synth/case01/case05.vhdl b/testsuite/synth/case01/case05.vhdl
new file mode 100644
index 000000000..82f6ff5cf
--- /dev/null
+++ b/testsuite/synth/case01/case05.vhdl
@@ -0,0 +1,26 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity case05 is
+ port (
+ in_en : std_logic;
+ in_v : std_logic_vector(3 downto 0)
+ );
+end entity case05;
+
+architecture behav of case05 is
+begin
+ process(in_en, in_v)
+ variable l : boolean;
+ begin
+ if in_en = '1' then
+ case in_v is
+
+ when "0010" =>
+ l := in_v = "0000";
+ when others =>
+ report "illegal";
+ end case;
+ end if;
+ end process;
+end architecture behav;
diff --git a/testsuite/synth/case01/testsuite.sh b/testsuite/synth/case01/testsuite.sh
index 8ff30eaf1..519aaff89 100755
--- a/testsuite/synth/case01/testsuite.sh
+++ b/testsuite/synth/case01/testsuite.sh
@@ -6,4 +6,6 @@ for t in case01 case02 case03 case04; do
synth_tb $t
done
+synth case05.vhdl -e case05 > syn_case05.vhdl
+
echo "Test successful"