Академический Документы
Профессиональный Документы
Культура Документы
Código: 2170647
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Nor4_comp is
port (a1,a2,a3,a4: in std_logic;
Z:out std_logic);
end Nor4_comp;
else
if (a1='0') then
if (a2='0') then
if (a3='0') then
if (a4='0') then
Z<='1';
end if;
end if;
end if;
end if;
end if;
end process;
end nor4;
Compuerta NAND de 4 Entradas
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Nand4_comp is
port (a1,a2,a3,a4: in std_logic;
Z:out std_logic);
end Nand4_comp;
else
if (a1='1') then
if (a2='1') then
if (a3='1') then
if (a4='1') then
Z<='0';
end if;
end if;
end if;
end if;
end if;
end process;
end nand4;
Compuerta NOT
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Not_comp is
port (a1: in std_logic;
Z:out std_logic);
end Not_comp;
if (a1='1') then
Z <= '0';
else
Z <= '1';
end if ;
end process;
end Nott;
Multiplexor de 8 a 1
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity mux8_comp is
end mux8_comp;
Case S is
when "000" => Z <=a1(0);
when "001" => Z <=a1(1);
when "010" => z <=a1(2);
when "011" => Z <=a1(3);
when "100" => Z <=a1(4);
when "101" => Z <=a1(5);
when "110" => Z <=a1(6);
when others => z <=a1(7);
end case;
end process;
end mux8;
entity grey4b is
port ( a1: in std_logic_vector(3 downto 0);
Z: out std_logic_vector(3 downto 0));
end grey4b;
case a1 is
Decodificador e 4 a 16
Library IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
ENTITY DECO4_16 IS
port(A : in STD_LOGIC_VECTOR(3 downto 0);
END DECO4_16;
ARCHITECTURE deco OF DECO4_16 IS
begin
PROCESS (A)
begin
CASE A IS
WHEN "0000" => Y <= "0000000000000001";
WHEN "0001" => Y <= "0000000000000010";
WHEN "0010" => Y <= "0000000000000100";
WHEN "0011" => Y <= "0000000000001000";
WHEN "0100" => Y <= "0000000000010000";
WHEN "0101" => Y <= "0000000000100000";
WHEN "0110" => Y <= "0000000001000000";
WHEN "0111" => Y <= "0000000010000000";
WHEN "1000" => Y <= "0000000100000000";
WHEN "1001" => Y <= "0000001000000000";
WHEN "1010" => Y <= "0000010000000000";
WHEN "1011" => Y <= "0000100000000000";
WHEN "1100" => Y <= "0001000000000000";
WHEN "1101" => Y <= "0010000000000000";
WHEN "1110" => Y <= "0100000000000000";
WHEN OTHERS => Y <= "1000000000000000";
END CASE;
end process;
END deco;