Altera_Forum
Honored Contributor
18 years agomodelsim vsim-3601 on counter
Hi folks-
The following code returns in modelsim a # ** Error: (vsim-3601) Iteration limit reached at time 0 ps. when I run the simulation. However, when I step through the program, I see the counter working as intended. I know 3601 often comes when there's trouble in a loop, but I'm having trouble locking down where the problem is, and confused as to why the simulation runs when single-stepped through, but otherwise fails. Any thoughts would be very helpful. Thanks! Michael entity bcdcounter is port ( clk : in std_logic; reset : in std_logic; count : out std_logic_vector(3 downto 0); fullcount : out std_logic ); end bcdcounter; architecture rtl of bcdcounter is signal count_s : std_logic_vector(3 downto 0); begin count <= count_s; bcdcount: process(clk,reset) begin if reset='1' then count_s <= "0000"; fullcount <= '0'; elsif (rising_edge(clk)) then if count_s = "1001" then count_s <= "0000"; fullcount <='1'; else count_s <= count_s +"1"; fullcount <='0'; end if; end if; end process; end rtl;