From a269db2277ea3747e09fcfc1b82b977b600932b3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 19 May 2020 07:53:18 +0200 Subject: testsuite/synth: add test from #1294 --- testsuite/synth/issue1294/generic_array_range.vhdl | 21 +++++++++++++++++++++ testsuite/synth/issue1294/testsuite.sh | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 testsuite/synth/issue1294/generic_array_range.vhdl create mode 100755 testsuite/synth/issue1294/testsuite.sh diff --git a/testsuite/synth/issue1294/generic_array_range.vhdl b/testsuite/synth/issue1294/generic_array_range.vhdl new file mode 100644 index 000000000..5b4135f04 --- /dev/null +++ b/testsuite/synth/issue1294/generic_array_range.vhdl @@ -0,0 +1,21 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity generic_array_range is + generic ( + SIZE : integer := 1 + ); + port ( + data_in : in std_logic_vector(7 downto 0); + data_out : out std_logic_vector(7 downto 0) + ); +end; + +architecture behavioral of generic_array_range is + --constant SIZE : integer := 1; + type t_slv_array_1d is array (natural range <>) of std_logic_vector; + signal a_slv_tmp : t_slv_array_1d(0 to SIZE-1)(7 downto 0); +begin + a_slv_tmp(0) <= data_in; + data_out <= a_slv_tmp(0); +end behavioral; diff --git a/testsuite/synth/issue1294/testsuite.sh b/testsuite/synth/issue1294/testsuite.sh new file mode 100755 index 000000000..7ece1a728 --- /dev/null +++ b/testsuite/synth/issue1294/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze generic_array_range + +echo "Test successful" -- cgit v1.2.3