diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-12-11 10:04:22 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-12-11 10:04:22 +0100 |
commit | 850a0186a67961a6bfedabd8a879eff5f9923665 (patch) | |
tree | 863df9a6435bf27acc9212d346c58520459123f9 /testsuite | |
parent | 58616d942babcec5c922fc05693f848137041fa5 (diff) | |
download | ghdl-850a0186a67961a6bfedabd8a879eff5f9923665.tar.gz ghdl-850a0186a67961a6bfedabd8a879eff5f9923665.tar.bz2 ghdl-850a0186a67961a6bfedabd8a879eff5f9923665.zip |
testsuite/gna: add a test for previous commit
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue2175/tb4.vhdl | 26 | ||||
-rwxr-xr-x | testsuite/gna/issue2175/testsuite.sh | 5 |
2 files changed, 30 insertions, 1 deletions
diff --git a/testsuite/gna/issue2175/tb4.vhdl b/testsuite/gna/issue2175/tb4.vhdl new file mode 100644 index 000000000..17b09824c --- /dev/null +++ b/testsuite/gna/issue2175/tb4.vhdl @@ -0,0 +1,26 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity tb4 is +end; + +architecture behav of tb4 is + function repeat(val : std_ulogic; n : natural) return std_ulogic_vector + is + variable res : std_ulogic_vector(n - 1 downto 0); + begin + -- No aggregate use. + for i in res'range loop + res (i) := val; + end loop; + return res; + end function; + +begin + process + constant c : std_ulogic_vector (3 downto 0) := ('1', repeat ('0', 3)); + begin + assert c = "1000" severity failure; + wait; + end process; +end behav; diff --git a/testsuite/gna/issue2175/testsuite.sh b/testsuite/gna/issue2175/testsuite.sh index 8fd8f48a9..62765a44c 100755 --- a/testsuite/gna/issue2175/testsuite.sh +++ b/testsuite/gna/issue2175/testsuite.sh @@ -4,7 +4,7 @@ export GHDL_STD_FLAGS=--std=08 -# analyze pkg.vhdl +analyze pkg.vhdl analyze tb2.vhdl elab_simulate tb2 @@ -12,6 +12,9 @@ elab_simulate tb2 analyze tb3.vhdl elab_simulate tb3 +analyze tb4.vhdl +elab_simulate tb4 + clean echo "Test successful" |