0
1
00:00:00,560 --> 00:00:02,180
Firstly, the question for this lecture. 
1

2
00:00:02,690 --> 00:00:09,320
Do we need to learn the internal structure of an FPGA to implement a circuit or an algorithm in HLS?
2

3
00:00:09,320 --> 00:00:15,620
The internal structure of an FPGA is invisible to the users, so design tools take care of them. 
3

4
00:00:15,650 --> 00:00:21,230
However, having a basic knowledge of the internal structure and different resources in the FPGA helps 
4

5
00:00:21,230 --> 00:00:25,870
designers to better understand the tools’ report in order to provide an efficient design.
5

6
00:00:26,690 --> 00:00:31,880
More details of the FPGA architecture are explained throughout the course whenever we are going to use 
6

7
00:00:31,880 --> 00:00:32,090
them.
7

8
00:00:32,600 --> 00:00:36,310
Let’s start with creating a big picture of a typical FPGA structure.
8

9
00:00:38,380 --> 00:00:45,070
Conceptually, an FPGA comprises of two layers: application and configuration layers.
9

10
00:00:45,070 --> 00:00:50,440
The application layer contains all the hardware modules that can be configured and connected together to implement an
10

11
00:00:50,440 --> 00:00:51,700
algorithm or a function. 
11

12
00:00:53,020 --> 00:00:58,060
After configuring this layer, we can apply the input data and get the generated outputs. 
12

13
00:00:59,400 --> 00:01:05,250
The configuration later consists of a set of memory cells used to configure the application layer modules. 
13

14
00:01:06,670 --> 00:01:12,520
The configuration data saved in this layer is call bitstream and is generated by synthesis tools. 
14

15
00:01:14,330 --> 00:01:21,200
The main role of an FPGA synthesis tool is converting a design description into an FPGA bitstream. This process 
15

16
00:01:21,200 --> 00:01:24,650
requires several optimisations and code transformation tasks. 
16

17
00:01:26,210 --> 00:01:32,300
The generated bitstream is used for configuring the FPGA. Then the configured FPGA can be used in a real 
17

18
00:01:32,300 --> 00:01:35,930
application to perform the desired algorithms or functions. 
18

19
00:01:37,660 --> 00:01:43,000
Traditionally, an FPGA is a collection of the following building blocks: Loop-up-tables 
19

20
00:01:44,040 --> 00:01:47,880
(LUTs): which are used to implement logic operations
20

21
00:01:49,740 --> 00:01:57,180
Flip-Flops (FFs): these are registers (or small temporary memories) to save the LUTs’ outputs.
21

22
00:01:58,570 --> 00:02:07,210
Connection network: which connects resources on an FPGA together. Input/Output (I/O) pads: to get data 
22

23
00:02:07,210 --> 00:02:08,590
in and out of the FPGA
23

24
00:02:10,110 --> 00:02:15,360
Let’s talk about lookup tables: A LUT can be configured to implement a logical function 
24

25
00:02:15,360 --> 00:02:22,530
or expression. A logical unction is an expression that only contains logical operators, which are AND, 
25

26
00:02:22,860 --> 00:02:31,410
OR and NOT. The AND and OR operators are binary, which means they receive two operands (also known as variables 
26

27
00:02:31,410 --> 00:02:32,000
or inputs). 
27

28
00:02:32,460 --> 00:02:39,360
The NOT operator is unary, which means it applies on a single variable or input. A truth table
28

29
00:02:39,360 --> 00:02:41,440
can represent the functionality of each gate. 
29

30
00:02:42,000 --> 00:02:47,190
This table contains the gate’s output values for all combinations of its input logic values.
30

31
00:02:48,420 --> 00:02:54,150
To implement a logical expression, a typical lookup table keeps the output values for all combination 
31

32
00:02:54,150 --> 00:03:00,690
of the expression’s inputs. For example, this is an AND logic or gate. A lookup table that implements 
32

33
00:03:00,690 --> 00:03:04,650
this gate keeps all the values in the last column of the gate truth table. 
33

34
00:03:05,430 --> 00:03:08,280
Then it needs two inputs to address each value.
34

35
00:03:09,890 --> 00:03:16,430
This logical expression has three inputs. Then its truth table has  8 entries. A lookup table
35

36
00:03:16,430 --> 00:03:21,500
should keep all the values in the last column. And it needs three inputs to distinguish among them.
36

37
00:03:22,310 --> 00:03:24,830
How does a LUT work in an FPGA?
37

38
00:03:25,430 --> 00:03:27,350
The next video copes with this question.
38

39
00:03:28,670 --> 00:03:34,810
The takeaway messages are: A traditional FPGA consists of LUTs, FFs, I/O pins 
39

40
00:03:34,880 --> 00:03:37,880
and finally a network connecting these elements
40

41
00:03:38,830 --> 00:03:41,080
All these components are reconfigurable. 
41

42
00:03:42,070 --> 00:03:47,080
As the quiz question, I want you to find the LUT content for the following logic expression.
