Configurable Logic Blocks (CLB)
Understand the CLB — the fundamental repeating unit of FPGA logic fabric. Learn its internal structure, Slice contents, MUX hierarchy, and how RTL maps to physical CLB resources.
What is a CLB?
The Configurable Logic Block (CLB) is the fundamental repeating unit of FPGA programmable logic. Thousands to hundreds-of-thousands of CLBs tile the majority of the FPGA die area, forming a regular 2D array. Each CLB connects to the surrounding routing network through a local switch matrix, allowing signals to travel between CLBs and to dedicated resources (BRAM, DSP, IO).
In Xilinx 7-series, each CLB contains 2 Slices. The two Slices in a CLB share a switch matrix and are in close physical proximity, making intra-CLB routing fast and cheap. Adjacent CLBs are organized in columns and rows, with BRAM and DSP columns interspersed at regular intervals.
CLB Internal Structure
Xilinx 7-series CLB structure: 2 Slices, each with 4 LUT6s, 8 FFs, CARRY4, and MUX hierarchy
Slice Contents (7-Series)
Each Slice in a 7-series FPGA contains the following resources:
- 4× LUT6 — 6-input look-up tables (labeled A, B, C, D). Each implements any Boolean function of up to 6 variables. Can be split into two LUT5s for area efficiency.
- 8× Storage Elements — configurable as D flip-flops or transparent latches. Two per LUT (one after the LUT output, one can bypass the LUT). All share a common clock, CE, and SR signal per Slice.
- 1× CARRY4 — 4-bit fast carry chain for arithmetic. Connects vertically to CARRY4s in adjacent Slices above/below.
- F7MUX — combines O6 outputs of two adjacent LUTs (A+B or C+D) to create a 7-input function or a 2:1 MUX with a 6-bit select.
- F8MUX — combines the outputs of two F7MUXes (one from each LUT pair) to create an 8-input function or a 4:1 MUX.
- Output MUXes — each LUT output can be taken directly (combinatorial) or registered (through the FF). The routing receives whichever the tool selects.
Signal Flow Through a Slice
The F7MUX and F8MUX — Wide Logic
A LUT6 can implement any 6-input Boolean function. But what if your HDL code needs a 7-input function, or a large CASE statement with many conditions? The F7MUX and F8MUX solve this efficiently:
- F7MUX: Combines O6 outputs of two LUT6s. Input 7 (I6) selects which LUT output passes through. This implements any 7-input Boolean function, or a 2:1 MUX where select is one bit and data comes from the two LUTs.
- F8MUX: Combines two F7MUX outputs. Implements 8-input functions or 4:1 MUXes. Used heavily for wide case statements (address decode, FSM next-state logic).
CLB Architecture — Generation Comparison
| Feature | 7-Series CLB | UltraScale CLB | UltraScale+ CLB |
|---|---|---|---|
| Slices per CLB | 2 | 1 | 1 |
| LUTs per Slice | 4× LUT6 | 8× LUT6 | 8× LUT6 |
| FFs per Slice | 8 | 16 | 16 |
| Carry chain per Slice | 1× CARRY4 (4-bit) | 1× CARRY8 (8-bit) | 1× CARRY8 (8-bit) |
| Wide MUX | F7MUX, F8MUX | F7MUX, F8MUX, F9MUX | F7MUX, F8MUX, F9MUX |
| Distributed RAM | Slice M only | All Slices | All Slices |
| SRL | Slice M only | All Slices | All Slices |
| FF-to-LUT ratio | 2:1 | 2:1 | 2:1 |
How RTL Logic Maps to CLB Resources
Vivado's synthesis engine automatically maps RTL to CLB primitives. Here are common examples:
| RTL Construct | LUTs Used | FFs Used | CARRY4 | Notes |
|---|---|---|---|---|
| 4-input AND gate | 1× LUT6 | 0 | 0 | All 4 inputs fit in one LUT |
| 8-input AND gate | 2× LUT6 + F7MUX | 0 | 0 | Uses F7MUX to combine two LUTs |
| 4-bit registered counter | 4× LUT6 | 4 | 1 | CARRY4 propagates carry |
| 8-bit adder | 2× CARRY4 | 0 | 2 | Each CARRY4 handles 4 bits |
| 16:1 MUX (4-bit data) | ~8× LUT6 | 0 | 0 | F7/F8MUX used for wide select |
| D flip-flop (no logic) | 0 | 1 | 0 | FF used standalone, LUT bypassed |
A: F7MUX combines the O6 outputs of two adjacent LUT6s to implement a 7-input Boolean function (where input 7 acts as the MUX select). This is critical for wide logic — large CASE statements in HDL, address decoders with 7+ address bits, and any function requiring more than 6 inputs. F8MUX extends this to 8 inputs by combining two F7MUX outputs.
Knowledge Check
1. How many Slices are in one Xilinx 7-series CLB?
- A 1
- B 2
- C 4
- D 8
2. How many LUT6s are in one 7-series Slice?
- A 2
- B 4
- C 8
- D 6
3. How many flip-flops does each 7-series Slice provide?
- A 4
- B 8
- C 16
- D 2
4. What is the primary purpose of the F7MUX in a Xilinx CLB?
- A To merge carry signals from adjacent CARRY4 chains
- B To implement 7-input Boolean functions by combining two LUT6 outputs
- C To select between synchronous and asynchronous reset
- D To route global clock signals into the Slice
5. How many CARRY4 primitives are in one 7-series Slice?
- A 1
- B 2
- C 4
- D 0 — carry logic is in the LUT
Practical Exercise
- A 2:1 MUX with 4-bit data buses (sel, a[3:0], b[3:0] → y[3:0])
- A 4-input XOR gate (a, b, c, d → y)
- A 3-bit synchronous up-counter with enable and synchronous reset