diff options
author | Tristan Gingold <tgingold@free.fr> | 2013-12-28 07:10:18 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2013-12-28 07:10:18 +0100 |
commit | 56805100887c461128954142a5544942f5ffadff (patch) | |
tree | e3bd95767eaa36d2bcd5108d5fe1c615c4366151 /testsuite/gna/deb585748 | |
parent | af3c4fd602358cb36d9468f183d89719a78a2d88 (diff) | |
download | ghdl-56805100887c461128954142a5544942f5ffadff.tar.gz ghdl-56805100887c461128954142a5544942f5ffadff.tar.bz2 ghdl-56805100887c461128954142a5544942f5ffadff.zip |
Add tests for ticket #1 and #2.
Diffstat (limited to 'testsuite/gna/deb585748')
-rw-r--r-- | testsuite/gna/deb585748/585748_deb.vhd | 24 | ||||
-rwxr-xr-x | testsuite/gna/deb585748/testsuite.sh | 10 |
2 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/gna/deb585748/585748_deb.vhd b/testsuite/gna/deb585748/585748_deb.vhd new file mode 100644 index 000000000..9098e8d61 --- /dev/null +++ b/testsuite/gna/deb585748/585748_deb.vhd @@ -0,0 +1,24 @@ + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity tb_test is end; + +architecture arch_tb of tb_test is +-- signal reset_s, clk_s : std_logic; + signal i_s : integer := -1; +-- signal j_s : integer := -2; + -- Here, as it should, an error will be raised during compilation +-- signal u_s : unsigned(7 downto 0) := to_unsigned(-1, 8); + -- + signal v_s : unsigned(7 downto 0); +-- signal w_s : unsigned(7 downto 0); +begin + -- Here, as it should, a bound check failure will be raised during simulation +-- w_s <= to_unsigned(j_s, 8); + -- + -- Here it won't have any error during simulation, but it should + v_s <= to_unsigned(i_s, 8); + -- +end architecture arch_tb; diff --git a/testsuite/gna/deb585748/testsuite.sh b/testsuite/gna/deb585748/testsuite.sh new file mode 100755 index 000000000..7fb5e8191 --- /dev/null +++ b/testsuite/gna/deb585748/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze 585748_deb.vhd +elab_simulate_failure tb_test + +clean + +echo "Test successful" |