Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

ID 683310
Date 12/18/2019
Document Table of Contents

7.2. Concurrency Control (hls_max_concurrency Attribute)

You can use the hls_max_concurrency component attribute to increase or limit the maximum concurrency of your component. The concurrency of a component is the number of invocations of the component that can be in progress at one time. By default, the Intel® HLS Compiler Standard Edition tries to maximize concurrency so that the component runs at peak throughput.

You can control the maximum concurrency of your component by adding the hls_max_concurrency attribute immediately before you declare your component, as shown in the following example:
#include "HLS/hls.h"

component void foo ( /* arguments */ ){
  // Component code
The Intel® HLS Compiler sets the component initiation interval (II) to 1 in the following cases:
  • At the component level, the Intel HLS compiler does not automatically create private copies of component memory to increase the throughput. If your component invocation uses a non-static component memory system, the next invocation cannot start until the previous invocation has finished all of its accesses to and from that component memory. This limitation is shown in the Loop analysis report as load-store dependencies on the component memory. Adding the hls_max_concurrency(N) attribute to the component creates private copies of the component memory so that you can have multiple invocations of your component in progress at the same time.

    For finer-grained control of which component memories to create local copies of, use the hls_max_concurrency memory attribute. For details, see hls_max_concurrency Memory Attribute.

  • In some cases, the compiler reduces concurrency to save a great deal of area. In these cases, the hls_max_concurrency(N) attribute can increase the concurrency from 1.
  • This attribute can also accept a value of 0. When this attribute is set to 0, the component should be able to accept new invocations as soon as the downstream datapath frees up. Only use this value when you see loop initiation interval (II) issues (such as extra bubbles) in your component, because using this attribute can increase the component area.

You can also control the concurrency of loops in components with the max_concurrency(N) pragma. For more information about the max_concurrency(N) pragma, see Loop Concurrency (max_concurrency Pragma).