Developer Guide

Contents

Variable-Precision Integer and Floating-Point Support

The
Intel® oneAPI
DPC++/C++
Compiler
supports a range of FPGA-optimized arbitrary-precision data types that are defined in header files, which you can include in your designs. Some of these header files are based on the Algorithmic C (AC) data types provided by Siemens EDA*
(formerly Mentor Graphics)
under the Apache 2.0 license. For more information about the Algorithmic C data types, refer to https://cdrdv2.intel.com/v1/dl/getContent/728986.
Data Types Supported by the
Intel® oneAPI
DPC++/C++
Compiler
Data Type
Header File
Description
ac_int
<sycl/ext/intel/ac_types/ac_int.hpp>
Arbitrary-precision integer support.
ac_fixed
<sycl/ext/intel/ac_types/ac_fixed.hpp>
Arbitrary-precision fixed-point number support.
<sycl/ext/intel/ac_types/ac_fixed_math.hpp>
Supports some non-standard math functions for arbitrary-precision fixed-point data types.
ac_complex
<sycl/ext/intel/ac_types/ac_complex.hpp>
Complex number support.
ap_float
<sycl/ext/intel/ac_types/ap_float.hpp>
Arbitrary-precision floating-point number support.
<sycl/ext/intel/ac_types/ap_float_math.hpp>
Supports commonly used exponential, logarithmic, power, and trigonometric functions with
ap_float
data type.
Ensure that the AC data type headers are included after
<CL/sycl.hpp>
and
<sycl/ext/intel/fpga_extensions.hpp>
header files.
In the oneAPI 2022.1 release, the
hls_float
data type was renamed as
ap_float
. The header files
<sycl/ext/intel/ac_types/hls_float.hpp>
and
<sycl/ext/intel/ac_types/hls_float_math.hpp>
are still available in this release, so you can access the
hls_float
data type. However, the header files will be removed in a future release. Hence, you must update your design to use the new
ap_float
data type and the header files
<sycl/ext/intel/ac_types/ap_float.hpp>
and
<sycl/ext/intel/ac_types/ap_float_math.hpp>
.

Compilation Flags

Compilation Flags for Data Types
Data Type
dpcpp
Command Flags
Description
AC type
  • Linux
    :
    -qactypes
  • Windows
    :
    /Qactypes
Use these flags to include
ac_types
header files on the include path and link against AC type libraries required for the host device execution support.
ap_float
type
  • Linux
    :
    -fp-model=precise -no-fma
  • Windows
    :
    /fp:precise /Qfma-
Use these flags to ensure that floating-point operations are accurate.
For more information about these flags, refer to
-fp-model, fp
and
fma, Qfma
topics in the
Intel® oneAPI
DPC++/C++
Compiler
Developer Guide and Reference
.
-DFPGA_EMULATOR
Use this flag when using the
ap_float
data type and compiling programs for emulation.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.