Deber Digitales Nombre: Jossuet Farfan A. Codigo VHDL
Deber Digitales Nombre: Jossuet Farfan A. Codigo VHDL
Codigo VHDL
library IEEE;
use IEEE.STD_LOGIC_1164.all;
ENTITY sum IS
PORT (a : IN std_logic_vector(3 DOWNTO 0);
b : IN std_logic_vector(3 DOWNTO 0);
salida : OUT std_logic_vector(4 DOWNTO 0));
END sum;
PROCESS (a, b) IS
BEGIN
salida <= a + b;
END PROCESS;
END synth;
;
-- Programa principal
library ieee;
library milibreria;
use ieee.std_logic_1164.all;
use milibreria.puertas.all;
r,s,t,p: in std_logic;
y: out std_logic);
end variaspuertas;
begin
dum1<=r & p;
dum2<=r&s&p;
y<=x or z or w;
e : out bit);
end ejemplo;
signal c: bit;
begin
AND2 : process g
begin
c<= a and b;
wait on a, b;
end process;
begin
e<= c or d;
end process;
end rtl;
library IEEE;
use IEEE.STD_LOGIC_1164.all;
ENTITY sum IS
PORT (a : IN std_logic_vector(3 DOWNTO 0);
b : IN std_logic_vector(3 DOWNTO 0);
salida : OUT std_logic_vector(4 DOWNTO 0));
END sum;
begin
end DOS;