syn.directive.allocation - 2023.1 English

Vitis Unified IDE and Common Command-Line Reference Manual (UG1553)

Document ID
UG1553
Release Date
2023-07-17
Version
2023.1 English

Description

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 foo_sub, the 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 command.

Syntax

syn.directive.allocation=[OPTIONS] <location> <instances>
  • <location> is the location string in the format function[/label].
  • <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.allocation command or inlined automatically by Vitis HLS.

Options

limit=<integer>

Sets a maximum limit on the number of instances (of the type defined by the type option) to be used in the RTL design.

type=[function|operation]
The instance type can be function (default) or operation. For a complete list of supported operations refer to Operator Configuration.

Examples

Given a design foo_top with multiple instances of function foo, limits the number of instances of foo in the RTL to 2.

syn.directive.allocation=limit=2 type=function foo_top foo

Limits the number of multipliers used in the implementation of My_func 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 My_func.

syn.directive.allocation=limit=1 type=operation My_func mul