Re: 3 input adder in Spartan 3E



Use a pair of Carry Save adders.

A Carry Save adder takes three inputs, and produces two outputs, a partial
sum, P, and a vector of carry bits, C. It's actually just an array of
independent full adders, so calculation time is independent of the data
width. To get the full sum add P to C using a normal adder.

Take two of these in series to add four inputs to two outputs. Send the
outputs back to the inputs again and accumulate on each clock cycle. It
only needs two four-input LUTS, one per output, so it's as fast as you
like. Add up the total sum from the output latch whenever you need to.

Chain several sets of adders in a row, and compute the total sum of each
using separate adders (Carry Lookahead or otherwise) in parallel.


.