0
1
00:00:00,720 --> 00:00:04,750
Vivado-HLS supports C/C++ native data types. In this lecture, 
1

2
00:00:04,920 --> 00:00:08,250
we are going to look at the behaviour of these data types in HLS.
2

3
00:00:10,800 --> 00:00:18,990
Each variable that holds data should have an associated data type defined by a type specifier. The three 
3

4
00:00:18,990 --> 00:00:28,970
basic native data types in C++ are: bool, char, int. These data types can be used to represent any integer number, 
4

5
00:00:28,980 --> 00:00:32,010
character and boolean values.
5

6
00:00:33,000 --> 00:00:41,730
These data types can be modified by the following modifiers: signed,  unsigned,  short,  and long.
6

7
00:00:42,840 --> 00:00:50,100
These modifiers specifically define the bit size of the associated variables and the range of values 
7

8
00:00:50,100 --> 00:00:51,180
that they can hold.
8

9
00:00:53,260 --> 00:01:01,360
For example, the char data type requires 8 bits. A variable of the signed char type holds a number between 
9

10
00:01:01,360 --> 00:01:04,420
-128 to 127. 
10

11
00:01:05,600 --> 00:01:12,760
A value of type unsigned char is between 0 to 255.
As an example, variables 
11

12
00:01:12,770 --> 00:01:18,890
of this data type can represent the R, G, and B colour code in an image pixel.
12

13
00:01:20,540 --> 00:01:23,180
Unsigned long int requires 32 bits 
13

14
00:01:24,640 --> 00:01:27,580
and long long int requires 64 bits.
14

15
00:01:29,340 --> 00:01:34,920
Xilinx Vivado HLS also supports floating-point data types which are float and double.
15

16
00:01:35,400 --> 00:01:42,900
The float data type, which is also called single-precision float, requires 32 bits. And double, which 
16

17
00:01:42,900 --> 00:01:46,920
is also called double-precision float, requires 64 bits.
17

18
00:01:48,520 --> 00:01:55,880
Vivado HLS supports float and double types for synthesis. Both data types are synthesized with
18

19
00:01:56,080 --> 00:01:58,390
IEEE-754 standard compliance.
19

20
00:01:59,530 --> 00:02:07,730
A float data type format consists of three fields: Sign bit, exponent and fraction. The single-precision 
20

21
00:02:07,730 --> 00:02:14,120
float has one sign bit, a 24-bit fraction and an 8-bit exponent.
21

22
00:02:14,990 --> 00:02:17,690
The double-precision float has one sign bit,
22

23
00:02:18,740 --> 00:02:26,960
a 53-bit fraction and an 11-bit exponent. More details about these types and their related operator will
23

24
00:02:26,960 --> 00:02:29,870
be explained in a separate section along this course.
24

25
00:02:31,230 --> 00:02:37,740
What is the hardware implementation corresponding to variables in an HLS code? The next lecture 
25

26
00:02:37,860 --> 00:02:39,660
will focus on answering this question.
26

27
00:02:41,370 --> 00:02:43,050
These are the takeaway messages
27

28
00:02:44,080 --> 00:02:53,560
Vivado HLS supports C/C++ native data types including bool, char, int and float.  The bit-size of 
28

29
00:02:53,560 --> 00:02:58,500
variables of each C/C++ native data type is known during the synthesis process.
29

30
00:03:00,600 --> 00:03:04,560
Now the quiz question. Write the corresponding bit-width in this table
