1.2 Programmable Lookup Table

Each LUT has a truth table determining its output value based on the input values. All combinations of the three inputs IN[0], IN[1] and IN[2] are indicated in the below table, where each combination corresponds to one of the bits in Truth Table bit group in the LUT Control x register (LUTCTRLx.TRUTH). TRUTH must therefore be set according to the desired output for each combination of inputs. For instance if it is desired to generate a high output only when all three inputs are low or all three inputs are high, TRUTH[0] and TRUTH[7] must be written to one (LUTCTRLx.TRUTH written to 0x81). If only the first two inputs are of interest, and IN[2] is masked, the IN[2] column and the TRUTH[4:7] rows can be neglected since IN[2] in this case always will be zero.

Table 1-6. Truth Table of LUT
IN[2]IN[1]IN[0]OUT
000TRUTH[0]
001TRUTH[1]
010TRUTH[2]
011TRUTH[3]
100TRUTH[4]
101TRUTH[5]
110TRUTH[6]
111TRUTH[7]

Using the above table, one can select specific combinations of inputs, or create standard logic gates. Examples for creating the most common three input logic gates are shown in the following table.

Table 1-7. Implementation of Logic Gates with Three Inputs
ANDNANDORNORXORXNOR
TRUTH[7:0]0x800x7F0xFE0x010x160xE9