From baca4659950b461dcbfec08046ad6360362bcf8b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 21 May 2020 21:32:47 +0200 Subject: testsuite/synth: add a test for #1333 --- testsuite/synth/issue1333/ascending_attribute.vhdl | 19 +++++++++++++++++++ testsuite/synth/issue1333/testsuite.sh | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 testsuite/synth/issue1333/ascending_attribute.vhdl create mode 100755 testsuite/synth/issue1333/testsuite.sh (limited to 'testsuite') 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" -- cgit v1.2.3