aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/synth/issue1240/tb_issue3.vhdl31
-rwxr-xr-xtestsuite/synth/issue1240/testsuite.sh2
2 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/synth/issue1240/tb_issue3.vhdl b/testsuite/synth/issue1240/tb_issue3.vhdl
new file mode 100644
index 000000000..1725a3c6b
--- /dev/null
+++ b/testsuite/synth/issue1240/tb_issue3.vhdl
@@ -0,0 +1,31 @@
+entity tb_issue3 is
+end tb_issue3;
+
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+architecture behav of tb_issue3 is
+ signal i : integer := 0;
+ signal o : signed (3 downto 0);
+begin
+ dut: entity work.issue3
+ port map (i, o);
+
+ process
+ begin
+ i <= 0;
+ wait for 1 ns;
+ assert o = "0010" severity failure;
+
+ i <= 1;
+ wait for 1 ns;
+ assert o = "0011" severity failure;
+
+ i <= -1;
+ wait for 1 ns;
+ assert o = "0001" severity failure;
+
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/synth/issue1240/testsuite.sh b/testsuite/synth/issue1240/testsuite.sh
index f63808fcc..f1e668a8b 100755
--- a/testsuite/synth/issue1240/testsuite.sh
+++ b/testsuite/synth/issue1240/testsuite.sh
@@ -5,6 +5,8 @@
synth_failure issue1.vhdl -e
synth_failure issue2.vhdl -e
+synth_tb issue3
+
clean
echo "Test successful"