Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- as far as transition is concerned the first two transitions should be equivalent e.g.:
when idel =>
if data_in='1' then
next_state<=d1;
--else -- not needed
--next_state<=idel;
end if;
when d1 =>
if data_in='0' then
next_state<=d10;
-- else
-- next_state<=d1;
end if;
however i have my doubts since you have a default statement at top: next_state <= current_state; --- Quote End --- i can understand like that:
when idel =>
if data_in='1' then
next_state<=d1;
end if;
in this code, if data_in is 1 then next_state will be d1, but when data_in is 0 then we dont know next_state will be when idel =>
if data_in='1' then
next_state<=d1;
else
next_state<=idel;
end if;
in this code, if data_in is 1 then next_state will be d1, but when data_in is 0 then next_state will be idel, so is this the different ???