diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-30 06:25:07 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-30 06:27:05 +0100 |
commit | c83bce97cdb629fc52d5b9f73f9d236c79122ae4 (patch) | |
tree | 961bb84fa22461705d153e7ee66fe52c20df829e | |
parent | da1905926cf63e11aceeb60a8dc6a805354473ce (diff) | |
download | ghdl-c83bce97cdb629fc52d5b9f73f9d236c79122ae4.tar.gz ghdl-c83bce97cdb629fc52d5b9f73f9d236c79122ae4.tar.bz2 ghdl-c83bce97cdb629fc52d5b9f73f9d236c79122ae4.zip |
testsuite/synth: add a test for #1077
-rw-r--r-- | testsuite/synth/issue1077/ent.vhdl | 30 | ||||
-rwxr-xr-x | testsuite/synth/issue1077/testsuite.sh | 12 |
2 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/synth/issue1077/ent.vhdl b/testsuite/synth/issue1077/ent.vhdl new file mode 100644 index 000000000..d1e6303e6 --- /dev/null +++ b/testsuite/synth/issue1077/ent.vhdl @@ -0,0 +1,30 @@ +library ieee; +use ieee.std_logic_1164.all, + ieee.numeric_std.all; + +entity ent is + port ( + clk : in std_logic; + i : in std_logic_vector(7 downto 0); + + amount : in integer range 0 to 7; + + const_half : out signed(7 downto 0); + async_ror : out std_logic_vector(7 downto 0); + clocked_left : out unsigned(7 downto 0) + ); +end; + +architecture a of ent is + constant ONE : unsigned(3 downto 0) := x"4" srl 2; +begin + const_half <= signed(i) sra to_integer(ONE); + async_ror <= i ror amount; + + process(clk) + begin + if rising_edge(clk) then + clocked_left <= unsigned(i) sll amount; + end if; + end process; +end; diff --git a/testsuite/synth/issue1077/testsuite.sh b/testsuite/synth/issue1077/testsuite.sh new file mode 100755 index 000000000..b6f55d91d --- /dev/null +++ b/testsuite/synth/issue1077/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +for t in ent; do + synth $t.vhdl -e $t > syn_$t.vhdl + analyze syn_$t.vhdl + clean +done + +echo "Test successful" |