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.

carry_lookahead_adder

 

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:

carry_look_ahead_simulation

 

carry_look_ahead

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.

carry

 

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

2
Leave a Reply

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
adminMiles Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Miles
Guest
Miles

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