Migration from 2023.2 to 2024.1 (New Host Compiler) - 2024.1 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2024-07-03
Version
2024.1 English

As you migrate to Vitis HLS 2024.1, there will be changes in behaviors when functionally simulating designs. The changes will be visible during C simulation and for the test bench when running C/RTL co-simulation. The synthesized hardware is NOT affected.

It is possible for the affected code to produce a different result during C simulation or C/RTL co-simulation compared to previous versions of Vitis HLS. The following code constructs could result in a different behavior.

  1. Undefined behaviors in the test bench or design.

    Undefined behaviors occur when the C/C++ language specifications mandate that the result of an operation has unpredictable effects. Typical examples of undefined behaviors include integer overflows, divisions by zero, array accesses out of bounds, missing return statements, or shifts by a negative value or by a value greater or equal than the number of bits used to store the shifted value. The semantics of C/C++ with undefined behavior is unpredictable and can change due to many factors, including the migration to Vitis HLS 2024.1.

    Vitis HLS 2024.1 now provides address and undefined-behavior sanitizers which should be enabled during C Simulation to find these issues.

  2. Unspecified and Implementation-defined behaviors in the test bench.

    Unspecified and implementation-defined behaviors happen when the C/C++ language specifications leave it to the compiler to decide which semantics to implement for some operations. Typical examples include the evaluation order of some operators like arithmetic operators or the `,` operator (including for arguments of function calls), use of out-of-range enum values, comparison of string litterals, the size of fundamental types, the rounding mode for un-representable float litterals, of the value of pow(0, 0).

    Because clang is now used instead of gcc to create the host executables during C simulation and for the test bench of C/RTL co-simulation, a different behavior can occur compared to previous releases of Vitis HLS. When the new behavior affects the design in C simulation, the resulting semantics should be closer to that of the synthesized designed compared to previous Vitis HLS releases.

  3. gcc-specific C simulation or C/RTL co-simulation options.

    These options are not anymore supported and need to be adjusted to their equivalent in Clang.