0
1
00:00:00,830 --> 00:00:07,700
How can we convert a hardware IP generated by Vivado-HLS into the FPGA bitstream? In order to generate 
1

2
00:00:07,700 --> 00:00:13,320
generate the FPGA bitstream file, the Xilinx Vivado toolset should be used.  In this lecture, 
2

3
00:00:13,460 --> 00:00:19,520
I am going to explain the basic steps of how to use Vivado toolset to generate the final FPGA bitstream.
3

4
00:00:21,150 --> 00:00:28,260
After having the hardware IP, we can import that to the Vivado design suite. Our IP only has an output 
4

5
00:00:28,260 --> 00:00:33,790
port which is an array of 8 binary signals. As shown in this slide,
5

6
00:00:34,260 --> 00:00:40,790
I’ve changed the name of the port to led as they will be connected to LEDs on the board. 
6

7
00:00:40,880 --> 00:00:41,820
The led[7:0] 
7

8
00:00:41,820 --> 00:00:45,620
array represents the eight connection signals inside the FPGA. 
8

9
00:00:46,080 --> 00:00:52,980
But, what should we do to connect these internal signals into the FPGA pins connected to the LEDs on 
9

10
00:00:52,980 --> 00:00:53,410
the board?
10

11
00:00:53,910 --> 00:01:03,750
We need eight connections to connect design output ports into U16, E19, U19, V19, W18, U15, U14 and 
11

12
00:01:03,750 --> 00:01:04,850
V14 FPGA pins.
12

13
00:01:06,540 --> 00:01:10,050
This is the place that the concept of physical constraints comes into play.
13

14
00:01:10,890 --> 00:01:16,620
Design constraints define the requirements that must be met by the compilation flow in order to make 
14

15
00:01:16,620 --> 00:01:18,930
the hardware design functional on the board. 
15

16
00:01:20,310 --> 00:01:27,030
As we know, a typical FPGA has several I/O pins to communicate with external modules. A 2D coordinate 
16

17
00:01:27,030 --> 00:01:31,650
index indicates each pin location. As part of the FPGA reconfigurability, 
17

18
00:01:31,830 --> 00:01:37,680
these pins can provide different voltage levels and electronic signalling based on the standard assigned 
18

19
00:01:37,680 --> 00:01:39,330
to each pin by the designers.
19

20
00:01:40,320 --> 00:01:45,720
For example, based on a specific I/O standard, a pin can provide 3.3v, 2.5V, 
20

21
00:01:45,720 --> 00:01:52,530
or 1.8v for the high logic value or deliver a different level of current 
21

22
00:01:52,530 --> 00:01:54,150
to drive external devices. 
22

23
00:01:54,970 --> 00:02:00,930
Also, a single-ended or differential I/O standard can be assigned to an FPGA pin.  For example, 
23

24
00:02:01,080 --> 00:02:08,160
LVCMOS33 is a 3.3 volt, Low Voltage CMOS and single-ended I/O standard. To connect 
24

25
00:02:08,160 --> 00:02:09,120
each design port to
25

26
00:02:09,120 --> 00:02:16,710
an FPGA pin, two properties should be defined: pin location and standard. The I/O constraints can determine 
26

27
00:02:16,710 --> 00:02:21,540
the location and standard of each FPGA I/O pin connected to a port in a design. 
27

28
00:02:23,140 --> 00:02:29,800
The Xilinx Viviado toolset uses the TCL language to describe an I/O constraint.  This constraint command 
28

29
00:02:29,800 --> 00:02:30,910
has four fields:
29

30
00:02:32,970 --> 00:02:38,480
set_property keyword <property>, <value>, and <object list>
30

31
00:02:39,360 --> 00:02:45,330
For example, for the first connection in our simple LED controller, two constraints should be defined 
31

32
00:02:45,450 --> 00:02:49,590
using this format. The location and I/O standard.
32

33
00:02:54,690 --> 00:03:02,310
Usually, board vendors provide a list of all FPGA I/O constraints in a file with .xdc extension that 
33

34
00:03:02,310 --> 00:03:03,670
can be used by designers.
34

35
00:03:04,100 --> 00:03:11,040
The BASYS3 board also has such a file called Basys-3-Master.xdc that can be found on its 
35

36
00:03:11,040 --> 00:03:12,600
vendor GitHub site. 
36

37
00:03:13,380 --> 00:03:19,470
This file contains the constraints for switches, leds, 7-segments and other hardware connected 
37

38
00:03:19,470 --> 00:03:20,220
to the FPGA.
38

39
00:03:20,520 --> 00:03:25,680
Note, in the original files all constraints are commented by #. 
39

40
00:03:27,130 --> 00:03:33,190
All the constraints defined for the lower 8 LEDs are shown in this slide that can be used after
40

41
00:03:33,190 --> 00:03:36,790
uncommenting the desired constraints and change the object names. 
41

42
00:03:39,170 --> 00:03:46,490
Here, all required constraints are uncommented. As we used the led as the port name, the object names 
42

43
00:03:46,490 --> 00:03:48,020
have been remained unchanged.
43

44
00:03:50,280 --> 00:03:56,400
Now that we know the basic concept of integrating an IP into the Vivado Suite toolset, We should practically 
44

45
00:03:56,400 --> 00:04:01,530
use the Xilinx Vivado to generate the FPGA bitstream for our LED controller design.
45

46
00:04:02,040 --> 00:04:04,440
The next lecture will explain this process.
46

47
00:04:06,400 --> 00:04:10,730
These are the takeaway messages. To connect the IP ports into the FPGA pins, 
47

48
00:04:10,870 --> 00:04:12,620
we should define some constraints.
48

49
00:04:13,130 --> 00:04:17,140
The main constraints determine the pin location and pin electrical standard. 
49

50
00:04:18,750 --> 00:04:24,690
Now the quiz, question. How many constraints in total should be added to our design in Vivado toolset? 
