Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 10/04/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.13.1. ihc::stream Class

Table 50.   Intel® HLS Compiler Systems of Tasks Streaming Interface Template Summary
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.

ihc::stream Template Object

Syntax
ihc::stream<datatype, template arguments >
Valid Values
Any trivially copyable C++ data type.
Default Value
N/A
Description
Streaming interface to the component or task.

The width of the stream data bus is equal to a width of sizeof(datatype).

ihc::buffer Template Parameter

Syntax
ihc::buffer<value>
Valid Values
Non-negative integer value.
Default Value
0
Description
The capacity, in words, of the FIFO buffer on the input data that associates with the stream.

ihc::usesPackets Template Parameter

Syntax
ihc::usesPackets<value>
Valid Values
true or false
Default Value
false
Description
Exposes the startofpacket and endofpacket sideband signals on the stream interface, which can be accessed by the packet based reads/writes.

Intel® HLS Compiler System of Tasks Streaming Interface stream Function APIs

Table 51.   Intel® HLS Compiler Streaming Input Interface stream Function APIs
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.