Mudanças entre as edições de "Op. Lógico - Pedroni"
Ir para navegação
Ir para pesquisar
(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...') |
(Sem diferença)
|
Edição atual tal como às 16h36min de 7 de dezembro de 2015
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 |