diff options
author | Tristan Gingold | 2015-12-22 16:14:35 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-12-22 16:14:35 +0100 |
commit | 53d4861c853bc057b5db337f617d0311bc3a1e85 (patch) | |
tree | 56a7851d46332e59227de512a0cb5087b6b288c8 /testsuite/gna/ticket104/bug_tb.vhd | |
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/bug_tb.vhd')
-rw-r--r-- | testsuite/gna/ticket104/bug_tb.vhd | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/ticket104/bug_tb.vhd b/testsuite/gna/ticket104/bug_tb.vhd new file mode 100644 index 0000000..8abb61c --- /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; + |