diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-21 17:16:31 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-21 17:16:31 +0100 |
commit | 47bd6cb4b5a2465d6961b5d229dd1604f77128b5 (patch) | |
tree | aea3d1ca8a6e66147c6c4af916ff420b54bce9cd /testsuite/synth/issue1168 | |
parent | 134c6ed91339538eeb0c62b25de4c2ea79e89e37 (diff) | |
download | ghdl-47bd6cb4b5a2465d6961b5d229dd1604f77128b5.tar.gz ghdl-47bd6cb4b5a2465d6961b5d229dd1604f77128b5.tar.bz2 ghdl-47bd6cb4b5a2465d6961b5d229dd1604f77128b5.zip |
testsuite/synth: add test for #1168
Diffstat (limited to 'testsuite/synth/issue1168')
-rw-r--r-- | testsuite/synth/issue1168/bug.vhdl | 19 | ||||
-rw-r--r-- | testsuite/synth/issue1168/bug2.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/synth/issue1168/testsuite.sh | 11 |
3 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/synth/issue1168/bug.vhdl b/testsuite/synth/issue1168/bug.vhdl new file mode 100644 index 000000000..2d0546619 --- /dev/null +++ b/testsuite/synth/issue1168/bug.vhdl @@ -0,0 +1,19 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity bug is + generic( + LEN : positive := 32 + ); + port( + input_a : in unsigned(LEN-1 downto 0); + input_b : in unsigned(LEN-1 downto 0); + output : out unsigned(LEN-1 downto 0) + ); +end bug; + +architecture behav of bug is +begin + output <= minimum(input_a, input_b); +end architecture; diff --git a/testsuite/synth/issue1168/bug2.vhdl b/testsuite/synth/issue1168/bug2.vhdl new file mode 100644 index 000000000..c5085ccc7 --- /dev/null +++ b/testsuite/synth/issue1168/bug2.vhdl @@ -0,0 +1,19 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity bug2 is + generic( + LEN : positive := 32 + ); + port( + input_a : in unsigned(LEN-1 downto 0); + input_b : in unsigned(LEN-1 downto 0); + output : out unsigned(LEN-1 downto 0) + ); +end bug2; + +architecture behav of bug2 is +begin + output <= maximum(input_a, input_b); +end architecture; diff --git a/testsuite/synth/issue1168/testsuite.sh b/testsuite/synth/issue1168/testsuite.sh new file mode 100755 index 000000000..2c2022f16 --- /dev/null +++ b/testsuite/synth/issue1168/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze bug +synth_analyze bug2 + +clean + +echo "Test successful" |