Visible to Intel only — GUID: GUID-4F69F361-57B1-4E24-B7FC-C1B0A3979173
Visible to Intel only — GUID: GUID-4F69F361-57B1-4E24-B7FC-C1B0A3979173
Declare a Host Pipe
Each individual host pipe is a function scope class declaration of the templated pipe class.
Template Parameter |
Definition |
Valid Values |
Default Values |
---|---|---|---|
id |
A unique type that identifies the host pipe. |
type |
None (must be specified) |
type |
The data type to be carried by the pipe. |
type |
None (must be specified) |
min_capacity |
The minimum number of words in units of T size that the pipe must be able to store without any being read out. A minimum capacity is required in some algorithms to avoid deadlock or for performance tuning. The hardware implementation can include more capacity than this parameter, but not less. |
Integer greater than or equal to 0 |
None (must be specified) |
ready_latency |
The number of cycles between when the ready signal is de-asserted and when the pipe can no longer accept new inputs when using the AVALON_STREAMING or AVALON_STREAMING_USES_READY protocol. |
Integer greater than or equal to 0 |
0 |
bits_per_symbol |
Describes how the data is broken into symbols on the data bus. This value is used only in conjunction with Avalon Packet support. Data is broken down according to how the first_symbol_in_high_order_bits parameter is set. |
Integer greater than or equal to 0 |
1 |
uses_valid |
Controls whether a valid signal is present on the pipe interface. If false, the upstream source must provide valid data on every cycle that ready is asserted. If set to false, the min_capacity, and ready_latency template parameters must be set to 0. |
Boolean |
true |
first_symbol_in_high_order_bits |
Specifies whether the data symbols in the pipe are in big-endian byte order. |
Boolean |
false |
protocol |
Specifies the protocol for the pipe interface. Valid values:
(from sycl::ext::intel::prototype::internal namespace) |
See Definition |
AVALON_STREAMING_USES_READY |
Example Host Pipe Declaration
The following code is an example declaration of a host pipe:
// unique user-defined types class MyPipeT; class AnotherPipeT; // a host pipe with alias using MyPipeInstance = sycl::ext::intel::prototype::pipe< MyPipeT, // An identifier for the pipe int, // The type of data in the pipe 8 // The capacity of the pipe >; // a second host pipe with alias using AnotherPipeInstance = sycl::ext::intel::prototype::pipe< AnotherPipeT, // An identifier for the pipe float, // The type of data in the pipe 4 // The capacity of the pipe >;
Both pipe declarations use an alias for the full templated pipe class name for convenience. The first carries int type and has a min_capacity of 8. The second carries float type data and has a min_capacity of 4. By not specifying parameters after the min_capacity parameter, the default values from the earlier table are used for both pipes.