0
1
00:00:00,760 --> 00:00:07,000
How does a LUT work in an FPGA? LUTs are the main building blocks of FPGAs that 
1

2
00:00:07,000 --> 00:00:09,450
implement combination logics. Here, 
2

3
00:00:09,610 --> 00:00:12,880
I am going to explain the idea behind the LUTs.
3

4
00:00:14,180 --> 00:00:19,320
A Look-up table has a configuration memory that keeps all the possible outputs of a logic function. 
4

5
00:00:19,850 --> 00:00:26,030
It also has a set of inputs to select the proper cell in the memory corresponding to the inputs logic 
5

6
00:00:26,030 --> 00:00:26,380
state.
6

7
00:00:26,810 --> 00:00:29,610
But how is this selection process possible? 
7

8
00:00:29,630 --> 00:00:35,500
Here I am going to quickly explain the idea behind this selection by introducing the concept of multiplexers.
8

9
00:00:36,990 --> 00:00:43,410
One of the key components inside a look-up table is a multiplexer. A simple multiplexer has two data inputs, 
9

10
00:00:43,590 --> 00:00:50,700
one data output and a control signal, also known as select input. A multiplexer acts as a switch and connects 
10

11
00:00:50,700 --> 00:00:55,620
one of its data inputs to the output, based on the value on its select input.
11

12
00:00:56,130 --> 00:01:02,410
In this figure, if c (the select input) is 0, then the a input is connected to the d output. 
12

13
00:01:02,430 --> 00:01:05,160
Otherwise, the b input is connected to the output.
13

14
00:01:07,100 --> 00:01:12,530
After introducing the multiplexer, lets put that into the LUT structure. A conceptual structure 
14

15
00:01:12,530 --> 00:01:17,540
of a LUT can be considered as a collection of memory cells connected to a set of multiplexers. 
15

16
00:01:19,590 --> 00:01:25,770
This is the conceptual structure of a 2-input look-up table which consists of 4 memory cells and three 
16

17
00:01:25,770 --> 00:01:31,220
multiplexers. if both a and b are 0 then cell 0 is connected to the output
17

18
00:01:32,160 --> 00:01:36,360
if a is 1 and b is 0 then cell 1 is connected to the output
18

19
00:01:38,100 --> 00:01:45,150
if a is 0 and b is 1 then cell 2 is connected to the output. if both a and b are 1 then  cell 
19

20
00:01:45,150 --> 00:01:46,570
3 is connected to the output
20

21
00:01:47,720 --> 00:01:53,840
Having this big picture of a LUT, implementing a given 2-input logical function is as simple 
21

22
00:01:53,840 --> 00:01:58,880
as copying the last column of the corresponding truth table into the LUT memory cells.
22

23
00:01:59,630 --> 00:02:05,840
For example, to configure a 2-input LUT to implement an AND gate, we should set the cells 
23

24
00:02:05,840 --> 00:02:09,050
by the logic values of 0 0 0 1.
24

25
00:02:09,990 --> 00:02:15,870
A look-up table usually has a couple of inputs and outputs. The number of LUT inputs determines 
25

26
00:02:15,870 --> 00:02:16,710
its capacity. 
26

27
00:02:17,460 --> 00:02:23,520
For example, a 5-input look-up table can implement any logical function with 5 or fewer variables. 
27

28
00:02:24,330 --> 00:02:26,310
For implementing a logical function 
28

29
00:02:26,310 --> 00:02:30,810
with more than five variables, you should use more than one 5-input LUT.
29

30
00:02:31,050 --> 00:02:37,700
For example, a 6-input LUT can be created by using two 5-input LUTs and a . 
30

31
00:02:37,710 --> 00:02:38,010
multiplexer
31

32
00:02:39,920 --> 00:02:46,490
After understanding the LUT structure, the question is, What elements inside an FPGA can save 
32

33
00:02:46,490 --> 00:02:49,300
data temporarily to be used later in the design?
33

34
00:02:50,000 --> 00:02:56,720
The role of temporary memory cells is crucial in FPGA, and they are used almost in all real applications. 
34

35
00:02:56,990 --> 00:03:00,530
I will explain the purpose of these types of memory in the next video.
35

36
00:03:01,760 --> 00:03:06,770
This is the takeaway message from this lecture: The multiplexer concept is used to connect LUT’s 
36

37
00:03:06,770 --> 00:03:09,050
reconfigurable memory cells to the output.
37

38
00:03:10,340 --> 00:03:15,680
Now the quiz question. Determine the data path in the following LUT and the value of the output
38

39
00:03:15,680 --> 00:03:18,770
if a=0, b=1, c=1;
