Professional Documents
Culture Documents
Taller Completo
Taller Completo
INTEGRANTES
DOCENTE
ING. EYBERTH ROLANDO ROJAS MARTINEZ
entity comparador is
Port ( T1 : in STD_LOGIC_VECTOR (1 downto 0);
T2 : in STD_LOGIC_VECTOR (1 downto 0);
T3 : in STD_LOGIC_VECTOR (1 downto 0);
TP : in STD_LOGIC_VECTOR (1 downto 0);
S : out STD_LOGIC);
end comparador;
begin
process(T1,T2,T3,TP)
begin
if TP>=T1 then
S <= '1';
elsif TP<=T2 then
S <= '1';
elsif TP>=T3 then
S <= '1';
else
S<='0';
end if;
end process;
end Behavioral;
Estructural
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity ej_1comp is
Port ( sen : in STD_LOGIC_VECTOR (2 downto 0);
err : out STD_LOGIC;
sal : out STD_LOGIC);
end ej_1comp;
begin
process (sen) is
begin
else
sal <= '0';
err <= '1';
end if;
end process;
END Behavioral;
EJERCIO 2
comportamental
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity taller is
A : in STD_LOGIC;
B : in STD_LOGIC;
C : in STD_LOGIC;
M : out STD_LOGIC;
V : out STD_LOGIC;
C1 : out STD_LOGIC;
C2 : out STD_LOGIC);
end taller;
architecture Behavioral of taller is
begin
process(A,B,C,bot)
begin
V<='0';
C2<='0';
C1<='0';
M<='1';
M<='0';
if A = '1' then
V<='0';
V<='1';
end if;
if B = '1' then
C1<='1';
C1<='0';
end if;
if C = '1' then
C2<='1';
elsif C='0' then
C2<='0';
end if;
end if;
end process;
end Behavioral;
estructural
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity eje2_compor is
Port ( sens : in STD_LOGIC_VECTOR (2 downto 0);
bot : in STD_LOGIC;
SAL : out STD_LOGIC_VECTOR (3 downto 0));
end eje2_compor;
begin
process (sens, bot)
begin
if ( bot = '0') then
if ( sens = "000") then
SAL <= "1000";
else
SAL <= "1000";
end if;
else
end Behavioral;
3)Comportamental
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity punto_3 is
Port ( b1 : in STD_LOGIC;
b2 : in STD_LOGIC;
n1 : in STD_LOGIC;
n2 : in STD_LOGIC;
m1 : out STD_LOGIC;
m2 : out STD_LOGIC);
end punto_3;
begin
process(b1,b2,n1,n2)
begin
else
m1 <= '0';
m2 <= '0';
end if;
end process;
end Behavioral;
RTL schematic
estructural
Library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-
entity ejer_3 is
Port ( ENTSENSORES : in STD_LOGIC_VECTOR (3 downto 0);
SALBOM : out STD_LOGIC_VECTOR (1 downto 0));
end ejer_3;
begin
Process ( ENTSENSORES) IS
BEGIN
CASE ENTSENSORES IS
when "0011" => SALBOM<= "00";
when "0111" => SALBOM<= "00";
when "1011" => SALBOM<= "00";
when "1111" => SALBOM<= "00";
when "1001" => SALBOM<= "00";
when "0101" => SALBOM<= "00";
when "0000" => SALBOM<= "00";
when "1100" => SALBOM<= "00";
when "1000" => SALBOM<= "00";
when "0100" => SALBOM<= "00";
when OTHERS => SALBOM<= "00";
END CASE;
END PROCESS;
end Behavioral;
RTL SCHEMATIC
A la descripción en VHDL del circuito le hace falta el mapeo de los componentes para
2. use IEEE.STD_LOGIC_1164.ALL;
3.
4. entity visualizacion is
7. selx : in STD_LOGIC;
13. PORT(
18. );
21. PORT(
26. );
29. PORT(
32. );
35. PORT(
38. );
43. begin
45. D0 => a ,
46. D1 => b ,
47. a1 => sa1 ,
49. );
54. s => ss
55. );
57. n => ss ,
59. );
63. );