diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-12-22 16:14:35 +0100 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2015-12-22 16:14:35 +0100 |
commit | 53d4861c853bc057b5db337f617d0311bc3a1e85 (patch) | |
tree | 56a7851d46332e59227de512a0cb5087b6b288c8 /testsuite/gna/ticket104 | |
parent | 197e1362198139358cd98e3bbf99208f44b11738 (diff) | |
download | ghdl-53d4861c853bc057b5db337f617d0311bc3a1e85.tar.gz ghdl-53d4861c853bc057b5db337f617d0311bc3a1e85.tar.bz2 ghdl-53d4861c853bc057b5db337f617d0311bc3a1e85.zip |
Add testcase for ticket104.
Diffstat (limited to 'testsuite/gna/ticket104')
-rw-r--r-- | testsuite/gna/ticket104/bug_tb.vhd | 40 | ||||
-rwxr-xr-x | testsuite/gna/ticket104/testsuite.sh | 10 |
2 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/gna/ticket104/bug_tb.vhd b/testsuite/gna/ticket104/bug_tb.vhd new file mode 100644 index 000000000..8abb61ca5 --- /dev/null +++ b/testsuite/gna/ticket104/bug_tb.vhd @@ -0,0 +1,40 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity bug_tb is + +end bug_tb; + +------------------------------------------------------------------------------- + +architecture test of bug_tb is + + type t_test_vec is array (10 downto -1) of std_logic; + signal test_vec : t_test_vec := (others => '0'); + + -- clock + signal Clk : std_logic := '1'; + + procedure pr_vec ( + vec : in std_logic_vector) is + begin -- procedure pr_vec + for i in vec'range loop + report "bit: " & integer'image(i) & "=" & std_logic'image(vec(i)) severity note; + end loop; -- i + end procedure pr_vec; + +begin -- test + + -- clock generation + Clk <= not Clk after 10 ns; + + -- waveform generation + WaveGen_Proc : process + begin + wait until rising_edge(Clk); + pr_vec(std_logic_vector(test_vec)); + wait; + end process WaveGen_Proc; + +end test; + diff --git a/testsuite/gna/ticket104/testsuite.sh b/testsuite/gna/ticket104/testsuite.sh new file mode 100755 index 000000000..d0db007ca --- /dev/null +++ b/testsuite/gna/ticket104/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze bug_tb.vhd +elab_simulate_failure bug_tb + +clean + +echo "Test successful" |