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.
set_directive_latency [OPTIONS] <location>
<location>is the location (function, loop or region) (in the format
function[/label]) to be constrained.
- Specifies the maximum latency.
- Specifies the minimum latency.
foo is specified to
have a minimum latency of 4 and a maximum latency of 8.
set_directive_latency -min=4 -max=8 foo
loop_row is specified to have a maximum
latency of 12. Place the pragma in the loop body.
set_directive_latency -max=12 foo/loop_row