Connecting High-Level Synthesis Kernels with Other Kernels in Data Flow Graphs - 2020.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2020-11-24
Version
2020.2 English

hls::stream<ap_axis<N,0,0,0>> and hls::stream<ap_axiu<N,0,0,0>> represent an AXI4-Stream with API to specify the tkeep per byte. However, the stream implementation inside the AI Engine and adf stream API do not support a per-byte tkeep, instead per-word tkeep is supported. As a result, ap_axis<N,0,0,0> and ap_axiu<N,0,0,0> are assumed to be fully packed within each 32-bit word boundary when used inside data flow graphs. The following tables specify the allowed connections between hls::stream and adf stream and window data types in various scenarios where users want to pack and unpack data using ap_axis and ap_axiu.

Table 1. Connecting hls::stream<T1> to/from input_stream_{T2}/output_stream_{T2} in an AI Engine
T1 T2
ap_axis<32,0,0,0> int8, int16, int32, cint16
ap_axis<64,0,0,0> int8, int16, int32, int64, cint16, cint32
ap_axis<128,0,0,0> int8, int16, int32, int64, cint16, cint32
ap_axiu<32,0,0,0> uint8, uint32
ap_axiu<64,0,0,0> uint8, uint32, uint64
ap_axiu<128,0,0,0> uint8, uint32, uint64
Table 2. Connecting hls::stream<T1> to/from input_window_{T2}/output_window_{T2} in an AI Engine
T1 T2
ap_axis<32,0,0,0> int8, int16, int32, cint16
ap_axis<64,0,0,0> int8, int16, int32, int64, cint16, cint32
ap_axis<128,0,0,0> int8, int16, int32, int64, cint16, cint32
ap_axiu<32,0,0,0> uint8, uint16, uint32
ap_axiu<64,0,0,0> uint8, uint16,uint32, uint64
ap_axiu<128,0,0,0> uint8, uint16,uint32, uint64
Table 3. Connecting hls::stream<T1> to/from input_stream_{T2}/output_stream_{T2} in Programmable Logic
T1 T2
ap_axis<32,0,0,0> int32, cint16
ap_axis<64,0,0,0> int32, int64, cint16, cint32
ap_axis<128,0,0,0> int32, int64, cint16, cint32
ap_axiu<32,0,0,0> uint32
ap_axiu<64,0,0,0> uint32, uint64
ap_axiu<128,0,0,0> uint32, uint64
The following table specifies the allowed connections between hls::stream and adf stream and window data types for ap_int, ap_uint, std::complex, and native C/C++ element data types.
Table 4. Connecting hls::stream<T1> to/from input_stream_{T2}/output_stream_{T2} or input_window_{T2}/output_window_{T2}
T1 T2
ap_int<32> int32
ap_uint<32> uint32
ap_int<64> int64
ap_uint<64> uint64
std::complex<short> cint16
std::complex<int> cint32
std::complex<float> cfloat
int int32
unsigned int uint32
long long int64
unsigned long long uint64
float float