From ddbdb98b0ff491bef20bb47668ad1b61a1ac185a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 3 Jul 2019 07:32:06 +0200 Subject: testsuite: add a case for previous commit. --- testsuite/gna/bug0100/forloop.vhdl | 46 ++++++++++++++++++++++++++++++++++++++ testsuite/gna/bug0100/testsuite.sh | 1 + 2 files changed, 47 insertions(+) create mode 100644 testsuite/gna/bug0100/forloop.vhdl (limited to 'testsuite/gna') 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 : -- cgit v1.2.3