EDA_hg81
Advanced Member level 2
May I use state machine as following:
Since I have to generate some control signals in the second process and I don't want to get any latchs.
Thanks
Code:
SEQ1: process ( CLK_IN, F_RESET )
begin
if ( F_RESET = '0' ) then
CURRENT_STATE <= INITWAIT;
elsif ( CLK_IN'EVENT and CLK_IN = '1' )then
CURRENT_STATE <= NEXT_STATE;
end if;
end process;
SEQ2: process ( CLK_IN, F_RESET )
begin
if ( CLK_IN'EVENT and CLK_IN = '1' )then
case CURRENT_STATE is
when INITWAIT =>
if ( INIT_CON2 = 1023 ) then
NEXT_STATE <= CONMOD;
else
NEXT_STATE <= INITWAIT;
end if;
when CONMOD =>
Thanks