1
00:00:00,610 --> 00:00:06,040
In the previous lecture, we learned that their speeches and look up tables in advance of PJs could

2
00:00:06,040 --> 00:00:07,600
implement and arithmetic operate.

3
00:00:07,870 --> 00:00:14,140
But the question is, how can we go into a synthesis process to choose between these two types of resources

4
00:00:14,500 --> 00:00:15,200
in this lecture?

5
00:00:15,400 --> 00:00:19,570
I will explain how Etchells compiler directives can answer this question.

6
00:00:21,110 --> 00:00:28,580
In order to implement an HLC C++ code by half the resources that evolved, cellist performs two tasks

7
00:00:28,730 --> 00:00:32,210
during synthesis, elaboration and mapping.

8
00:00:34,110 --> 00:00:41,100
The elaboration task transforms the C C++ source code into an internal database containing operators,

9
00:00:41,310 --> 00:00:48,570
these operators represent operations in the C C++ code, such as additions, multiplication, Arrow

10
00:00:48,570 --> 00:00:49,800
reads and writes.

11
00:00:51,130 --> 00:00:58,540
The mapping task maps the operators onto a set, of course, which implement the harder operations codes

12
00:00:58,540 --> 00:01:06,280
are the specific hardware components used to create the design, such as addas multipliers, pipeline

13
00:01:06,280 --> 00:01:08,380
multipliers and blikre.

14
00:01:09,520 --> 00:01:15,610
Control is provided over each of these steps, allowing you to control the hardware implementation and

15
00:01:15,610 --> 00:01:17,440
the fine level of granularity.

16
00:01:19,800 --> 00:01:25,230
There are two types of compiler directives available in initialised to control the elaboration and mapping

17
00:01:25,230 --> 00:01:25,800
tasks.

18
00:01:26,710 --> 00:01:28,960
The first directive is allocation.

19
00:01:29,860 --> 00:01:35,470
The first goal of a synthesis process is to maximize performance for this purpose.

20
00:01:35,680 --> 00:01:38,620
It utilizes the maximum amount of resources possible.

21
00:01:39,220 --> 00:01:46,450
However, this increase is the final use area and FPGA limiting the number of operators in a design

22
00:01:46,450 --> 00:01:48,890
is a useful technique to reduce the area.

23
00:01:49,330 --> 00:01:53,650
It helps reduce the area by forcing sharing of the operations.

24
00:01:55,130 --> 00:02:02,470
Allocation directive allows you to limit how many operators, codes or functions are used in a design.

25
00:02:04,420 --> 00:02:11,080
The second directive is resource, there is a directive is used to specify which car to use for a specific

26
00:02:11,080 --> 00:02:17,430
operations explicitly in this lecture, I will explain how to use the resource directive.

27
00:02:17,620 --> 00:02:21,870
But before that, we need to know more about cause in Nevada evaluations.

28
00:02:23,230 --> 00:02:29,410
This table shows a list of the codes used to implement some of the standard archipelagic operations.

29
00:02:30,630 --> 00:02:35,110
Adds up, this score is used to implement both ADRs and subtract.

30
00:02:36,750 --> 00:02:43,890
Adds up and as an estate pipelined, add or subtract, even the list determines how many pipeline stages

31
00:02:43,890 --> 00:02:44,630
are required.

32
00:02:46,110 --> 00:02:53,160
Adds underscored the esprit de corps ensures that the act or some operation is implemented using a DSB

33
00:02:53,160 --> 00:02:53,790
48.

34
00:02:54,840 --> 00:03:04,410
Defense and a stage pipeline divider, DSP 48 multiplications with pit bits that allow implementation

35
00:03:04,410 --> 00:03:06,030
in a single DSP 48.

36
00:03:08,020 --> 00:03:16,390
Mall combination on multiplier bitrate that exceed the size of a standard this 48 mccastle, Mullins,

37
00:03:16,680 --> 00:03:22,870
Anastacia pipeline multiplier Fitbit fits that exceeds the size of a standard DSP 48 McChrystal.

38
00:03:24,240 --> 00:03:28,080
Underscore Elliott multiplier implemented with lookup tables.

39
00:03:30,360 --> 00:03:37,380
The resource detective can be used to guide this process to use a proper code for an operation to demonstrate

40
00:03:37,380 --> 00:03:38,890
how to use this directive.

41
00:03:38,950 --> 00:03:42,340
Let's consider the following operator to define the call.

42
00:03:42,450 --> 00:03:47,550
We can assign a resource directive to the operators output, which is F in this case.

43
00:03:48,940 --> 00:03:54,160
If the operator is addition, then we can force the HLA synthesis process to implement that with the

44
00:03:54,160 --> 00:03:54,640
Espy's.

45
00:03:56,000 --> 00:04:01,370
If the operator is a multiplier, we can guide us to implement that using lookup tables.

46
00:04:03,200 --> 00:04:07,130
If you have an automatic operation with multiple operators like this.

47
00:04:08,150 --> 00:04:14,060
Then we should break that into multiple expressions with one operator, then we can add the resource

48
00:04:14,060 --> 00:04:14,810
directive's.

49
00:04:16,740 --> 00:04:23,250
Now, let's use all the tools to implement this complex arithmetic expression with only lookup tables.

50
00:04:25,690 --> 00:04:28,430
First, we need to create a New World Atlas project.

51
00:04:28,990 --> 00:04:34,720
Choose a name for the project such as resource underscore constraint dash virtuous.

52
00:04:36,790 --> 00:04:42,980
So the top function name to resource underscore constraint in the solution configuration page, accept

53
00:04:42,980 --> 00:04:47,500
the default clock period and select the basis three board and the target FPGA.

54
00:04:50,210 --> 00:04:56,360
Now create a new design file and name it as a resource underscore constraint that.

55
00:05:00,150 --> 00:05:07,180
Defining it to function with four inputs and one out then and the arithmetic expression inside the function.

56
00:05:07,590 --> 00:05:10,200
Don't forget to define the port interfaces.

57
00:05:10,950 --> 00:05:15,240
If you synthesize the description, then this would be the synthesis report.

58
00:05:17,000 --> 00:05:23,360
As can be seen, the hardware is not conventional as it utilizes flip flops and there is a clock signal

59
00:05:23,360 --> 00:05:24,350
in the portals.

60
00:05:26,930 --> 00:05:32,810
Also, if you have a look at the analysis perspective, the design execution requires four steps to

61
00:05:32,810 --> 00:05:33,350
complete.

62
00:05:38,490 --> 00:05:42,390
As a design needs four steps and the clock period is 10 nanosecond.

63
00:05:42,510 --> 00:05:48,270
Let's change the design clock period to 40 nanosecond to make the hardware design combination.

64
00:05:50,010 --> 00:05:56,310
For this purpose, go to the center's perspective, right, click on the solution one folder and select

65
00:05:56,310 --> 00:06:00,510
the solutions settings in the synthesis setting page.

66
00:06:00,520 --> 00:06:02,150
Change the clock prior to 40.

67
00:06:02,520 --> 00:06:04,080
Now synthesize the code.

68
00:06:06,690 --> 00:06:13,320
The synthesis report confirms that the Hardbodies combination and utilizes only lookup tables and Espy's

69
00:06:13,470 --> 00:06:14,970
without any memory cells.

70
00:06:15,480 --> 00:06:21,540
In addition, the analysis perspective shows that the circuit execution requires one step to complete.

71
00:06:25,810 --> 00:06:32,290
By looking at the resource utilization report in the synthesis perspective, we can see that 90 Espy's

72
00:06:32,290 --> 00:06:37,030
will be used to implement the harbour, but our goal was only using lookup tables.

73
00:06:42,090 --> 00:06:48,000
To other resource directives to guide the sentence's process to choose lookup tables, implementing

74
00:06:48,000 --> 00:06:49,180
arithmetic operators.

75
00:06:49,500 --> 00:06:55,140
First, we need to break the expression into several simple expressions with one operator like this.

76
00:06:57,820 --> 00:06:59,710
Now, let's under-resourced directive's.

77
00:07:00,660 --> 00:07:07,860
As lookup tables implement integer additions by default, we only are the directives for multipliers.

78
00:07:09,220 --> 00:07:10,750
Now, let's synthesize the code.

79
00:07:32,260 --> 00:07:38,450
By looking at the synthesis report, we realize that the Arctic implementation is conventional, but

80
00:07:38,450 --> 00:07:40,170
the SEAL uses 3D space.

81
00:07:40,940 --> 00:07:41,990
What is the problem?

82
00:07:42,250 --> 00:07:44,170
Let's have a look at the analysis report.

83
00:07:46,080 --> 00:07:53,520
The first multiplication operator multiplied A and B. The second multiplication operator multiply C

84
00:07:53,520 --> 00:07:53,970
and the.

85
00:07:55,030 --> 00:08:01,030
Then the next multiplier generates A multiplier, B multiply, C multiplied.

86
00:08:02,380 --> 00:08:07,390
The first addition adds the 2B, and then the result is that it would see.

87
00:08:08,770 --> 00:08:11,710
Then the result of the addition is multiplied by a.

88
00:08:14,350 --> 00:08:22,390
And finally, the result is added to the a multiply be see multiplied terror to implement the desired

89
00:08:22,390 --> 00:08:23,560
arithmetic expression.

90
00:08:26,670 --> 00:08:32,850
As can be seen, the synthesis process has optimised expression, therefore, some of the multiplication

91
00:08:32,850 --> 00:08:39,360
operators in the original description with assigned resource directives are not in this optimized expression.

92
00:08:41,370 --> 00:08:48,150
And one of the multiplications in the optimized form does not have any assigned resource to find that

93
00:08:48,150 --> 00:08:48,640
operator.

94
00:08:48,810 --> 00:08:51,990
Let's have a look at the resource for you here.

95
00:08:52,170 --> 00:08:59,310
You can see that all multipliers are implemented by Mulle Underscore Eliot Core, except the one denoted

96
00:08:59,310 --> 00:09:02,490
by CU underscore if you underscore 97.

97
00:09:09,880 --> 00:09:13,690
To solve the problem, we define a function to implement a multiplication.

98
00:09:14,640 --> 00:09:16,680
And then we call that in the top function.

99
00:09:18,050 --> 00:09:24,110
We also should stop the scientists tools from optimizing the function into the top function for this

100
00:09:24,110 --> 00:09:24,530
purpose.

101
00:09:24,710 --> 00:09:28,880
We can turn off the inline feature by adding this directive to the function.

102
00:09:29,270 --> 00:09:35,270
Now, if you synthesize the code in the synthesis report, we see that only lookup tables are used to

103
00:09:35,270 --> 00:09:37,790
implement our desired arithmetic expression.

104
00:09:54,690 --> 00:09:59,130
We started the high level synthesis of addition, subtraction and multiplication.

105
00:10:00,570 --> 00:10:05,910
But how does feel to synthesize the division and modulus operators answering this question would be

106
00:10:05,910 --> 00:10:07,490
the subject of the next election?

107
00:10:09,360 --> 00:10:15,000
This is our takeaway message by adding the resource directive, we can guide our tool to select the

108
00:10:15,000 --> 00:10:17,940
desired hardware resource for implementing operators.

109
00:10:20,350 --> 00:10:21,460
Now the question.

110
00:10:23,150 --> 00:10:28,700
Describe the following arithmetic expression in reviled rituals such that a set of Desbois implements

111
00:10:28,700 --> 00:10:29,600
all additions.
