27.3.2.2 Truth Table Logic

The truth table in each LUT unit can generate a combinational logic output as a function of up to three inputs (LUTn-TRUTHSEL[2:0]). It is possible to realize any 3-input Boolean logic function using one LUT.

Figure 27-2. Truth Table Output Value Selection of an LUT

Configure the truth table inputs (LUTn-TRUTHSEL[2:0]) by writing the Input Source Selection bit fields in the LUT Control registers:
  • INSEL0 in CCL.LUTnCTRLB
  • INSEL1 in CCL.LUTnCTRLB
  • INSEL2 in CCL.LUTnCTRLC

Each combination of the input bits (LUTn-TRUTHSEL[2:0]) corresponds to one bit in the CCL.TRUTHn register, as shown in the table below:

Table 27-2. Truth Table of an LUT
LUTn-TRUTHSEL[2]LUTn-TRUTHSEL[1]LUTn-TRUTHSEL[0]OUT
000TRUTHn[0]
001TRUTHn[1]
010TRUTHn[2]
011TRUTHn[3]
100TRUTHn[4]
101TRUTHn[5]
110TRUTHn[6]
111TRUTHn[7]
Important: Consider the unused inputs turned off (tied low) when logic functions are created.

LUT Output for CCL.TRUTHn = 0x42

If CCL.TRUTHn is configured to 0x42, the LUT output will be 1 when the inputs are ‘b001 or ‘b110 and 0 for any other combination of inputs.