Descripcion VHDL0
Descripcion VHDL0
DESCRIPCION EN VHDL
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity biestableD is
Port ( reloj : in STD_LOGIC;
reset : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC);
end biestableD;
begin
process (reloj)
begin
if reloj'event and reloj='1' then
if reset='1' then
Q <= '0';
else
Q <= D;
end if;
end if;
end process;
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity biestableT is
Técnicas Digitales I - 2017 Página 1 de 5
Port ( reloj : in STD_LOGIC;
T : in STD_LOGIC;
Q : out STD_LOGIC;
reset: in STD_LOGIC);
end biestableT;
with T select
Dp <= Qp when '0',
not (Qp) when others;
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity biestableJK is
Port ( reloj : in STD_LOGIC;
reset : in STD_LOGIC;
J,K : in STD_LOGIC;
Q : out STD_LOGIC);
end biestableJK;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity sumador_4bits is
Port ( Ent1 : in STD_LOGIC_VECTOR (3 downto 0);
Ent2 : in STD_LOGIC_VECTOR (3 downto 0);
Resultado : out STD_LOGIC_VECTOR (3 downto 0);
Carry : out STD_LOGIC);
end sumador_4bits;
COMPONENT sumador_medio
PORT (
A : IN std_logic;
B : IN std_logic;
Cout : OUT std_logic;
Suma : OUT std_logic
);
END COMPONENT
Técnicas Digitales I - Página 3 de 5
COMPONENT sumador_completo
PORT (
A : IN std_logic;
B : IN std_logic;
Cin : IN std_logic;
Cout : OUT std_logic;
Suma : OUT std_logic
);
END COMPONENT
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
begin
SUMA <= (B xor A) ;
COUT <= (B and A) ;
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity sumador_completo is
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
Cin : in STD_LOGIC;
Cout : out STD_LOGIC;
Suma : out STD_LOGIC);
end sumador_completo;
begin
SUMA <= (B xor A) xor CIN ;
COUT <= (B and A) or (( B xor A ) and CIN ) ;
end Behavioral;
ooo O ooo