From f73b474036e2b91370de0696a14c2faf0a106097 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 26 Apr 2020 17:25:18 +0200 Subject: testsuite/synth: test more shifts for #1264 --- testsuite/synth/issue1264/issue2.vhdl | 20 ++++++++++++++++++++ testsuite/synth/issue1264/testsuite.sh | 1 + 2 files changed, 21 insertions(+) create mode 100644 testsuite/synth/issue1264/issue2.vhdl diff --git a/testsuite/synth/issue1264/issue2.vhdl b/testsuite/synth/issue1264/issue2.vhdl new file mode 100644 index 000000000..b463410fd --- /dev/null +++ b/testsuite/synth/issue1264/issue2.vhdl @@ -0,0 +1,20 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity issue2 is + port (uns_inp : in unsigned (4-1 downto 0); + uns_sll : out unsigned (8-1 downto 0); + uns_srl : out unsigned (8-1 downto 0); + sgn_inp : in signed (4-1 downto 0); + sgn_sll : out signed (8-1 downto 0); + sgn_srl : out signed (8-1 downto 0)); +end issue2; + +architecture beh of issue2 is +begin + uns_sll <= resize (uns_inp, sgn_srl'length) sll 1; -- work + uns_srl <= resize (uns_inp, sgn_srl'length) srl 1; -- work + sgn_sll <= resize (sgn_inp, sgn_srl'length) sll 1; -- error + sgn_srl <= resize (sgn_inp, sgn_srl'length) srl 1; -- error +end architecture beh; diff --git a/testsuite/synth/issue1264/testsuite.sh b/testsuite/synth/issue1264/testsuite.sh index f254e61b0..66f0eff94 100755 --- a/testsuite/synth/issue1264/testsuite.sh +++ b/testsuite/synth/issue1264/testsuite.sh @@ -8,6 +8,7 @@ clean synth_analyze issue synth_analyze repro +synth_analyze issue2 clean echo "Test successful" -- cgit v1.2.3