TP3 Fpga

Páginas: 3 (629 palabras) Publicado: 28 de junio de 2015
UNIVERSIDAD NACIONAL DE CORDOBA
FACULTAD DE CIENCIAS EXACTAS, FISICAS Y NATURALES

TRABAJO PRÁCTICO N°3: FPGA
Integrantes:
Carretero, Rocío - 37497246
Pautasso, Juan José - 36985627
Vega, María Laura- 38179407
Docente a cargo: Prof. Ing. Ruben Vrech

1

CONSIGNA:
Implementar un circuito sumador-restador binario de 4 bits mediante la placa Xilinx
Spartan-3E FPGA.
DESARROLLO:
Para realizar elcircuito, utilizamos el software Xilinx ISE. En el mismo programamos el
funcionamiento del circuito a implementar de la siguiente manera:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
useIEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity sumarestador is
Port ( num1 : in STD_LOGIC_VECTOR (3 downto 0);
num2 : in STD_LOGIC_VECTOR (3 downto 0);
total : out STD_LOGIC_VECTOR (3 downto 0);sumres : in STD_LOGIC;
cout : out STD_LOGIC;
signo : out STD_LOGIC);
end sumarestador;
architecture Behavioral of sumarestador is
begin
process(num1,num2)
begin
if sumres = '1' then
total <= num1 + num2;signo <= '0';
if ( '1' = (num1(3)or num2(3)))then
if ('1' = (num1(3) and num2(3))) then
cout <= '1';
else
if ( '1' = (num1(2) or num2(2)))then
if ('1' = (num1(2) and num2(2))) then
cout <= '1';
elseif ( '1'= (num1(1)or num2(1)))then
if ('1'= (num1(1) and num2(1))) then
cout <= '1';
else
if ('1' = (num1(0) and num2(0))) then

2

cout <= '1';
else
cout <= '0';
end if;
end if;
else
cout <= '0';
endif;
end if;
else
cout <= '0';
end if;
end if;
else
cout <= '0';
end if;
else
if (num1>num2) then
total <= num1-num2;
signo <= '0';
else
total <= num2-num1;
signo <= '1';
end if;
cout<='0';
end if;end process;
end Behavioral;

El circuito así codificado consta de:
 2 números de entrada (num1 y num2), de 4 bits cada uno.
 Un bit de entrada selector de la operación matemática a realizar (sumres).Éste de
ser ‘1’ realiza la suma de los números ingresados, y de ser ‘0’ realiza la resta.
 1 número de salida (total), de 4 bits, que indica el resultado de la suma o resta de los
2 números...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • fpga
  • Fpga
  • FPGA
  • Fpga
  • FPGA
  • FPGA
  • Fpga
  • FPGA

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS