Professional Documents
Culture Documents
CODIGO
library ieee;
use ieee.std_logic_1164.all;
entity puertanor is
port (
a,b : in std_logic;
f : out std_logic
);
end puertanor;
begin
f<= a xnor b;
end rfba;
RTL
CAPTURA DEL CODIGO
2 OPERADOR QUE CUMPLA CON LA FUNCION
CODIGO
library ieee;
use ieee.std_logic_1164.all;
entity opefunc is
port (
A,B,C : IN std_logic;
f : out std_logic
);
end opefunc;
END RFBA;
RTL
COMENTARIO
library ieee;
use ieee.std_logic_1164.all;
entity muxwithsel is
port(
f: out std_logic
);
end muxwithsel;
with s select
f<= h(0) when "00",
h(1) when "01",
h(2) when "10",
h(3) when others ;
end rfba;
4 DECODIFICSADOR DE 3 ENTRADAS 8 SALIDAS (WI5H SELECT)
library ieee;
use ieee.std_logic_1164.all;
entity decowithsel is
port (
);
end decowithsel;
architecture rfba of decowithsel is
begin
with A select
end rfba;
5 SUMADOR SIN ACARREO
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity sum is
port (
);
end sum;
begin
s<= a + b;
end rfba;
6 SUMADOR CON ACARREO
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity sumacarreo is
port (
ci : in std_logic;
end sumacarreo;
BEGIN
co <= suma(4);
end rfba;
7 CODIFICADOR 4-2 CON PRIORIDAD
library ieee;
use ieee.std_logic_1164.all;
entity codiprio is
port (
z: out std_logic);
end codiprio;
begin
with w select
with w select
library ieee;
use ieee.std_logic_1164.all;
entity ejemplo1 is
B: in std_logic;
);
end ejemplo1;
begin
"000";
end rfba;
Ejemplo 2 en claces
Ejemplo 3 en claces
library ieee;
use ieee.std_logic_1164.all;
entity ejemplo3 is
port(
a,b : in std_logic;
y : out std_logic
);
end ejemplo3;
begin
process (a,b)
begin
y <= a and b;
end process;
end rfba;