Professional Documents
Culture Documents
DE SAN MARCOS
Universidad del Perú, DECANA DE AMERICA
2019 – 2
PROBLEMA 1
Codigo VHDL:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
entity problema523 is
port (Cin: in std_logic;
x3,x2,x1,x0 : in std_logic;
y3,y2,y1,y0 : in std_logic;
s3,s2,s1,s0: out std_logic;
Cout : out std_logic);
end problema523;
architecture solucion of problema523 is
signal c1,c2,c3: std_logic;
component fulladd
port (Cin,x,y: in std_logic;
s, Cout:out std_logic);
end component;
begin
Waveform Editor
LIBRARY work;
LIBRARY ieee ;
USE ieee.std_logic_1164.all ;
USE fulladd_package.all ;
ENTITY problema525 IS
END problema525 ;
BEGIN
Cin => c3, Cout => Cout, x => x3, y => y3, s => s3 ) ;
END Structure ;
LIBRARY ieee ;
USE ieee.std_logic_1164.all ;
USE ieee.std_logic_signed.all ;
ENTITY problema528 IS
X, Y : IN STD_LOGIC_VECTOR(15 DOWNTO 0) ;
END problema528 ;
end behavior;
LIBRARY ieee ;
USE ieee.std_logic_1164.all ;
USE ieee.std_logic_arith.all ;
ENTITY problema529 IS
X, Y : IN SIGNED(15 DOWNTO 0) ;
END problema529 ;
BEGIN
end behavior;
PROBLEMA 5.17
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY procinco IS
PORT( Input : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
Output : OUT STD_LOGIC_VECTOR(3 DOWNTO 0));
END procinco;
ARCHITECTURE LogicFunc OF procinco IS
BEGIN
WITH Input select
Output <= "0001" when "0101",
"0010" when "0110",
"0011" when "0111",
"0010" when "1001",
"0100" when "1010",
"0110" when "1011",
"0011" when "1101",
"0110" when "1110",
"1001" when "1111",
"0000" when OTHERS;
END LogicFunc ;
El
5.37 PROBLEMA: Escriba el código VHDL para especificar el circuito de la figura 5.36
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
ENTITY problemita IS
END problemita ;
BEGIN
end behavior ;
PROBLEMA 5.11
LIBRARY IEEE;
USE IEEE.std_logic_1164.all;
ENTITY example8 is
z, n, v : OUT std_logic );
end example8;
c(0) <= (A(0) and not B(0)) or ((A(0) xor not B(0)) and '1' );
c(1) <= (A(1) and not B(1)) or ((A(1) xor not B(1)) and c(0));
c(2) <= (A(2) and not B(2)) or ((A(2) xor not B(2)) and c(1));
c(3) <= (A(3) and not B(3)) or ((A(3) xor not B(3)) and c(2));
n<=sum(3);
END sumador ;