Scalar Inputs - 2021.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-03-29
Version
2021.2 English

Scalar inputs are typically control variables that are directly loaded from the host machine. They can be thought of as programming data or parameters under which the main kernel computation takes place. These kernel inputs are write-only from the host side. In the following function, the scalar parameters are width and height.

void process_image(int *input, int *output, int width, int height) {

The scalar arguments are assigned a default INTERFACE pragma, which is inferred by the tool.

#pragma HLS INTERFACE s_axilite port=width bundle=control
#pragma HLS INTERFACE s_axilite port=height bundle=control

In this example, there are two scalar inputs that specify the image width and height. These data inputs come to the kernel directly from the host machine and not through global memory banks. The pragmas shown are not added to the code by the tool.

Important: Currently, the Vitis core development kit supports only one control interface bundle for each kernel. Therefore, the bundle= name should be same for all scalar data inputs and the function return. In the preceding example, bundle=control is used for all scalar inputs.