Professional Documents
Culture Documents
Bloques Conbinacionales VDHL - Gian Susana 1099881
Bloques Conbinacionales VDHL - Gian Susana 1099881
Clave: IEC208L
Sección: 4
Tema:
Nombre
ID:1099881
Procedimiento
En el caso del display el VHDL seria:
-- Decodificador BCD para display de leds.
library IEEE;
use IEEE.std_logic_1164.all;
entity decoderBCD4to7segments is
port (
a, b, c, d, e, f, g : out std_logic;
x3, x2, x1, x0 : in std_logic
);
end entity;
-- Decodificamos..
process (x3, x2, x1, x0)
variable auxVectOut : std_logic_vector (6 downto 0);
variable auxVectIn : std_logic_vector (3 downto 0);
begin
end process;
end architecture;
library IEEE;
use IEEE.std_logic_1164.all;
entity decoderBCD4to7segments_tb is
end entity;
component decoderBCD4to7segments is
port (
a, b, c, d, e, f, g : out std_logic;
x3, x2, x1, x0 : in std_logic
);
end component;
begin
generate_input_signals : process
begin
tbVectIn <= "UUUU"; wait for 10 ns;
tbVectIn <= "0000"; wait for 10 ns;
tbVectIn <= "0001"; wait for 10 ns;
tbVectIn <= "0010"; wait for 10 ns;
tbVectIn <= "0011"; wait for 10 ns;
tbVectIn <= "0100"; wait for 10 ns;
tbVectIn <= "0101"; wait for 10 ns;
tbVectIn <= "0110"; wait for 10 ns;
tbVectIn <= "0111"; wait for 10 ns;
tbVectIn <= "1000"; wait for 10 ns;
tbVectIn <= "1001"; wait for 10 ns;
tbVectIn <= "1010"; wait for 10 ns;
tbVectIn <= "1011"; wait for 10 ns;
tbVectIn <= "1100"; wait for 10 ns;
tbVectIn <= "1101"; wait for 10 ns;
tbVectIn <= "1110"; wait for 10 ns;
tbVectIn <= "1111"; wait for 10 ns;
report "Simulación terminada.";
wait;
end process;
end architecture;