Professional Documents
Culture Documents
Presentado por:
Francisco Javier Chvez Flrez
Cdigo: 1080262056
Grupo 243004_33
Resumen simulacion:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity simul1 is
-- Port ( );
end simul1;
component multiplexor8a1
Port ( E0 : in STD_LOGIC_VECTOR (6 downto 0);
E1 : in STD_LOGIC_VECTOR (6 downto 0);
E2 : in STD_LOGIC_VECTOR (6 downto 0);
E3 : in STD_LOGIC_VECTOR (6 downto 0);
E4 : in STD_LOGIC_VECTOR (6 downto 0);
E5 : in STD_LOGIC_VECTOR (6 downto 0);
E6 : in STD_LOGIC_VECTOR (6 downto 0);
E7 : in STD_LOGIC_VECTOR (6 downto 0);
SELECTOR : in STD_LOGIC_VECTOR (3 downto 0);
SALIDA : out STD_LOGIC_VECTOR (6 downto 0)
);
end component;
-- Seales de salidas
signal SALIDA : std_logic_vector(6 downto 0)
begin
UO: multiplexor8a1
Port map (
E0 => E0,
E1 => E1,
E2 => E2,
E3 => E3,
E4 => E4,
E5 => E5,
E6 => E6,
E7 => E7,
SELECTOR => SELECTOR,
SALIDA => SALIDA
);
process
begin
wait;
end process;
end Behavioral;
2. Describa en VDHL un decodificador de 3 entradas.
Nota en la tabla de verdad se debe tomar los 8 bit como queda como
decodificador de 3 a 8. Tomoanfo como partida que un decodificador de N
entradas es capa de direccionar 2 espacios de memorias. Para el ejercicio
empleare 3 a 6
begin
ENTRADAS <= E2 & E1 & E0;
with ENTRADAS select
SALIDAS <= "00000001" when "000",
"00000010" when "001",
"00000100" when "010",
"00001000" when "011",
"00010000" when "100",
"00100000" when "101",
"01000000" when "110",
"10000000" when others;
S7 <= SALIDAS (7);
S6 <= SALIDAS (6);
S5 <= SALIDAS (5);
S4 <= SALIDAS (4);
S3 <= SALIDAS (3);
S2 <= SALIDAS (2);
S1 <= SALIDAS (1);
S0 <= SALIDAS (0);
end Behavioral;
Resumen simulacion:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity PRUEBA1 is
-- Port ( );
end PRUEBA1;
-- Seales de salidas
signal S0 : std_logic;
signal S1 : std_logic;
signal S2 : std_logic;
signal S3 : std_logic;
signal S4 : std_logic;
signal S5 : std_logic;
signal S6 : std_logic;
signal S7 : std_logic;
begin
UTT: decodificador3a6
Port map (
E0 => E0,
E1 => E1,
E2 => E2,
S0 => S0,
S1 => S1,
S2 => S2,
S3 => S3,
S4 => S4,
S5 => S5,
S6 => S6,
S7 => S7
);
stim_proc: process
begin
wait for 100 ns;
E0 <= '0';
E1 <= '0';
E2 <= '0';
wait for 100 ns;
E0 <= '1';
E1 <= '0';
E2 <= '0';
wait for 100 ns;
E0 <= '0';
E1 <= '1';
E2 <= '0';
wait for 100 ns;
E0 <= '1';
E1 <= '1';
E2 <= '0';
wait for 100 ns;
E0 <= '1';
E1 <= '1';
E2 <= '0';
wait for 100 ns;
E0 <= '0';
E1 <= '0';
E2 <= '1';
wait for 100 ns;
E0 <= '1';
E1 <= '0';
E2 <= '1';
wait for 100 ns;
E0 <= '1';
E1 <= '1';
E2 <= '1';
wait for 100 ns;
wait;
end process;
end Behavioral;
3. Describa en VDHL un codificador de 4 entradas, sin prioridad.
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity codificador4E is
Port ( E3 : in STD_LOGIC;
E2 : in STD_LOGIC;
E1 : in STD_LOGIC;
E0 : in STD_LOGIC;
S2 : out STD_LOGIC;
S1 : out STD_LOGIC;
S0 : out STD_LOGIC);
end codificador4E;
begin
ENTRADAS <= E3 & E2 & E1 & E0;
with ENTRADAS select
SALIDAS <= "000" when "0000",
"001" when "0001",
"010" when "0010",
"011" when "0100",
"100" when "1000",
"000" when others;
S2 <= SALIDAS (2);
S1 <= SALIDAS (1);
S0 <= SALIDAS (0);
end Behavioral;
El diseo debe contener:
a. Un pantallazo de la descripcin en VHDL.
b. Un pantallazo de la simulacin, en el cual se debe evidenciar el correcto
funcionamiento del diseo.
Resumen simulacion:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity PRUEBA2 is
-- Port ( );
end PRUEBA2;
architecture Behavioral of PRUEBA2
component codificador4E
Port ( E3 : in STD_LOGIC;
E2 : in STD_LOGIC;
E1 : in STD_LOGIC;
E0 : in STD_LOGIC;
S2 : out STD_LOGIC;
S1 : out STD_LOGIC;
S0 : out STD_LOGIC
);
-- Seales de las entradas
signal E3 : std_logic := '0';
signal E2 : std_logic := '0';
signal E1 : std_logic := '0';
signal E0 : std_logic := '0';
-- Seales de salidas
signal S2 : std_logic;
signal S1 : std_logic;
signal S0 : std_logic;
begin
UTT: codificador4E
Port map (
E3 => E3,
E2 => E2,
E1 => E1,
E0 => E0,
S2 => S2,
S1 => S1,
S0 => S0
);
stim_proc: process
begin
wait for 10 ns;
E3 <= '0';
E2 <= '0';
E1 <= '0';
E0 <= '0';
wait for 10 ns;
E3 <= '0';
E2 <= '0';
E1 <= '0';
E0 <= '1';
wait for 10 ns;
E3 <= '0';
E2 <= '0';
E1 <= '1';
E0 <= '0';
wait for 10 ns;
E3 <= '0';
E2 <= '1';
E1 <= '0';
E0 <= '0';
wait for 10 ns;
E3 <= '1';
E2 <= '0';
E1 <= '0';
E0 <= '0';
wait for 10 ns;
wait;
end process;
end Behavioral;
4. Describa en VDHL un codificador de 4 entradas, con prioridad a la entrada
menor.
begin
-- se debe usar la sentencia when / else...
SALIDAS <= "100" when E3 = '1' else
"011" when E2 = '1' else
"010" when E1 = '1' else
"001" when E0 = '1' else
"000";
S2 <= SALIDAS (2);
S1 <= SALIDAS (1);
S0 <= SALIDAS (0);
end Behavioral;
El diseo debe contener:
a. Un pantallazo de la descripcin en VHDL.
b. Un pantallazo de la simulacin, en el cual se debe evidenciar el correcto
funcionamiento del diseo.
Resumen simulacion
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity PRUEBA3 is
-- Port ( );
end PRUEBA3;
wait;
end process;
end Behavioral;
5. Describa en VDHL el circuito que se muestra en la siguiente figura. El diseo
debe contener tres mdulos diferentes y un archivo de alto nivel, tal como se
muestra en la siguiente figura.
SELECTOR
entity alto_nivel is
Port ( A : in STD_LOGIC_VECTOR (3 downto 0);
B : in STD_LOGIC_VECTOR (3 downto 0);
SELECTOR : in STD_LOGIC;
F : out STD_LOGIC_VECTOR (3 downto 0));
end alto_nivel;
component RESTA
Port (
E_1_R : in STD_LOGIC_VECTOR (3 downto 0);
E_2_R : in STD_LOGIC_VECTOR (3 downto 0);
S_R : out STD_LOGIC_VECTOR (3 downto 0)
);
end component;
-- Seales de conexion...
signal C1 : STD_LOGIC_VECTOR (3 downto 0) := (OTHERS => '0');
signal C2 : STD_LOGIC_VECTOR (3 downto 0) := (OTHERS => '0');
begin
MULTIPLEXOR1: MULTIPLEXOR
Port map(
I0_M => C1,
I1_M => C1,
SEL => SELECTOR,
S_M => F
);
SUMADOR1: SUMA
Port map(
E_1_S => A,
E_2_S => B,
S_S => C1
);
RESTADOR1: RESTA
Port map(
E_1_R => A,
E_2_R => B,
S_R => C2
);
end Behavioral;
El diseo debe contener:
a. Un pantallazo de la descripcin en VHDL.
b. Un pantallazo con el RTL del alto nivel.
Resumen Simulacion
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity prueba4 is
-- Port ( );
end prueba4;
-- Seales de salidas
signal F : std_logic_vector(3 downto 0)
begin
UO: multiplexor8a1
Port map (
A => A,
B => B,
SELECTOR => SELECTOR,
F => F
);
process
begin
--- Estmulos de la simulacin
wait for 10 ns;
A <= "0000001";
B <= "0000010";
SELECTOR <= "00"
wait for 10 ns;
SELECTOR <= "01"
wait for 10 ns;
SELECTOR <= "10"
wait for 10 ns;
SELECTOR <= "11"
wait for 10 ns;
wait;
end process;
end Behavioral;
Sitios web:
6. Chu, P. P. (2006). RTL Hardware Design Using VHDL : Coding for Efficiency,
Portability, and Scalability. Hoboken, N.J.: Wiley-IEEE Press (Chapter 4, pp. 69-95)).
Recuperado de:
http://bibliotecavirtual.unad.edu.co:2051/login.aspx?direct=true&db=e000xww&AN
=158127&lang=es&site=ehost-live
Sitios web:
12. Chu, P. P. (2006). RTL Hardware Design Using VHDL : Coding for Efficiency,
Portability, and Scalability. Hoboken, N.J.: Wiley-IEEE Press (Chapter 4, pp. 69-95)).
Recuperado de:
http://bibliotecavirtual.unad.edu.co:2051/login.aspx?direct=true&db=e000xww&AN
=158127&lang=es&site=ehost-live