Op. Lógico - Pedroni

De MediaWiki do Campus São José
Revisão de 16h36min de 7 de dezembro de 2015 por Kamila.r (discussão | contribs) (Criou página com '__NOTOC__ ==Estrutura== * * ==Código VHDL== <syntaxhighlight lang=vhdl> --Pedroni - 491 --8 bits: library ieee; use ieee.std_logic_1164.all; entity add_sub is generic (n: integer := 8); po...')
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
Ir para navegação Ir para pesquisar

Estrutura

Código VHDL

--Pedroni - 491
--8 bits:
library ieee;
use ieee.std_logic_1164.all;

entity add_sub is

	generic (n: integer := 8);
	port(a,b : in integer range 0 to 2**n-1;
		sub : out integer range 0 to 2**n-1);	
		
end entity;

architecture structure of add_sub is
	begin
		sub <= a - b;
end architecture;

Testbench

  • Código
  • Resultado (print)

Simulações

Nº Bits ALMs Delay Potência (mW)
x x x x
x x x x
x x x x
x x x x