Dataflow Canonical Rules – 2 - 2022.2 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2022-12-16
Version
2022.2 English

Description

Warning: [214-169] There are instances of non-canonical statements in the dataflow region.
This message reports that the dataflow region is not following the canonical body.

Solution

Vitis HLS transforms the region to apply DATAFLOW optimization. It is recommended to write the code inside this region (referred to as the canonical region) using canonical forms as listed below:

  1. Use a local, non-static scalar or array/pointer variable, or local static stream variable. A local variable is declared inside the function body (for dataflow in a function) or loop body (for dataflow inside a loop).
  2. A sequence of function calls that pass data forward (with no feedback), from a function to one that is lexically later, under the following conditions:
    1. Variables (except scalar) can have only one reading process and one writing process.
    2. Use write before read (producer before consumer) if you are using local variables, which then become channels.
    3. Use read before write (consumer before producer) if you are using function arguments. Any intra-body anti-dependencies must be preserved by the design.
    4. Function return type must be void.
    5. No loop-carried dependencies among different processes via variables.
      • Inside the canonical loop (i.e., values written by one iteration and read by a following one).
      • Among successive calls to the top function (i.e., inout argument written by one iteration and read by the following iteration).