Defining 512-bit Interface in C/C++ Kernel
HLS provides C++ arbitrary precision template classes ap_int<>
and
ap_uint<>
that can be used to define integers with any number of bits. Below
is the code snippet from the Wide Memory Read/Write C++ Example in kernel_to_gmem category on Xilinx On-boarding Example GitHub. It defines all global pointer in the
kernel argument list as ap_uint<512>
. A 512-bit AXI4 memory mapped interface
will be generated for these global pointers after compilation.
void vadd(
const ap_uint<512> *in1, // Read-Only Vector 1
const ap_uint<512> *in2, // Read-Only Vector 2
ap_uint<512> *out, // Output Result
int size // Size in integer
)
{
}