Upload
javier-zapata
View
97
Download
5
Embed Size (px)
Citation preview
ELETRONICA DIGITAL - PRÁCTICA
TEMA:
TRABAJO DE PROGRAMACION VHDL
INTEGRANTES:
CCORAHUA SANTO, NACEAN OSCAR
CORNEJO CONDORI, CARLOS MARIO
AREQUIPA- 2012
PROBLEMAS
PROYECTO N° 1
Realice la descripción logarítmica en VHDL de un biestable D cerrojo. Luego emplee esta entidad en el control de un motor eléctrico por medio de un botón. El motor pasa de encendido a apagado y viceversa cada vez que se pulsa el botón. Se pide:
a. Algoritmo de solución para el biestable Db. Esquema solución para el encendido/apagado del motor.c. Algoritmo solución para el control de E/Ad. Codificación en VHDL del algoritmo del item de. Pruebas de simulación para el sistema propuesto.
- Esquema para el encendido y apagado del motor
Tengamos en cuenta que para un BIESTABLE D
D Q Q´
0 0 1
1 1 0
Donde: D= pulso del botón Q= funcionamiento del botom
- El algoritmo (comportamental) a usar es el siguiente:
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;--practica electronica digital , jueves 4.00;5.30--nombres: ccorahua santo oscar-- cornejo condori carlos
entity biestabled is Port ( c : in STD_LOGIC; d : in STD_LOGIC; q : out STD_LOGIC);end biestabled;
architecture Behavioral of biestabled isbeginprocess (c,d)
beginif (c='1')then
q<=not d;end if;if (c='0')thenq<=c and d;end if;
end process;
end Behavioral;
- Simulación:
PROYECTO N° 2
Implemente en código VHDL un multiplexor de 8 bits y 4 entradas. Utilice una descripción comportamental. Detalle su procedimiento y considere en su solución lo siguiente:
a. Análisis y algoritmo para el multiplexor.b. Codificación en VHDL del algoritmo del multiplexor.c. Pruebas de simulación.
- Algoritmo.
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity mux8bitsy4entradas is Port (
S : in BIT_VECTOR(1 DOWNTO 0); D01 : in STD_LOGIC;
D11 : in STD_LOGIC; D21 : in STD_LOGIC; D31 : in STD_LOGIC; Y1 : out STD_LOGIC;
D02 : in STD_LOGIC;
D12 : in STD_LOGIC; D22 : in STD_LOGIC; D32 : in STD_LOGIC; Y2 : out STD_LOGIC;
D03 : in STD_LOGIC;
D13 : in STD_LOGIC; D23 : in STD_LOGIC; D33 : in STD_LOGIC; Y3 : out STD_LOGIC;
D04 : in STD_LOGIC;
D14 : in STD_LOGIC; D24 : in STD_LOGIC; D34 : in STD_LOGIC; Y4 : out STD_LOGIC;
D05 : in STD_LOGIC;
D15 : in STD_LOGIC; D25 : in STD_LOGIC; D35 : in STD_LOGIC; Y5 : out STD_LOGIC;
D06 : in STD_LOGIC;
D16 : in STD_LOGIC;
D26 : in STD_LOGIC; D36 : in STD_LOGIC; Y6 : out STD_LOGIC;
D07 : in STD_LOGIC;
D17 : in STD_LOGIC; D27 : in STD_LOGIC; D37 : in STD_LOGIC; Y7 : out STD_LOGIC;
D08 : in STD_LOGIC;
D18 : in STD_LOGIC; D28 : in STD_LOGIC; D38 : in STD_LOGIC; Y8 : out STD_LOGIC );end mux8bitsy4entradas;
architecture comportamental of mux8bitsy4entradas is
begin
PROCESS (D01,D11,D21,D31,D02,D12,D22,D32,D03,D13,D23,D33,D04,D14,D24,D34,D05,D15,D25,D35,D06,D16,D26,D36,D07,D17,D27,D37,D08,D18,D28,D38,S)
BEGIN
CASE S ISWHEN "00" => Y1 <= D01;WHEN "01" => Y1 <= D11;WHEN "10" => Y1 <= D21;WHEN "11" => Y1 <= D31;END CASE;
CASE S ISWHEN "00" => Y2 <= D02;WHEN "01" => Y2 <= D12;WHEN "10" => Y2 <= D22;WHEN "11" => Y2 <= D32;END CASE;
CASE S ISWHEN "00" => Y3 <= D03;WHEN "01" => Y3 <= D13;WHEN "10" => Y3 <= D23;WHEN "11" => Y3 <= D33;END CASE;
CASE S ISWHEN "00" => Y4 <= D04;WHEN "01" => Y4 <= D14;WHEN "10" => Y4 <= D24;WHEN "11" => Y4 <= D34;END CASE;
CASE S IS
WHEN "00" => Y5 <= D05;WHEN "01" => Y5 <= D15;WHEN "10" => Y5 <= D25;WHEN "11" => Y5 <= D35;END CASE;
CASE S ISWHEN "00" => Y6 <= D06;WHEN "01" => Y6 <= D16;WHEN "10" => Y6 <= D26;WHEN "11" => Y6 <= D36;END CASE;
CASE S ISWHEN "00" => Y7 <= D07;WHEN "01" => Y7 <= D17;WHEN "10" => Y7 <= D27;WHEN "11" => Y7 <= D37;END CASE;
CASE S ISWHEN "00" => Y8 <= D08;WHEN "01" => Y8 <= D18;WHEN "10" => Y8 <= D28;WHEN "11" => Y8 <= D38;END CASE;
END PROCESS;
end comportamental;
- Simulación.
PROYECTO N° 3
Realice en código VHDL la descripción estructural de un codificador decimal cuyas salidas son activas en un cero lógico. Se pide:
- Análisis del problema
- Codificación en VHDL del decodificador decimal
- Pruebas de simulación para el sistema propuesto
- Algoritmo.
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;--practica electronica digital. jueves 4.00;5:30--nombres; ccorahua santo oscar-- cornejo condori carlos
entity decodif is Port ( x : in STD_LOGIC_VECTOR (3 downto 0); a : out STD_LOGIC; b : out STD_LOGIC; c : out STD_LOGIC; d : out STD_LOGIC; e : out STD_LOGIC; f : out STD_LOGIC; g : out STD_LOGIC; h : out STD_LOGIC; i : out STD_LOGIC; j : out STD_LOGIC);end decodif;
architecture Behavorial of decodif is
beginprocess (x) begina <= '1';b <= '1';c <= '1';d <= '1';e <= '1';f <= '1';g <= '1';h <= '1';i <= '1';j <= '1';if X = "0000" thena <= '0';elsif X = "0001" thenb <= '0';elsif X = "0010" thenc <= '0';elsif X = "0011" then
d <= '0';elsif X = "0100" thene <= '0';elsif X = "0101" thenf <= '0';elsif X = "0110" theng <= '0';elsif X = "0111" thenh <= '0';elsif X = "1000" theni <= '0';else j <= '0';end if;end process;
end Behavorial;
- Simulación.
PROYECTO N°4
Realice en código VHDL la descripción de un flujo de datos de un sumador completo. Se pide:
a. Análisis del problema.b. Codificación en VHDL del sumador total.c. Pruebas de simulación para el sistema propuesto
VHDL:
----------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.---library UNISIM;---use UNISIM.VComponents.all;-- Practica electronica digital , jueves 4.00-5.30-- Cornejo Condori Carlos, -- Ccorahua Santo Oscar
entity SUM_COM is Port ( x : in STD_LOGIC; y : in STD_LOGIC; z : in STD_LOGIC; s : out STD_LOGIC; c : out STD_LOGIC);end SUM_COM;
architecture Flujo_de_datos of SUM_COM is
begin
S<= X xor Y xor Z;C<= (X and Y) or ((X xor Y) and Z);
end Flujo_de_datos;
- Simulación:
CONCLUSIONES y OBSERVACIONES.
- Al usar estas compuertas lógicas se hace más fácil el trabajo.
- Podemos comprobar las simulaciones hechas con ejercicios descritos en la práctica.
- Se logró conocer más el uso de todas las compuertas logicas