Professional Documents
Culture Documents
Circuitos Digitales: Tema: Trabajo de VHDL
Circuitos Digitales: Tema: Trabajo de VHDL
Circuitos Digitales
CODIGO: 12190007
2.47 a) Escriba el código VHDL para describir las funciones siguientes:
𝑓1 = 𝑥1 . ̅̅̅
𝑥3 + 𝑥2 . ̅̅̅
𝑥3 + ̅̅̅.
𝑥3 ̅̅̅
𝑥4 + 𝑥1 . 𝑥2 + 𝑥1 . ̅̅̅
𝑥4
𝑓2 = (𝑥1 + ̅̅̅).
𝑥3 (𝑥1 + 𝑥2 + ̅̅̅).
𝑥4 (𝑥2 + ̅̅̅
𝑥3 + ̅̅̅)
𝑥4
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity numero is
x2:in STD_LOGIC;
x3:in STD_LOGIC;
x4:in STD_LOGIC;
f1,f2:OUT STD_LOGIC);
end numero;
begin
end dataflow;
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);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity problema2 is
x2:in STD_LOGIC;
x3:in STD_LOGIC;
x4:in STD_LOGIC;
F1,F2:OUT STD_LOGIC);
end problema2;
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 behavioral;
𝑓(𝑥1 … 𝑥4 ) = ∑ 𝑚(0,1,2,4,5,7,8,9,11,12,14,15)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity problema33 is
end problema33 ;
begin
end behavioral;
𝑓1 =. ̅̅̅.
𝑥1 ̅̅̅
𝑥3 + 𝑥2 . 𝑥3 . 𝑥4 + 𝑥1 . 𝑥2 . 𝑥3
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity problema9 is
x2:in STD_LOGIC;
x3:in STD_LOGIC;
x4:in STD_LOGIC;
F1:OUT STD_LOGIC);
end problema9;
begin
F1<=((not x1) and (not x3))or( x2 and x3 and x4)or(x1 and x2 and x3);
end behavioral;
4.40 Escriba el codigo VHDL para implementar la siguiente función
𝑓(𝑥1 … 𝑥4 ) = ∏ 𝑀(6,8,9,12,13)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity problema4 is
end problema4 ;
begin
end behavioral;
𝑓1 = ( 𝑥2 + ̅̅̅)(𝑥
𝑥3 ̅̅̅1̅ + ̅̅̅
𝑥2 +𝑥4 ))
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity problema10 is
x2:in STD_LOGIC;
x3:in STD_LOGIC;
x4:in STD_LOGIC;
F1:OUT STD_LOGIC);
end problema10;
begin
F1<=(x2 and (not x3)) or ( (not x1) and (not x2) and x4);
end behavioral;
COMENTARIOS
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
Son las librerías a usarse para evocar los respectivos operadores lógicos
entity problema10 is
x2:in STD_LOGIC;
x3:in STD_LOGIC;
x4:in STD_LOGIC;
F1:OUT STD_LOGIC);
Luego viene la segunda parte que es la arquitectura que sirve para describir la operación
interna de la función lógica
begin
F1<=(x2 and (not x3)) or ( (not x1) and (not x2) and x4);
end behavioral;