3.6.1.11 Dataflow

Syntax
#pragma HLS function dataflow
Description
Specifies that a function should execute using dataflow parallelism.
Position
At the beginning of the function definition block.
Examples
void canny(hls::FIFO<unsigned char> &input_fifo,
           hls::FIFO<unsigned char> &output_fifo) {
#pragma HLS function dataflow

#pragma HLS dataflow_channel variable(output_gf) type(fifo)
    unsigned char output_gf [HEIGHT * WIDTH];
#pragma HLS dataflow_channel variable(output_sf) type(fifo)
    unsigned short output_sf [HEIGHT * WIDTH];
#pragma HLS dataflow_channel variable(output_nm) type(fifo)
    unsigned char output_nm [HEIGHT * WIDTH];

    gaussian_filter(input_fifo, output_gf);
    sobel_filter(output_gf, output_sf);
    nonmaximum_suppression(output_sf, output_nm);
    hysteresis_filter(output_nm, output_fifo);
}