From 655f95831416043989e23dfc629e480aae0123dd Mon Sep 17 00:00:00 2001 From: eine <6628437+eine@users.noreply.github.com> Date: Sun, 12 Jan 2020 08:12:55 +0000 Subject: testsuite/synth: add test from #1082 (#1085) --- testsuite/synth/issue1082/ent.vhdl | 18 ++++++++++++++++++ testsuite/synth/issue1082/testsuite.sh | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 testsuite/synth/issue1082/ent.vhdl create mode 100755 testsuite/synth/issue1082/testsuite.sh diff --git a/testsuite/synth/issue1082/ent.vhdl b/testsuite/synth/issue1082/ent.vhdl new file mode 100644 index 000000000..7765e6a70 --- /dev/null +++ b/testsuite/synth/issue1082/ent.vhdl @@ -0,0 +1,18 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is + port( + a_in : in std_logic_vector(31 downto 0); + b_out : out std_logic_vector(31 downto 0) + ); +end test; + +architecture rtl of test is +begin + process(all) + begin + b_out <= std_logic_vector(to_unsigned((31-to_integer(unsigned(a_in))) / 4, 32)); + end process; +end; \ No newline at end of file diff --git a/testsuite/synth/issue1082/testsuite.sh b/testsuite/synth/issue1082/testsuite.sh new file mode 100755 index 000000000..26a25c13f --- /dev/null +++ b/testsuite/synth/issue1082/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 + +synth ent.vhdl -e + +echo "Test successful" -- cgit v1.2.3