Altera_Forum
Honored Contributor
17 years agoQuartus II Initalization Problem...
In the code below, the num variable is initialized to 0. It basically gives an error saying it is stuck in the while loop. When I explicity state that num is 0 inside begin of the process, it works, but that would cause problems in the coding. Any suggestions? Thanks.
library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.std_logic_arith.all; entity t_input is port( EN : in STD_LOGIC ); end t_input; architecture t_input of t_input is begin process (EN) variable num: INTEGER := 0; begin while ( num < 5 ) loop num := num + 1; end loop; end process; end t_input;