Vous êtes sur la page 1sur 7

Universidad Nacional Mayor de San Marcos

Facultad de Ingeniería Electrónica y Eléctrica

Apellidos y Nombres: N° de Matricula:

Andrade Siancas, Junior Aldair 17190006

Curso: Tema:

Circuitos Digitales VHDL

Trabajo: Fechas: Nota:

Tarea Realización: Entrega:

Numero:
12/05/19 13/05/19
Final

Grupo: Profesor:
Numero: Horario:
Martes: Alarcón Matutti, Rubén
2
14-18 Hrs
PROBLEMA 2.47:
a) Escriba código de VHDL para describir las funciones siguientes:
𝒇𝟏 = 𝒙𝟏 ̅̅̅
𝒙𝟑 + 𝒙𝟐 ̅̅̅
𝒙𝟑 + ̅̅̅
𝒙𝟑 ̅̅̅
𝒙𝟒 + 𝒙𝟏 𝒙𝟐 + 𝒙𝟏 ̅̅̅
𝒙𝟒
𝒇𝟐 = (𝒙𝟏 + ̅̅̅).
𝒙𝟑 (𝒙𝟏 + 𝒙𝟐 + ̅̅̅).
𝒙𝟒 (𝒙𝟐 + ̅̅̅
𝒙𝟑 + ̅̅̅)
𝒙𝟒
Código VHDL:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity problema1 is
port( x1 : in std_logic;
x2 : in std_logic;
x3 : in std_logic;
x4 : in std_logic;
f1,f2 : out std_logic);
end problema1;
architecture solucion1 of problema1 is
begin
f1<= (x1 and(not x3))or(x2 and(not x3))or((not x3)and(not x4))or(x1 and x2)or(x1
and(not x4));
f2<= (x1 or(not x3))and(x1 or x2 or(not x4))and(x2 or(not x3)or(not x4));
end solucion1;

b) Use simulación funcional para comprobar que 𝒇𝟏 = 𝒇𝟐.


Y nuestra gráfica nos queda

Logramos verificar que ambas funciones tienen los mismos valores


PROBLEMA 2.48:
Considere las instrucciones siguientes de asignación en VHDL
𝒇𝟏 < = ((𝒙𝟏 𝑨𝑵𝑫 𝒙𝟑) 𝑶𝑹 (𝑵𝑶𝑻 𝒙𝟏 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟑)) 𝑶𝑹 ((𝒙𝟐 𝑨𝑵𝑫 𝒙𝟒) 𝑶𝑹 (𝑵𝑶𝑻 𝒙𝟐𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟒));

𝒇𝟐 < = (𝒙𝟏 𝑨𝑵𝑫 𝒙𝟐 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟑 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟒) 𝑶𝑹 (𝑵𝑶𝑻 𝒙𝟏 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟐 𝑨𝑵𝑫 𝒙𝟑 𝑨𝑵𝑫 𝒙𝟒) 𝑶𝑹

(𝒙𝟏 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟐 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟑 𝑨𝑵𝑫 𝒙𝟒) 𝑶𝑹 (𝑵𝑶𝑻 𝒙𝟏 𝑨𝑵𝑫 𝒙𝟐 𝑨𝑵𝑫 𝒙𝟑 𝑨𝑵𝑫 𝑵𝑶𝑻 𝒙𝟒)

a) Escriba el código de VHDL completo para implementar f1 y f2


CÓDIGO VHDL
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity probema2 is
port
(
-- input ports
x1,x2,x3,x4 : in bit;

-- output ports
f1,f2 : out bit );

end problema2 ;

architecture solucion2 of problema2 is

begin

f1<=((x1 and x3)or(not x1 and not x3 )) or ((x2 and x4) or (not x2 and not x4));
f2<=((x1 and x2 and not x3 and not x4) or (not x1 and not x2 and x3 and x4)
or (x1 and not x2 and not x3 and x4) or (not x1 and x2 and x3 and not x4));

end solucion2 ;

̅̅̅
b) Use simulación funcional para comprobar que 𝐟𝟏 = 𝐟𝟐
Y nuestra gráfica nos queda:

̅̅̅̅ si se cumple.
Como podemos verificar 𝑓1 = 𝑓2
PROBLEMA 4.38:
Escriba el código de VHDL para implementar la función
𝒇(𝒙𝟏 , … , 𝒙𝟒 ) = ∑ 𝒎(𝟎, 𝟏, 𝟐, 𝟒, 𝟓, 𝟕, 𝟖, 𝟗, 𝟏𝟏, 𝟏𝟐, 𝟏𝟒, 𝟏𝟓)
Pasamos los datos de minterminos a un mapa de Karnaugh y poder hacer la
simplificación respectiva para poder hallar nuestra función

𝒙𝟏 𝒙𝟐 \𝒙𝟑 𝒙𝟒 00 01 11 10

00 1 1 1

01 1 1 1
11 1 1 1

10 1 1 1

Lo que obtendríamos sería:


𝐟 = ̅̅̅𝐱
𝐱 𝟏 ̅̅̅𝟑 + ̅̅̅𝐱
𝐱 𝟑 ̅̅̅𝟒 + ̅̅̅𝐱
𝐱 𝟐 ̅̅̅𝟑 + 𝐱 𝟏 𝐱 𝟑 𝐱 𝟒 + 𝐱 𝟐 𝐱 𝟑 𝐱 𝟒 + 𝐱 𝟏 𝐱 𝟐 𝐱 𝟑 + ̅̅̅
𝐱 𝟏 ̅̅̅̅
𝐱 𝟐 ̅̅̅
𝐱𝟒
Escribiendo el código VHDL de la función
entity problema3 is
port (a,b,c,d: in bit; z: out bit);
end problema3 ;

architecture solucion3 of problema3 is


begin
z <= (not a and not c) or (not c and not d) or (not b and not c) or (a and c and
d) or (b and c and d) or (a and b and c) or (not a and not b and not d);
end solucion3;

PROBLEMA 4.39:
Escriba el código de VHDL para implementar la función
𝒇(𝒙𝟏 , … , 𝒙𝟒 ) = ∑ 𝒎(𝟏, 𝟒, 𝟕, 𝟏𝟒, 𝟏𝟓) + 𝑫(𝟎, 𝟓, 𝟗)
Pasamos los datos de minterminos a un mapa de Karnaugh y poder hacer la
simplificación respectiva para poder hallar nuestra función

𝒙𝟏 𝒙𝟐 \𝒙𝟑 𝒙𝟒 00 01 11 10

00 1 1

01 1 X 1
11 1 1

10 X

Lo que obtendríamos sería:


𝐟 = ̅̅̅
𝐱 𝟏 ̅̅̅
𝐱𝟑 + 𝐱𝟐𝐱𝟑𝐱𝟒 + 𝐱𝟏𝐱𝟐𝐱𝟑
Escrbiendo el código VHDL de la función
entity problema4 is
port (a,b,c,d: in bit; z: out bit);
end entity problema4;
architecture solucion4 of problema4 is
begin
z <= (not a and not c) or (b and c and d) or (a and b and c);
end solucion4;

PROBLEMA 4.40:
Escriba el código de VHDL para implementar la función
𝒇(𝒙𝟏 , … , 𝒙𝟒 ) = ∏ 𝑴(𝟔, 𝟖, 𝟗, 𝟏𝟐, 𝟏𝟑)
Pasamos los datos de maxterminos a un mapa de Karnaugh y poder hacer la
simplificación respectiva para poder hallar nuestra función
𝒙𝟏 𝒙𝟐 \𝒙𝟑 𝒙𝟒 00 01 11 10

00

01 0
11 0 0

10 0 0

Lo que obtendríamos sería:


𝐟 = (𝐱
̅̅̅𝟏 + 𝐱 𝟑 ). (𝐱 𝟏 + ̅̅̅
𝐱 𝟐 + ̅̅̅
𝐱𝟑 + 𝐱𝟒)
Escrbiendo el código VHDL de la función
entity problema5 is
port (a,b,c,d: in bit; z: out bit);
end problema5;

architecture solucion5 of problema5 is


begin
z <= (not a or c) and (a or not b or not c or d);
end arch;

PROBLEMA 4.41:
Escriba el código de VHDL para implementar la función
𝒇(𝒙𝟏 , … , 𝒙𝟒 ) = ∏ 𝑴(𝟑, 𝟏𝟏, 𝟏𝟒) + 𝑫(𝟎, 𝟐, 𝟏𝟎, 𝟏𝟐)
Pasamos los datos de maxtérminos a un mapa de Karnaugh y poder hacer la
simplificación respectiva para poder hallar nuestra función
𝒙𝟏 𝒙𝟐 \𝒙𝟑 𝒙𝟒 00 01 11 10

00 X 0 X

01
11 X 0

10 0 X

Lo que obtendríamos sería:


𝑓 = (𝑥2 + ̅̅̅).
𝑥3 (𝑥 ̅̅̅1 + ̅̅̅
𝑥2 + 𝑥4 )
Escrbiendo el código VHDL de la función:
entity problema6 is
port (a,b,c,d: in bit; z: out bit);
end entity problema6;

architecture solucion6 of problema6 is


begin
z <= (b or not c) and (not a or not b or d);
end solucion6;

Vous aimerez peut-être aussi