Sie sind auf Seite 1von 5

Contenido

Pregunta 1.......................................................................................................... 2
Parte A............................................................................................................. 2
Especificacin en VHDL................................................................................ 2
Simulacin.................................................................................................... 3
Parte B............................................................................................................. 3
Especificacin en VHDL................................................................................ 4
Simulacin.................................................................................................... 5

Pregunta 1
Parte A
Mux 4 a 1 con habilitacin activo en 0
1

Especificacin en VHDL
La especificacin en VHDL es la siguiente:
library ieee;
use ieee.std_logic_1164.all;
ENTITY mux4a1
PORT(
En :
S
:
I
:
Z
:
);
END mux4a1;

IS
IN
IN
IN
OUT

STD_LOGIC;
STD_LOGIC_VECTOR(1 DOWNTO 0);
STD_LOGIC_VECTOR(3 DOWNTO 0);
STD_LOGIC

architecture ArMux of mux4a1 is


begin
process(En,S)
begin
if En = '0' then
case S is
when "00" =>
Z <= I(0);
when "01" =>
Z <= I(1);
when "10" =>
Z <= I(2);
when others =>
Z <= I(3);
end case;
else
Z <= '0';
end if;
end process;
end ArMux;

Simulacin
Los resultados de la simulacin son los siguientes:

Parte B
74138

La tabla de verdad del 74138 es la siguiente:

Note 1: G2 = G2A + G2B

Especificacin en VHDL
La especificacin en VHDL es la siguiente:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity deco138 is
port(
entrada
g1,g2A,g2B
Y
);
end deco138;

: in std_logic_vector(2 downto 0);


: in std_logic;
: out std_logic_vector(7 downto 0)

architecture ar of deco138 is
signal g2: std_logic := '0';
begin
g2 <= g2A or g2B;
Y <=

(others => '1')


"01111111"
"10111111"
"11011111"
"11101111"
"11110111"
"11111011"
"11111101"
"11111110"
"11111111";

when
when
when
when
when
when
when
when
when

g2 = '1' or g1 = '0'
entrada = "000"
entrada = "001"
entrada = "010"
entrada = "011"
entrada = "100"
entrada = "101"
entrada = "110"
entrada = "111"

end ar;

else
else
else
else
else
else
else
else
else

Simulacin
Los resultados de la simulacin son los siguientes:

Das könnte Ihnen auch gefallen