Mudanças entre as edições de "Circuito Somador - John"
Ir para navegação
Ir para pesquisar
(Criou página com '__NOTOC__ ==Estrutura== * * ==Código VHDL== <syntaxhighlight lang=vhdl> --Book: John/199 --32 bits library ieee; use ieee.numeric_bit.all; entity adder is port( a,b: in unsigned (31 downt...') |
(Sem diferença)
|
Edição atual tal como às 22h11min de 5 de dezembro de 2015
Estrutura
Código VHDL
--Book: John/199
--32 bits
library ieee;
use ieee.numeric_bit.all;
entity adder is
port(
a,b: in unsigned (31 downto 0);
ci: in bit;
s: out unsigned (31 downto 0);
co: out bit);
end entity;
architecture adder of adder is
signal sum33 : unsigned (32 downto 0);
begin
sum33 <= '0' & a + b + unsigned'(0 => ci);
s <= sum33(31 downto 0);
co <= sum33(32);
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 |