diff options
Diffstat (limited to 'testsuite/synth/issue1273/assert3.vhdl')
-rw-r--r-- | testsuite/synth/issue1273/assert3.vhdl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/synth/issue1273/assert3.vhdl b/testsuite/synth/issue1273/assert3.vhdl new file mode 100644 index 000000000..31568145a --- /dev/null +++ b/testsuite/synth/issue1273/assert3.vhdl @@ -0,0 +1,26 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity assert3 is + port (v : std_logic_Vector (7 downto 0); + en : std_logic; + res : out natural); +end; + +architecture behav of assert3 is +begin + process (v, en) + begin + res <= 0; + if en = '1' then + for i in v'range loop + if v (i) = '1' then + res <= i; + exit; + end if; + assert i > 3 report "bad v value"; + end loop; + end if; + end process; +end behav; + |