The AI Engine compiler supports a subset of high-level synthesis (HLS) interfaces.
The supported input and output data types of HLS functions are:
-
hls::stream<ap_axis<N,0,0,0>>andhls::stream<ap_axiu<N,0,0,0>>, where N can be 32, 64, or 128 -
hls::stream<ap_int<N>>andhls::stream<ap_uint<N>>, where N can be 32 or 64 -
hls::stream<T>, where T can beint,unsigned int,long long,unsigned long long, orfloat -
hls::stream<std::complex<T>>, where T can beint,shortorfloat
The following scalar run-time parameter (RTP) data types are also supported:
-
ap_int<N>andap_uint<N>, whereNcan be 8, 16, 32, or 64 -
short,unsigned short,int,unsigned int,long long,unsigned long long, andfloat -
std::complex<T>, where T can beint,short, orfloat
The following array RTP data types are supported:
- Arrays of
ap_int<N>andap_uint<N>, where N can be 8, 16, 32, or 64 - Arrays of
short,unsigned short,int,unsigned int,long long,unsigned long long, orfloat - Arrays of
std::complex<T>, where T can beint,short, orfloat
ap_memory and s_axilite interfaces are required to support array RTPs. Synchronous
array RTPs are not supported for PL kernels. Asynchronous array RTPs are supported
for PL kernels in bare-metal systems.When ap_int<N> and ap_uint<N> are used as RTPs, the PS program can
use adf::graph::update and adf::graph::read with compatible data types to access RTPs. For
example, use adf::graph::update(input_port& rtpPort,
int32 value) to update the ap_int<32> run-time parameter. For more information on the use
of RTPs, see Run-Time Graph Control API.
The only supported HLS function return type is void.
graph::update for an HLS scalar RTP greater
than 32 bits should be called before graph::run.
To support the HLS math library inside the kernel, an additional linker option is needed for the AI Engine compiler:
--Xpslinker="-lhlsmc++-GCC46
-lIp_floating_point_v7_0_bitacc_cmodel
-lIp_xfft_v9_1_bitacc_cmodel
-lIp_fir_compiler_v7_2_bitacc_cmodel
-lIp_dds_compiler_v6_0_bitacc_cmodel
-L$(XILINX_HLS)/lnx64/tools/fpo_v7_0
-L$(XILINX_HLS)/lnx64/lib/csim
-L$(XILINX_HLS)/lnx64/tools/dds_v6_0
-L$(XILINX_HLS)/lnx64/tools/fir_v7_0
-L$(XILINX_HLS)/lnx64/tools/fft_v9_1
-Wl,-rpath,$(XILINX_HLS)/lnx64/lib/csim
-Wl,-rpath,$(XILINX_HLS)/lnx64/tools/fpo_v7_0
-Wl,-rpath,$(XILINX_HLS)/lnx64/tools/fft_v9_1
-Wl,-rpath,$(XILINX_HLS)/lnx64/tools/fir_v7_0
-Wl,-rpath,$(XILINX_HLS)/lnx64/tools/dds_v6_0"