Intel® High Level Synthesis Compiler Pro Edition: Reference Manual
A newer version of this document is available. Customers should click here to go to the newest version.
10. Systems of Tasks
The component keyword marks a single function and its subfunctions as a component. Within this component function, directly-called functions are in-lined while functions that use the systems of tasks API calls (ihc::launch and ihc::collect) generate hardware outside the component datapath and behave like an asynchronous call.
The function tagged with the component keyword marks the boundary of a system of tasks. Your external system can interact with all the interfaces that the component exposes.
- Improving the performance of operations like executing loops in parallel
- Reducing FPGA area utilization by sharing an expensive compute block with different parts of your component
| Function | Description | 
|---|---|
| ihc::launch | Marks a function as an Intel® HLS Compiler task for hardware generation, and launches the task function asynchronously. | 
| ihc::collect | Synchronizes the completion of the specified task function in the component. | 
| ihc::stream | Allows streaming communication between different task functions. | 
| ihc::launch_always_run | Launches a task function at component power-on or reset and continuously executes the function. 
          Recommendation: Use the  ihc_hls_set_component_wait_cycle  with this function to keep your component and always-run task functions correctly coordinated. 
          | 
| Template Object or Parameter | Description | 
|---|---|
| ihc::stream | Streaming interface to the component or task function. | 
| ihc::buffer | Specifies the capacity (in words) of the FIFO buffer on the input data that associates with the stream. | 
| ihc::usesPackets | Exposes the startofpacket and endofpacket sideband signals on the stream interface. | 
| Function API | Description | 
|---|---|
| T read() | Blocking read call to be used from within the component or task | 
| T read(bool& sop, bool& eop) | Available only if usesPackets<true> is set.Blocking read with out-of-band startofpacket and endofpacket signals. | 
| T tryRead(bool &success) | Non-blocking read call to be used from within the component or task. The success bool is set to true if the read was valid. | 
| T tryRead(bool& success, bool& sop, bool& eop) | Available only if usesPackets<true> is set.Non-blocking read with out-of-band startofpacket and endofpacket signals. | 
| void write(T data) | Blocking write call from the component or task. | 
| void write(T data, bool sop, bool eop) | Available only if usesPackets<true> is set.Blocking write with out-of-band startofpacket and endofpacket signals. | 
| bool tryWrite(T data) | Non-blocking write call from the component or task. The return value represents whether the write was successful. | 
| bool tryWrite(T data, bool sop, bool eop) | Available only if usesPackets<true> is set.Non-blocking write with out-of-band startofpacket and endofpacket signals. The return value represents whether the write was successful. |