diff options
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/bug0100/forloop.vhdl | 46 | ||||
-rwxr-xr-x | testsuite/gna/bug0100/testsuite.sh | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/testsuite/gna/bug0100/forloop.vhdl b/testsuite/gna/bug0100/forloop.vhdl new file mode 100644 index 000000000..0c912ec22 --- /dev/null +++ b/testsuite/gna/bug0100/forloop.vhdl @@ -0,0 +1,46 @@ +entity forloop is +end forloop; + +architecture behav of forloop is + signal clk : bit; + signal rst : bit := '1'; + signal tx : bit; + signal data : bit_vector (7 downto 0); + signal valid : bit; + signal err : bit; +begin + process + procedure pulse is + begin + clk <= '0'; + wait for 1 ns; + clk <= '1'; + wait for 1 ns; + end pulse; + variable txdata : bit_vector (7 downto 0); + begin + rst <= '1'; + tx <= '1'; + pulse; + rst <= '0'; + + -- Transmit 1 byte. + tx <= '0'; + pulse; + assert err = '0' and valid = '0' severity error; + txdata : + for i in txdata'reverse_range loop + tx <= txdata(i); + pulse; + assert err = '0' and valid = '0' severity error; + end loop; + tx <= '1'; -- parity + pulse; + tx <= '1'; -- stop + pulse; + assert valid = '1' severity error; + assert err = '0' severity error; + assert data = txdata; + wait; + end process; +end behav; diff --git a/testsuite/gna/bug0100/testsuite.sh b/testsuite/gna/bug0100/testsuite.sh index e7b494240..54ca03736 100755 --- a/testsuite/gna/bug0100/testsuite.sh +++ b/testsuite/gna/bug0100/testsuite.sh @@ -10,6 +10,7 @@ analyze_failure --force-analysis nochoice2.vhdl analyze_failure --force-analysis choicelen.vhdl analyze_failure --force-analysis noexpr.vhdl analyze_failure usrattr.vhdl +analyze_failure forloop.vhdl if analyze_failure --force-analysis notype1.vhdl 2>&1 | grep -q "indexed name"; then : |