Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for VHDL carry look ahead adder 64 bits

Status
Not open for further replies.

al_extreme

Member level 4
Joined
Feb 7, 2002
Messages
75
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
557
vhdl + carry

Can sombody help me I'm looking for the code of a carry look ahead adder 64 bits in VHDL. Thanks for your help
 

Ace-X

Advanced Member level 2
Joined
Jan 25, 2002
Messages
529
Helped
41
Reputation
82
Reaction score
14
Trophy points
1,298
Location
Germany
Activity points
5,150
vhdl lookahead adder

I guess, that 64-bit CLA adder is bad idea due to very complicated expressions for generate and propagate signals.
I would recommend to use eight 8-bit CLA adders with additional group propagate and generate signals as a building block for 64-bit adder.

Here is the example from @lter@ site:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;

ENTITY c_l_addr IS
PORT
(
x_in : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
y_in : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
carry_in : IN STD_LOGIC;
sum : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
carry_out : OUT STD_LOGIC
);
END c_l_addr;

ARCHITECTURE behavioral OF c_l_addr IS

SIGNAL h_sum : STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL carry_generate : STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL carry_propagate : STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL carry_in_internal : STD_LOGIC_VECTOR(7 DOWNTO 1);

BEGIN
h_sum <= x_in XOR y_in;
carry_generate <= x_in AND y_in;
carry_propagate <= x_in OR y_in;
PROCESS (carry_generate,carry_propagate,carry_in_internal)
BEGIN
carry_in_internal(1) <= carry_generate(0) OR (carry_propagate(0) AND carry_in);
inst: FOR i IN 1 TO 6 LOOP
carry_in_internal(i+1) <= carry_generate(i) OR (carry_propagate(i) AND carry_in_internal(i));
END LOOP;
carry_out <= carry_generate(7) OR (carry_propagate(7) AND carry_in_internal(7));
END PROCESS;

sum(0) <= h_sum(0) XOR carry_in;
sum(7 DOWNTO 1) <= h_sum(7 DOWNTO 1) XOR carry_in_internal(7 DOWNTO 1);
END behavioral;



Ace-X.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top