Forum Discussion
Altera_Forum
Honored Contributor
9 years agoYou're still trying to update 'clk_out' in both processes. Only update a signal in one process.
I note you've been trying clocked processes. That's the way to go - in my opinion. Try modifying your second process to:oneshot: process (clk_in, reset)
begin
if reset = '0' then
cnt <= 0;
elsif clk_in'EVENT AND clk_in = '1' then
if led1 ='1' then
if cnt < width5s then
cnt <= cnt+1;
else
GRiD1 <= led1;
GRID2 <= led1;
end if;
end if;
end if;
end process oneshot; 'GRiD1' & 'GRID2' are not defined in the reset state - you need to decide how to drive then in reset. Also, you're 'reset' signal is an active low signal (resets registers when it's a 0, zero). I suggest renaming it to 'reset_l' (l for low) or 'reset_n' (n for negative), for clarity. Cheers, Alex