diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-21 21:32:47 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-21 21:32:47 +0200 |
commit | baca4659950b461dcbfec08046ad6360362bcf8b (patch) | |
tree | b64ca014c4d7fb90c1f34eb3855b4a7a50c66df7 /testsuite/synth/issue1333 | |
parent | dbd8dc2d6daa658e149195889226816922c7602d (diff) | |
download | ghdl-baca4659950b461dcbfec08046ad6360362bcf8b.tar.gz ghdl-baca4659950b461dcbfec08046ad6360362bcf8b.tar.bz2 ghdl-baca4659950b461dcbfec08046ad6360362bcf8b.zip |
testsuite/synth: add a test for #1333
Diffstat (limited to 'testsuite/synth/issue1333')
-rw-r--r-- | testsuite/synth/issue1333/ascending_attribute.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/synth/issue1333/testsuite.sh | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue1333/ascending_attribute.vhdl b/testsuite/synth/issue1333/ascending_attribute.vhdl new file mode 100644 index 000000000..96631003c --- /dev/null +++ b/testsuite/synth/issue1333/ascending_attribute.vhdl @@ -0,0 +1,19 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity ascending_attribute is + port ( + a : in std_logic_vector(7 downto 0); + b : out boolean + ); +end ascending_attribute; + +architecture rtl of ascending_attribute is + function is_ascending(i : std_logic_vector) return boolean is + begin + return i'ASCENDING; + end function; +begin + b <= is_ascending(a); + assert not is_ascending(a); +end rtl; diff --git a/testsuite/synth/issue1333/testsuite.sh b/testsuite/synth/issue1333/testsuite.sh new file mode 100755 index 000000000..4b5678d23 --- /dev/null +++ b/testsuite/synth/issue1333/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_analyze ascending_attribute +clean + +echo "Test successful" |