Carry Look Ahead Adder Verilog Code | 16 bit Carry Look Ahead Adder Verilog Implementation

Carry Look Ahead Adder Verilog Code

16 bit Carry Look Ahead Adder

Carry look ahead adder is a fast adder architecture.  In Ripple Carry Adder output carry depends on previous carry . But in carry look ahead adder the output carry is function of input bits and initial carry only. So output carry is calculated with combinational logic without waiting for previous carry.  For more information about carry look ahead adder you can refer to this wikipedia article.

A carry-lookahead adder (CLA) or fast adder is a type of adder used in digital logic. A carry-lookahead adder improves speed by reducing the amount of time required to determine carry bits. It can be contrasted with the simpler, but usually slower, ripple carry adder for which the carry bit is calculated alongside the sum bit, and each bit must wait until the previous carry has been calculated to begin calculating its own result and carry bits (see adder for detail on ripple carry adders). The carry-lookahead adder calculates one or more carry bits before the sum, which reduces the wait time to calculate the result of the larger value bits.

Basic structure of 4-bit Carry Look Ahead Adder is shown below.



The Verilog Code for 16-bit Carry Look Ahead Adder is given below-


16 bit Carry Look Ahead Adder Testbench


Carry Look Ahead Adder Simulation Result is as follows:




Cadence RTL compiler is used to synthesize the verilog  code with Uofu standard library.  We got the following schematic after mapping the hdl code to the standard library. This is basically the synthesized view.



If you have any query/suggestion please feel free to comment below the post.

Leave a Reply

1 Comment threads
3 Thread replies
Most reacted comment
Hottest comment thread
4 Comment authors
monika Dnayneshwar kedarMohammad Abidur RahmanadminMiles Recent comment authors
newest oldest most voted
Notify of

In 4-bit carry look ahead, one line is incorrect:

**incorrect** assign cout= g[3] | (p[3]&g[2]) | p[3]&p[2]&g[1] | p[3]&p[2]&p[1]&p[0]&c[0];
**Corrected** assign cout= g[3] | (p[3]&g[2]) | p[3]&p[2]&g[1] | p[3]&p[2]&p[1]&g[0] | p[3]&p[2]&p[1]&p[0]&c[0];

This was probably a typographical error, but I want to point it out for anyone having trouble using this code