Op. Lógico - Pedroni

De MediaWiki do Campus São José
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