K
knight
Hi i have a VHDL Code for a State Machine
This is a part of a standard VHDL Template for a Moore State Machine
This is it
NEXT_STATE_DECODE: process (state, <input1>, <input2>, ...)
begin
--declare default state for next_state to avoid latches
next_state <= state; --default is to stay in current state
--insert statements to decode next_state
--below is a simple example
case (state) is
when st1_<name> =>
if <input_1> = '1' then
next_state <= st2_<name>;
end if;
when others =>
next_state <= st1_<name>;
end case;
end process;
Can anyone tell me what is
"next_state <= state; " kind of assignment inside a sequential
process
There are two assignments for the same signal "next_state" inside the
process, one like concurrent and another inside the case statement.
How is this valid..?
Suppose <input_1> changes to '1' ... won't this "next_state <= state;
" execute..???
This is a part of a standard VHDL Template for a Moore State Machine
This is it
NEXT_STATE_DECODE: process (state, <input1>, <input2>, ...)
begin
--declare default state for next_state to avoid latches
next_state <= state; --default is to stay in current state
--insert statements to decode next_state
--below is a simple example
case (state) is
when st1_<name> =>
if <input_1> = '1' then
next_state <= st2_<name>;
end if;
when others =>
next_state <= st1_<name>;
end case;
end process;
Can anyone tell me what is
"next_state <= state; " kind of assignment inside a sequential
process
There are two assignments for the same signal "next_state" inside the
process, one like concurrent and another inside the case statement.
How is this valid..?
Suppose <input_1> changes to '1' ... won't this "next_state <= state;
" execute..???