syn.directive.latency - 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 a maximum or minimum latency value, or both, on a function, loop, or region.

Vitis HLS always aims for minimum latency. The behavior of the tool when minimum and maximum latency values are specified is as follows:

  • Latency is less than the minimum: If Vitis HLS can achieve less than the minimum specified latency, it extends the latency to the specified value, potentially enabling increased sharing.
  • Latency is greater than the minimum: The constraint is satisfied. No further optimizations are performed.
  • Latency is less than the maximum: The constraint is satisfied. No further optimizations are performed.
  • Latency is greater than the maximum: If Vitis HLS cannot schedule within the maximum limit, it increases effort to achieve the specified constraint. If it still fails to meet the maximum latency, it issues a warning. Vitis HLS then produces a design with the smallest achievable latency.
Tip: You can also use syn.directive.latency to limit the efforts of the tool to find an optimum solution. Specifying latency constraints for scopes within the code: loops, functions, or regions, reduces the possible solutions within that scope and can improve tool compilation time. Refer to Improving Synthesis Runtime and Capacity for more information.

To limit the total latency of all loop iterations, the latency directive should be applied to a region that encompasses the entire loop, as in this example: syn.directive.latency Region_All_Loop_A max=10

Region_All_Loop_A: {
Loop_A: for (i=0; i<N; i++) 
  { 
  ..Loop Body... 
  }
}

In this case, even if the loop is unrolled, the latency directive sets a maximum limit on all loop operations.

Syntax

syn.directive.latency=[OPTIONS] <location>
  • <location> is the location (function, loop or region) (in the format function[/label]) to be constrained.

Options

max=<integer>
Limits the maximum latency.
min=<integer>
Limits the minimum latency.

Examples

Function foo is specified to have a minimum latency of 4 and a maximum latency of 8.

syn.directive.latency=min=4 max=8 foo

In function foo, loop loop_row is specified to have a maximum latency of 12.

syn.directive.latency=max=12 foo/loop_row