29.3.2.6 Sequential Logic

Each LUT pair can be connected to an internal Sequential block. A Sequential block can function as either D flip-flop, JK flip-flop, gated D latch, or RS latch. The function is selected by writing the Sequential Selection (SEQSEL) bits in the Sequential Control (CCL.SEQCTRLn) register.

The Sequential block receives its input from either LUT, filter, or edge detector, depending on the configuration.

The Sequential block is clocked by the same clock as the corresponding LUT, which is either the peripheral clock or input line 2 (IN[2]). This is configured by the Clock Source (CLKSRC) bit in the LUT n Control A (CCL.LUTnCTRLA) register.

When the even LUT (LUT2n) is disabled, the latch is asynchronously cleared, during which the flip-flop Reset signal (R) is kept enabled for one clock cycle.

Gated D Flip-Flop (DFF)

The D-input is driven by the even LUT output (LUT2n), and the G-input is driven by the odd LUT output (LUT2n+1).

Figure 29-7. D Flip-Flop
Table 29-3. DFF Characteristics
R G D OUT
1 X X Clear
0 1 1 Set
0 Clear
0 X Hold state (no change)

JK Flip-Flop (JK)

The J-input is driven by the even LUT output (LUT2n), and the K-input is driven by the odd LUT output (LUT2n+1).

Figure 29-8. JK Flip-Flop
Table 29-4. JK Characteristics
R J K OUT
1 X X Clear
0 0 0 Hold state (no change)
0 0 1 Clear
0 1 0 Set
0 1 1 Toggle

Gated D Latch (DLATCH)

The D-input is driven by the even LUT output (LUT2n), and the G-input is driven by the odd LUT output (LUT2n+1).

Figure 29-9. D Latch
Table 29-5. D Latch Characteristics
G D OUT
0 X Hold state (no change)
1 0 Clear
1 1 Set

RS Latch (RS)

The S-input is driven by the even LUT output (LUT2n), and the R-input is driven by the odd LUT output (LUT2n+1).

Figure 29-10. RS Latch
Table 29-6. RS Latch Characteristics
S R OUT
0 0 Hold state (no change)
0 1 Clear
1 0 Set
1 1 Forbidden state