A method and apparatus for implementing fast sum-of-products logic in a field
programmable
gate array (FPGA) is disclosed. The method includes literal-sharing decomposition
of the sum-of-products logic to reduce the number of configurable logic block (CLB)
slices required to implement wide fan-in logic functions on an FPGA. The decomposition
is performed by combining product terms having similar literal patterns. The apparatus
includes a CLB including a plurality of slices and a second-level logic (separate
from the slices) circuit to combine the outputs of the slices. Typically, the second-level
logic is an OR gate or its equivalent that implements the sum portion of the sum-of-products
expression. Alternatively, a combining gate may be included within the slice to
combine the output of the slice with the output of another slice preceding the
first slice.