Professional Documents
Culture Documents
Ejercicio 3 - Codigos
Ejercicio 3 - Codigos
************************DESING. VHD*******************
--------------------------------------------------------------
-- Nombre:
-- Documento:
-- Fecha:
-- Proyecto:
--------------------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use IEEE.std_logic_unsigned.all;
entity codificador is
Port ( ent1, ent2, ent3, ent4: in STD_LOGIC;
sal0, sal1, sal2 : out STD_LOGIC
);
end codificador;
begin
-- DISEÑO
entradas <= ent1 & ent2 & ent3 & ent4;
end Behavioral;
**********************TESTBENCH.VHD****************
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Simulacion is
--
end Simulacion;
component codificador
Port ( ent1, ent2, ent3, ent4: in STD_LOGIC;
sal0, sal1,sal2 : out STD_LOGIC
);
end component;
-- Señales de salidas
begin
process begin
--- Estímulos de la simulación wait for 100 ns;
wait for 100 ns;
wait;
end process;
end Behavioral;