Developer Guide

Intel oneAPI DPC++/C++ Compiler Handbook for Intel FPGAs

ID 785441
Date 5/08/2024
Public
Document Table of Contents

Host Pipe Declaration

Each individual host pipe is a program scope class declaration of the templated pipe class.

Host Pipe Template Parameters

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

0
properties The type of a properties class which contains an unordered list of zero or more properties that augment the semantics of the pipe.

For property types and their descriptions, refer to Table 2.

See Table 2. See Table 2.

The properties template parameter is the type of a SYCL properties class object, including an unordered list of any of the compile-time properties listed in the following table.

Unspecified properties take on the listed default value.

All of the listed properties are declared in the sycl::ext::intel::experimental name space. The properties class itself is declared in the sycl::ext::oneapi::experimental name space.

In IP cores, each host pipe can be configured as a data interface. You can configure whether it appears as an Avalon streaming interface or whether it is accessed through your RTL IP core CSR using the protocol template parameter.

You can use other parameters to configure other details of the data interface. For details, refer to Host Pipes RTL Interfaces.

Host Pipe Template Properties

Template Property

Definition

Valid Values

Default Values

ready_latency<int>

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_strreaming_uses_ready protocol.

Integer greater than or equal to 0

0

bits_per_symbol<int>

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

The value must divide evenly by the size of the data type

8

uses_valid<bool>

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<bool>

Specifies whether the data symbols in the pipe are in big-endian byte order.

Boolean

false

protocol

Specifies the protocol for the pipe interface.

  • protocol_name::avalon_streaming

    or

    protocol_avalon_streaming

  • protocol_name::avalon_streaming_uses_ready

    or

    protocol_avalon_streaming_uses_ready

  • protocol_name::avalon_mm

    or

    protocol_avalon_mm

  • protocol_name::avalon_mm_uses_ready

    or

    protocol_avalon_mm_uses_ready

protocol_avalon_streaming_uses_ready

Example Host Pipe Declaration

The following code is an example declaration of a host pipe:

// define at the global scope to improve RTL readability
class MyPipeT;
class AnotherPipeT;

// properties 
using MyPipePropertiesT = 
  decltype(sycl::ext::oneapi::experimental::properties(
           sycl::ext::intel::experimental::bits_per_symbol<4>,
           sycl::ext::intel::experimental::first_symbol_in_high_order_bits<false>);

// a host pipe with alias 
using MyPipeInstance = sycl::ext::intel::experimental::pipe<
    MyPipeT,    // An identifier for the pipe
    int,        // The type of data in the pipe
    8,          // The capacity of the pipe
    MyPipePropertiesT // properties
>;

// a second host pipe with alias
using AnotherPipeInstance = cl::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
               // no properties specified means all default property values used
>;

Both pipe declarations use an alias for the full templated pipe class name for convenience, as does the properties type declaration for the first pipe. The first pipe carries an int data type and has a min_capacity value of 8. It also uses two non-default property values for the bits_per_symbol property (4) and the first_symbol_in_high_order_bits property (false). The second pipe carries a float data type and has a min_capacity value of 4. By not specifying the properties template parameter, all properties listed in the properties table assume their default values for this pipe.