In the previous lecture, we learned that their speeches and look up tables in advance of PJs could
implement and arithmetic operate.
But the question is, how can we go into a synthesis process to choose between these two types of resources
in this lecture?
I will explain how Etchells compiler directives can answer this question.
In order to implement an HLC C++ code by half the resources that evolved, cellist performs two tasks
during synthesis, elaboration and mapping.
The elaboration task transforms the C C++ source code into an internal database containing operators,
these operators represent operations in the C C++ code, such as additions, multiplication, Arrow
reads and writes.
The mapping task maps the operators onto a set, of course, which implement the harder operations codes
are the specific hardware components used to create the design, such as addas multipliers, pipeline
multipliers and blikre.
Control is provided over each of these steps, allowing you to control the hardware implementation and
the fine level of granularity.
There are two types of compiler directives available in initialised to control the elaboration and mapping
tasks.
The first directive is allocation.
The first goal of a synthesis process is to maximize performance for this purpose.
It utilizes the maximum amount of resources possible.
However, this increase is the final use area and FPGA limiting the number of operators in a design
is a useful technique to reduce the area.
It helps reduce the area by forcing sharing of the operations.
Allocation directive allows you to limit how many operators, codes or functions are used in a design.
The second directive is resource, there is a directive is used to specify which car to use for a specific
operations explicitly in this lecture, I will explain how to use the resource directive.
But before that, we need to know more about cause in Nevada evaluations.
This table shows a list of the codes used to implement some of the standard archipelagic operations.
Adds up, this score is used to implement both ADRs and subtract.
Adds up and as an estate pipelined, add or subtract, even the list determines how many pipeline stages
are required.
Adds underscored the esprit de corps ensures that the act or some operation is implemented using a DSB
48.
Defense and a stage pipeline divider, DSP 48 multiplications with pit bits that allow implementation
in a single DSP 48.
Mall combination on multiplier bitrate that exceed the size of a standard this 48 mccastle, Mullins,
Anastacia pipeline multiplier Fitbit fits that exceeds the size of a standard DSP 48 McChrystal.
Underscore Elliott multiplier implemented with lookup tables.
The resource detective can be used to guide this process to use a proper code for an operation to demonstrate
how to use this directive.
Let's consider the following operator to define the call.
We can assign a resource directive to the operators output, which is F in this case.
If the operator is addition, then we can force the HLA synthesis process to implement that with the
Espy's.
If the operator is a multiplier, we can guide us to implement that using lookup tables.
If you have an automatic operation with multiple operators like this.
Then we should break that into multiple expressions with one operator, then we can add the resource
directive's.
Now, let's use all the tools to implement this complex arithmetic expression with only lookup tables.
First, we need to create a New World Atlas project.
Choose a name for the project such as resource underscore constraint dash virtuous.
So the top function name to resource underscore constraint in the solution configuration page, accept
the default clock period and select the basis three board and the target FPGA.
Now create a new design file and name it as a resource underscore constraint that.
Defining it to function with four inputs and one out then and the arithmetic expression inside the function.
Don't forget to define the port interfaces.
If you synthesize the description, then this would be the synthesis report.
As can be seen, the hardware is not conventional as it utilizes flip flops and there is a clock signal
in the portals.
Also, if you have a look at the analysis perspective, the design execution requires four steps to
complete.
As a design needs four steps and the clock period is 10 nanosecond.
Let's change the design clock period to 40 nanosecond to make the hardware design combination.
For this purpose, go to the center's perspective, right, click on the solution one folder and select
the solutions settings in the synthesis setting page.
Change the clock prior to 40.
Now synthesize the code.
The synthesis report confirms that the Hardbodies combination and utilizes only lookup tables and Espy's
without any memory cells.
In addition, the analysis perspective shows that the circuit execution requires one step to complete.
By looking at the resource utilization report in the synthesis perspective, we can see that 90 Espy's
will be used to implement the harbour, but our goal was only using lookup tables.
To other resource directives to guide the sentence's process to choose lookup tables, implementing
arithmetic operators.
First, we need to break the expression into several simple expressions with one operator like this.
Now, let's under-resourced directive's.
As lookup tables implement integer additions by default, we only are the directives for multipliers.
Now, let's synthesize the code.
By looking at the synthesis report, we realize that the Arctic implementation is conventional, but
the SEAL uses 3D space.
What is the problem?
Let's have a look at the analysis report.
The first multiplication operator multiplied A and B. The second multiplication operator multiply C
and the.
Then the next multiplier generates A multiplier, B multiply, C multiplied.
The first addition adds the 2B, and then the result is that it would see.
Then the result of the addition is multiplied by a.
And finally, the result is added to the a multiply be see multiplied terror to implement the desired
arithmetic expression.
As can be seen, the synthesis process has optimised expression, therefore, some of the multiplication
operators in the original description with assigned resource directives are not in this optimized expression.
And one of the multiplications in the optimized form does not have any assigned resource to find that
operator.
Let's have a look at the resource for you here.
You can see that all multipliers are implemented by Mulle Underscore Eliot Core, except the one denoted
by CU underscore if you underscore 97.
To solve the problem, we define a function to implement a multiplication.
And then we call that in the top function.
We also should stop the scientists tools from optimizing the function into the top function for this
purpose.
We can turn off the inline feature by adding this directive to the function.
Now, if you synthesize the code in the synthesis report, we see that only lookup tables are used to
implement our desired arithmetic expression.
We started the high level synthesis of addition, subtraction and multiplication.
But how does feel to synthesize the division and modulus operators answering this question would be
the subject of the next election?
This is our takeaway message by adding the resource directive, we can guide our tool to select the
desired hardware resource for implementing operators.
Now the question.
Describe the following arithmetic expression in reviled rituals such that a set of Desbois implements
all additions.