Professional Documents
Culture Documents
INGENIERÍA ELECTRÓNICA
Grupo: 1
Fecha: 2019-04-26
PRUEBA 1
CODIGO VHDL:
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Design Name:
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity prueba is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c : in STD_LOGIC;
d : in STD_LOGIC;
f1 : out STD_LOGIC;
f2 : out STD_LOGIC);
end prueba;
begin
t3 <= a or t1;
t4 <= t2 xnor d;
f1 <= t3 or t4;
f2 <= t2 or d;
end Behavioral;
-- Company:
-- Engineer:
--
-- Design Name:
-- Target Device:
-- Tool versions:
-- Description:
--
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
-- Notes:
-- This testbench has been automatically generated using types std_logic and
-- std_logic_vector for the ports of the unit under test. Xilinx recommends
-- that these types always be used for the top-level I/O of a design in order
-- simulation model.
--------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.numeric_std.ALL;
ENTITY tb_prueba IS
END tb_prueba;
COMPONENT prueba
PORT(
a : IN std_logic;
b : IN std_logic;
c : IN std_logic;
d : IN std_logic;
f1 : OUT std_logic;
f2 : OUT std_logic
);
END COMPONENT;
--Inputs
signal f1 : std_logic;
signal f2 : std_logic;
BEGIN
a => a,
b => b,
c => c,
d => d,
f1 => f1,
f2 => f2
);
--<clock>_process :process
--begin
--end process;
-- Stimulus process
stim_proc: process
begin
a <= '0';
b <= '0';
c <= '0';
d <= '0';
a <= '0';
b <= '0';
c <= '0';
d <= '1';
a <= '0';
b <= '0';
c <= '1';
d <= '0';
a <= '0';
b <= '0';
c <= '1';
d <= '1';
a <= '0';
b <= '1';
c <= '0';
d <= '0';
b <= '1';
c <= '0';
d <= '1';
a <= '0';
b <= '1';
c <= '1';
d <= '0';
a <= '0';
b <= '1';
c <= '1';
d <= '1';
a <= '1';
b <= '0';
c <= '0';
d <= '0';
a <= '1';
b <= '0';
c <= '0';
d <= '1';
a <= '1';
b <= '0';
c <= '1';
d <= '0';
a <= '1';
b <= '0';
c <= '1';
d <= '1';
a <= '1';
b <= '1';
c <= '0';
d <= '0';
a <= '1';
b <= '1';
c <= '0';
d <= '1';
a <= '1';
b <= '1';
c <= '1';
d <= '0';
a <= '1';
b <= '1';
c <= '1';
d <= '1';
wait;
end process;
END;