M
Max
Guest
I need that my state machine starts on rising_edge of a signal, then
it must be synchronous with clk. When the last state has been
executed, I must wait a rising_edge again:
I wrote this:
architecture Behavioral of main is
type state_type is (ST0, ST1, ST2, ST3);
signal state: state_type;
begin
process (clk, start, reset)
begin
if reset = '1' then
state <= st0;
elsif (rising_edge(start) and state = st0) then
state <= st1;
elsif (rising_edge(clk) and state /= st0) then
case state is
when st0 =>
when st1 =>
state <= st2;
when st2 =>
state <= st3;
when st3 =>
state <= st0;
end case;
end if;
end process;
end Behavioral;
end the error is:
ERROR:Xst:827 - main.vhd line 23: Signal state cannot be synthesized,
bad synchronous description.
How can I implement my state machine?
thanks
it must be synchronous with clk. When the last state has been
executed, I must wait a rising_edge again:
I wrote this:
architecture Behavioral of main is
type state_type is (ST0, ST1, ST2, ST3);
signal state: state_type;
begin
process (clk, start, reset)
begin
if reset = '1' then
state <= st0;
elsif (rising_edge(start) and state = st0) then
state <= st1;
elsif (rising_edge(clk) and state /= st0) then
case state is
when st0 =>
when st1 =>
state <= st2;
when st2 =>
state <= st3;
when st3 =>
state <= st0;
end case;
end if;
end process;
end Behavioral;
end the error is:
ERROR:Xst:827 - main.vhd line 23: Signal state cannot be synthesized,
bad synchronous description.
How can I implement my state machine?
thanks