28.3.2.6 Sequencer Logic
Each LUT pair can be connected to a sequencer. The sequencer can function as either D flip-flop, JK flip-flop, gated D latch, or RS latch. The function is selected by writing the Sequencer Selection (SEQSEL) bit field in the Sequencer Control (CCL.SEQCTRLn) register.
The sequencer receives its input from either the LUT, filter or edge detector, depending on the configuration.
A sequencer is clocked by the same clock as the corresponding even LUT. The clock source is selected by the Clock Source (CLKSRC) bit field in the CCL.LUTnCTRLA register.
The flip-flop output (OUT) is refreshed on the rising edge of the clock. When the even LUT is disabled, the latch is cleared asynchronously. 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, and the G input is driven by the odd LUT output.
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, and the K input is driven by the odd LUT output.
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, and the G input is driven by the odd LUT output.
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, and the R input is driven by the odd LUT output.
S | R | OUT |
---|---|---|
0 | 0 | Hold state (no change) |
0 | 1 | Clear |
1 | 0 | Set |
1 | 1 | Forbidden state |