Documentos de Académico
Documentos de Profesional
Documentos de Cultura
VHDL Basic
VHDL Basic
1) Describa (indique características, ventajas, desventajas, etc.) con sus propias palabras y de
manera breve lo siguiente:
1)DIAGRAMA DE ESTADOS
1/01
1/00 S1 S2
1/10
0/01 0/10
0/11
S0
0/00 S3
1/11
2)ASIGNACIÒN DE ESTADOS
S0: 00
S1:01
S2:11
S3:10
3) TABLA DE ESTADOS
Q1 Q0 X Q1* Q0* S1 S0
0 0 0 0 1 0 1
0 0 1 1 0 1 1
0 1 0 1 1 1 0
0 1 1 0 0 0 0
1 0 0 0 0 0 0
1 0 1 1 1 1 0
1 1 0 1 0 1 1
1 1 1 0 1 0 1
4) MAPAS DE KARNAUGH
Q0 X 00 01 11 10
Q1
0 1 1
1 1 1
Q1*=Q0*X+Q0X
Q0 X 00 01 11 10
Q1
0 1 1
1 1 1
Q0*=Q1 * X +Q1*X
Q0 X 00 01 11 10
Q1
0 1 1
1 1 1
S1= Q0*X+Q0X
Q0 X 00 01 11 10
Q1
0 1 1
1 1 1
S0=Q0* Q1+Q0*Q1
5)DIAGRAMA DEL CIRCUITO
3. Código en VHDL
library ieee;
use ieee.std_logic_1164.all;
entity CONTADOR is
port(
clk:in std_logic;
input: in std_logic;
output: out std_logic_vector(1 to 0);
reset:in std_logic
);
end CONTADOR;
signal state:state_type;
begin
process(clk,reset)
begin
if reset='1' then
state<=s0;
elsif(rising_edge(clk)) then
--Trancision de estados
case state is
when s0=>
else
state<=s1;
end if;
when s1=>
if input = '0' then
state<=s2;
else
state<=s0;
end if;
when s2=>
if input = '1' then
state<=s1;
else
state<=s3;
end if;
when s3=>
if input = '1' then
state<=s2;
else
state<=s0;
end if;
end case;
end if;
end process;
--deterimnar la salida
process (state,input)
begin
case state is
when s0=>
if input='1' then
output<="11";
else
output<="01";
end if;
when s1=>
if input='1' then
output<="00";
else
output<="10";
end if;
when s2=>
if input='1' then
output<="01";
else
output<="11";
end if;
when s3=>
if input='1' then
output<="10";
else
output<="00";
end if;
end case;
end process;
end rtl;