31.3.1.3 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 31-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 31-3. Truth Table of an LUT
LUTn-TRUTHSEL[2] LUTn-TRUTHSEL[1] LUTn-TRUTHSEL[0] OUT
0 0 0 TRUTHn[0]
0 0 1 TRUTHn[1]
0 1 0 TRUTHn[2]
0 1 1 TRUTHn[3]
1 0 0 TRUTHn[4]
1 0 1 TRUTHn[5]
1 1 0 TRUTHn[6]
1 1 1 TRUTHn[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.