








Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Encuentra los documentos específicos para los exámenes de tu universidad
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
VLSI laboratorio UNAM FI practicas de laboratorio
Tipo: Ejercicios
1 / 14
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!









Objetivos
Especificaciones
Diagrama bloques
Actividad 2. Separación en bloques del multiplexor En esta actividad, mi compañero Francisco y yo, nos encargamos de separar a manera de bloque el multiplexor implementado en el ejercicio anterior. De tal manera que pueda conectarse a cualquier otro programa que necesite uno y así pueda ocuparlo ahorrando muchas líneas de código. Es decir, creamos prácticamente un subprograma. El código es el siguiente: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity Mux is Port ( reloj : in STD_LOGIC; D0 : in STD_LOGIC_VECTOR (3 downto 0); D1 : in STD_LOGIC_VECTOR (3 downto 0); D2 : in STD_LOGIC_VECTOR (3 downto 0); D3 : in STD_LOGIC_VECTOR (3 downto 0); AN : out STD_LOGIC_VECTOR (3 downto 0); L : out STD_LOGIC_VECTOR (6 downto 0)); end Mux; architecture Behavioral of MuxDec4disp is signal rapido : std_logic; signal Qr : std_logic_vector(1 downto 0); signal Qs : std_logic_vector(3 downto 0); begin divi: process(reloj) variable cuenta: STD_LOGIC_VECTOR(27 downto 0) := X"0000000"; begin if rising_edge(reloj) then if cuenta = X"48009E0" then cuenta := X"0000000"; else cuenta := cuenta + 1; end if; end if; rapido <= cuenta(10); end process; CONTRAPID: process (rapido) variable CUENTA: STD_LOGIC_VECTOR(1 downto 0) := "00"; begin if rising_edge (rapido) then CUENTA := CUENTA + 1; end if; Qr <= CUENTA; end process;
seledisplay: process (Qr) BEGIN case Qr is when "00" => AN<= "1110"; Qs <= D0; when "01" => AN<= "1101"; Qs <= D1; when "10" => AN<= "1011"; Qs <= D2; when others => AN<= "0111"; Qs <= D3; end case; end process; with Qs SELECT L <= "1000000" when "0000", -- 0 "1111001" when "0001", -- 1 "0100100" when "0010", -- 2 "0110000" when "0011", -- 3 "0011001" when "0100", -- 4 "0010010" when "0101", -- 5 "0000010" when "0110", -- 6 "1111000" when "0111", -- 7 "0000000" when "1000", -- 8 "0010000" when "1001", -- 9 "1000000" when others; --F end Behavioral;
Actividad 3. Alarma para el reloj digital creado
rapido <= CUENTA(10); end process; ALARMA: Process (Qdh, Qdm, Quh, Qum) variable alarm: std_logic_vector(15 downto 0) := "0000001000000011"; ---Alarma a las 00: begin if Qdh = alarm(15 downto 12) then if Qdm = alarm(11 downto 8) then if Quh = alarm(7 downto 4) then if Qum = alarm(3 downto 0) then stop<='1'; else stop<='0'; end if; else stop<='0'; end if; else stop<='0'; end if; else stop<='0'; end if; end Process; UNIDADES: process (segundo, stop) variable CUENTA: STD_LOGIC_VECTOR(3 downto 0) := "0000"; begin if stop = '0' then --No stamos en alarma if rising_edge (segundo) then if CUENTA ="1001" then CUENTA :="0000"; N <= '1'; else CUENTA := CUENTA +1; N <= '0'; end if; end if; end if; Qum <= CUENTA; end process; DECENAS: process (N,stop) variable CUENTA: STD_LOGIC_VECTOR(3 downto 0) := "0000"; begin if stop = '0' then --No estamos en alarma if rising_edge (N) then if CUENTA ="0101" then CUENTA :="0000"; E <= '1'; else CUENTA := CUENTA +1;
end if; end if; end if; Qdm <= CUENTA; end process; HoraU: Process(E, reset, stop) variable cuenta: std_logic_vector(3 downto 0):="0000"; begin if stop = '0' then --No estamos en alarma if rising_edge(E) then --Arri if cuenta="1001" then cuenta:= "0000"; Z<='1'; else cuenta:=cuenta+1; Z<='0'; end if; if reset='1' then cuenta:="0000"; end if; end if; end if; Quh <= cuenta; U <= cuenta(2); end process; HORAD: Process(Z, reset, stop) variable cuenta: std_logic_vector(3 downto 0):="0000"; begin if stop = '0' then --No estamos en alarma if rising_edge(Z) then if cuenta="0010" then cuenta:= "0000"; else cuenta:=cuenta+1; end if; if reset='1' then cuenta:="0000"; end if; end if; end if; Qdh<=cuenta; D <=cuenta(1); end Process; inicia: process (U,D) begin reset <= (U and D); end process;
when "01" => AN<= "1101"; when "10" => AN<= "1011"; when others => AN<= "0111"; end case; end process; with Qs SELECT L <= "1000000" when "0000", -- 0 "1111001" when "0001", -- 1 "0100100" when "0010", -- 2 "0110000" when "0011", -- 3 "0011001" when "0100", -- 4 "0010010" when "0101", -- 5 "0000010" when "0110", -- 6 "1111000" when "0111", -- 7 "0000000" when "1000", -- 8 "0010000" when "1001", -- 9 "1111111" when others; --F end Behavioral;
Funcionamiento
Ilustración 1. Multiplexeo, probado solo con dos vectores.
Ilustración 2. Alarma parada a las 00: Funcionamiento de la alarma: https://youtu.be/MHNN8BlA-C Funcionamiento del multiplexor: https://drive.google.com/file/d/1PTwJzIkVObmdENj8XjqWoafsYPzGrYrF/view?usp=sharing No me fue posible subirlo a YouTube el servidor lo tiraba, puede descargarse en ese enlace. Conclusiones