Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Microelectronica Parcial 1
Microelectronica Parcial 1
1. Elaborar el código VHDL mediante el comando with – select el circuito que cumpla
la siguiente tabla:
SOLUCIÓN:
Se procedió a realizar el código correspondiente a la tabla inicial de datos.
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3 use IEEE.STD_LOGIC_ARITH.ALL;
4 use IEEE.STD_LOGIC_UNSIGNED.ALL;
5 entity pre1 is
6 Port( A: in STD_LOGIC_VECTOR(1 DOWNTO 0);
7 F : out STD_LOGIC);
8 end pre1;
9 architecture Behavioral of pre1 is
10 begin
11 with A select
12 F <= '1' when "00",
13 '0' when "01",
14 '1' when "10",
15 '1' when others;
16 end Behavioral;
Para la simulación se realizo lo que decia la tabla inicial, se tiene dos entradascon
una sola salida y para las conbinaciones de 0 y 1 presenta en unico caso en el que la
salida F será 0, para las otras 3 combinaciones la salida será 1. Capturas de pantalla
de la simulación realizada en el programa.Se presenta la simualción en diagramas
de tiempos correspondiantes a cada uno de las 4 conbinaciones posibles de la tabla
inicial.
Page 2
2. Elaborar el código VHDL. mediante el comando with – select Suponga que usted es
el sintetizador y debe sintetizar el RTL de la siguiente descripción:
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3 use IEEE.STD_LOGIC_UNSIGNED.ALL;
4 entity pre2 is
5 Port ( m : in STD_LOGIC;
6 n: in STD_LOGIC;
7 A : in STD_LOGIC_VECTOR (3 downto 0);
8 B : in STD_LOGIC_VECTOR (3 downto 0);
9 resultado : out STD_LOGIC_VECTOR (3 downto 0));
10 end pre2;
11 architecture Behavioral of pre2 is
12 begin
13 resultado <= A + B when m > n else
14 A or B when m = n else
15 A and B ;
16 end Behavioral;
Page 3
3. Diseñar y simular una ALU usando VHDL. Las operaciones que realizara el ALU
serán según la tabla mostrada.
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3 use IEEE.STD_LOGIC_UNSIGNED.ALL;
4 entity pre32 is
5 Port ( A : in STD_LOGIC_VECTOR (7 downto 0);
6 B : in STD_LOGIC_VECTOR (7 downto 0);
7 operacion : in STD_LOGIC_VECTOR (2 downto 0);
8 resultado : out STD_LOGIC_VECTOR (7 downto 0) );
9 end pre32;
10
13 begin
14 with operacion select
15 resultado <= A + B when "000",
16 A - B when "001",
17 A and B when "010",
18 A or B when "011",
19 A when "100",
20 B when "101",
21 not A when "110",
22 not B when others;
23
24 end Behavioral;
Page 4
Luego de realizar los codigos se procede a realizar el diagrama esquematico.
Page 5
4. Diseñar y simular una ALU usando VHDL. Las operaciones que realizara el ALU
serán según la tabla mostrada.
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3 use IEEE.STD_LOGIC_UNSIGNED.ALL;
4 entity pre4 is
5 Port ( A : in STD_LOGIC_VECTOR (7 downto 0);
6 B : in STD_LOGIC_VECTOR (7 downto 0);
7 operacion : in STD_LOGIC_VECTOR (1 downto 0);
8 resultado : out STD_LOGIC_VECTOR (7 downto 0));
9 end pre4;
10 architecture Behavioral of pre4 is
11 begin
12 with operacion select
13 resultado <= A + B when "00",
14 A - B when "01",
15 A when "10",
16 B when others;
17 end Behavioral;
Page 6
Despues de realizar la programación en el codigo se preocedio a generar el diagrama
esquematico de nuestro circuito.
Page 7
2) A - B, con A=08 y B=03 dando como resultado 5 en sistema decimal y en binario
con un valor de 0000101
Page 8
4) En el ultimo caso se coloca el valor de 11 para la operación que indica repetir el
valor de B. E n el sistema binario el valor de B=3 es 00000011
Page 9