diff options
Diffstat (limited to 'testsuite/synth/issue1080/repro4.vhdl')
-rw-r--r-- | testsuite/synth/issue1080/repro4.vhdl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/synth/issue1080/repro4.vhdl b/testsuite/synth/issue1080/repro4.vhdl new file mode 100644 index 000000000..adcb1b4e2 --- /dev/null +++ b/testsuite/synth/issue1080/repro4.vhdl @@ -0,0 +1,30 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity repro4 is + generic ( + num : natural := 1); + port ( + clk : std_logic; + o : out std_logic); +end; + +architecture behav of repro4 is + signal s : natural range 0 to num - 1 := 0; +begin + process (clk) is + begin + if rising_edge(clk) then + if s = 0 then + o <= '1'; + else + o <= '0'; + end if; + if s = num - 1 then + s <= 0; + else + s <= s + 1; + end if; + end if; + end process; +end behav; |