Professional Documents
Culture Documents
ESTADOS
ACTUAL
E0
000
E1
001
E2
010
E3
011
E4
100
Ent
1
0
1
0
1
0
1
0
1
0
ESTADO
SIGUIENTE
001/0
100/0
010/0
100/0
011/1
100/0
011/0
011/0
010/0
100/0
use IEEE.std_logic_arith.all;
use IEEE.std_logic_signed.all;
use IEEE.std_logic_unsigned.all;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity detector111 is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
Entrada : in STD_LOGIC;
y : out STD_LOGIC);
end detector111;
type TiposEstado is
(E0,E1,E2,E3,E4);
signal EstadoA, EstadoS: TiposEstado;
begin
-- registros de estados
EstadoS <=E4;
end if;
when E1 =>
If Entrada='1' then
EstadoS <=E2;
else
EstadoS <=E4;
end if;
When E2 =>
If Entrada='1' then
EstadoS <=E3;
else
EstadoS <=E4;
end if;
When E3 =>
If Entrada='1' then
EstadoS <=E3;
else
EstadoS <=E3;
End if;
When E4=>
If Entrada='1' then
EstadoS <=E1;
else
EstadoS <=E4;
end if;
when others =>
end case;
end process;
--- salida Moore
y <= '1' when EstadoA=E3
else
'0';
end M_moore ;