tratando de resolver este error, pero ninguno de ellos funciona. Dice Error (10028): No se pueden resolver varios controladores constantes para la red "current_state.S4" en wood_detector.vhd (23)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity wood_detector is
port(clk,rst: in std_logic;
AB: in std_logic_vector( 1 downto 0) ;
z: out std_logic);
end wood_detector;
architecture fsm of wood_detector is
type t_state is (S0, S1, S2, S3, S4);
signal current_state, next_state: t_state;
begin
process(clk,rst)
begin
if(rst = '1') then current_state<= S0;
elsif(clk'event and clk = '1') then current_state <= next_state;
end if;
end process;
process(current_state,AB)
begin
case(current_state) is
when S0 => if(AB="10") then next_state<=S1;
else next_state<=S0;
end if;
when S1 => if(AB="00") then next_state <= S2;
elsif(AB="11") then next_state <= S3;
else current_state <= S1;
end if;
when S2 => if(AB="01") then next_state <= S4;
else next_state <= S2;
end if;
when S3 => if(AB="01") then next_state <= S4;
else next_state <= S3;
end if;
when others=>NULL;
end case;
end process;
z <= '1' when (current_state <= S2 and AB="00") else '0';
end fsm;