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 =>
Since I have to generate some control signals in the second process and I don't want to get any latchs.
first, according to the upon code, there is no need to use FSM.
It is so clear that FSM is uneeded.
Genraly, in FSM implementaion the CASE statement should be declared in async process. In order to avoid any LATCHs you cover all the case posibilties and ALYAWS use in CASE the OTHER...