diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-08-24 21:01:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-08-25 18:13:52 +0200 |
commit | f6652114c78edfdded7231f16d0b97e1459f738a (patch) | |
tree | 0f69c246e1bfac67f12fc2b9d5f032de38e74e88 /testsuite | |
parent | 763ad94d204baa585c688df959fcecef2f76b7c7 (diff) | |
download | ghdl-f6652114c78edfdded7231f16d0b97e1459f738a.tar.gz ghdl-f6652114c78edfdded7231f16d0b97e1459f738a.tar.bz2 ghdl-f6652114c78edfdded7231f16d0b97e1459f738a.zip |
testsuite/gna: add a test for #1429
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue1429/test.vhdl | 37 | ||||
-rwxr-xr-x | testsuite/gna/issue1429/testsuite.sh | 11 |
2 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/gna/issue1429/test.vhdl b/testsuite/gna/issue1429/test.vhdl new file mode 100644 index 000000000..7c979c349 --- /dev/null +++ b/testsuite/gna/issue1429/test.vhdl @@ -0,0 +1,37 @@ +use std.textio.all; + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is +end entity; + +architecture a of test is + constant SUB_v : bit_vector(63 downto 0) := (others => '1'); + constant I0 : bit_vector(63 downto 0) := X"AAAAAAAAAAAAAAAA"; + constant I0a : bit_vector(63 downto 0) := I0 xor X"FFFFFFFFFFFFFFFF"; + constant I0b : bit_vector(63 downto 0) := I0 xor SUB_v; + + impure function I0f return bit_vector is + variable ret : bit_vector(63 downto 0); + begin + ret := X"AAAAAAAAAAAAAAAA"; + ret := ret xor SUB_v; + return ret; + end function; + + constant I0c : bit_vector(63 downto 0) := I0f; +begin + process is + variable la, lb, lc : line; + begin + hwrite(la, I0a); + report la.all; + hwrite(lc, I0c); + report lc.all; + assert I0a = I0c severity failure; + assert I0b = I0c severity failure; + wait; + end process; +end architecture a; diff --git a/testsuite/gna/issue1429/testsuite.sh b/testsuite/gna/issue1429/testsuite.sh new file mode 100755 index 000000000..1d84c0f57 --- /dev/null +++ b/testsuite/gna/issue1429/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze test.vhdl +elab_simulate test + +clean + +echo "Test successful" |