Visible to Intel only — GUID: bxg1572908855047
Ixiasoft
Visible to Intel only — GUID: bxg1572908855047
Ixiasoft
8. Arbitrary Precision Math Support
Some of these header files are based on the Algorithmic C (AC) data types that Mentor Graphics* provides under the Apache license. For more information about the Algorithmic C data types, refer to Mentor Graphics Algorithmic C (AC) Datatypes, which is available as a part of your Intel® HLS Compiler installation: <quartus_installdir>/hls/include/ref/ac_datatypes_ref.pdf.
The Intel® HLS Compiler also supports arbitrary-precision IEEE 754 compliant floating point data types that is not based on the AC data types.
Data Type | Intel Header File | Description |
---|---|---|
ac_int | HLS/ac_int.h | Arbitrary-width integer support
To learn more, review the following tutorials:
|
ac_fixed | HLS/ac_fixed.h | Arbitrary-precision fixed-point number support To learn more, review the tutorial: <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_fixed_constructor |
HLS/ac_fixed_math.h | Support for some nonstandard math functions for arbitrary-precision fixed-point data types To learn more, review the tutorial: <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_fixed_math_library |
- ac_fixed data type
Include the HLS/ac_fixed_math.h header file
Advantages of Arbitrary Precision Data Types
The arbitrary precision data types have the following advantages over using standard C/C++ data types in your components:
- You can achieve narrower data paths and processing elements for various operations in the circuit.
- The data types ensure that all operations are carried out in a size guaranteed not to lose any data. However, you can still lose data if you store data into a location where the data type is too narrow.
Limitations of AC Data Types
The AC data types have the following limitations:
- Multipliers are limited to generating 512-bit results.
- Dividers are limited to consuming a maximum of 64 bits.
- The FPGA-optimized header files provided by the Intel® HLS Compiler are not compatible with GCC or MSVC. When you use the Intel® HLS Compiler header files, you cannot use GCC or MSVC to compile your testbench. Both your component and testbench must be compiled with the Intel® HLS Compiler.
To compile AC data types with GCC or MSVC, use the reference AC data types headers also provided with he Intel® HLS Compiler. For details, see AC Data Types and Native Compilers.