shaiko
Advanced Member level 5
In the following code - signal alert will NEVER become high. right ?
Code:
process ( clock , reset ) is
begin
if reset = '1' then
state <= state_1 ;
x <= '0'
alert <= '0' ;
elsif rising_edge ( clock ) then
case state is
when state_1 =>
x <= '1' ;
if trigger = '1' then
x <= '0' ;
state <= state_2 ;
end if ;
when state_2 =>
if x = '1' then
alert <= '1' ;
end if ;
end case ;
end if ;
end process ;