Specifies instance restrictions for resource allocation.
syn.directive.allocation can limit the number of RTL
instances and hardware resources used to implement specific functions, loops, or
operations. For example, if the C/C++ source has four instances of a function
syn.directive.allocation command can ensure that there is only
one instance of
foo_sub in the final RTL. All four
instances are implemented using the same RTL block. This reduces resources used by
the function, but negatively impacts performance by sharing those resources.
The operations in the C/C++ code, such as additions,
multiplications, array reads, and writes, can also be limited by the
syn.directive.allocation=[OPTIONS] <location> <instances>
<location>is the location string in the format
<instances>is a function or operator. The function can be any function in the original C/C++ code that has not been either inlined by the
syn.directive.allocationcommand or inlined automatically by Vitis HLS.
Sets a maximum limit on the number of instances (of the type defined by the
typeoption) to be used in the RTL design.
- The instance type can be
operation. For a complete list of supported operations refer to Operator Configuration.
Given a design
foo_top with multiple instances of function
foo, limits the number of instances of
the RTL to 2.
syn.directive.allocation=limit=2 type=function foo_top foo
Limits the number of multipliers used in the implementation of
to 1. This limit does not apply to any multipliers that might reside
in sub-functions of
My_func. To limit the multipliers
used in the implementation of any sub-functions, specify an allocation
directive on the sub-functions or inline the sub-function into function
syn.directive.allocation=limit=1 type=operation My_func mul