Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

ID 683310
Date 12/18/2019
Public
Document Table of Contents

10.2. Intel® HLS Compiler Standard Edition Header Files

Coding your component to be compiled by the Intel® HLS Compiler requires you to include the hls.h header file. Other header files provided with the Intel® HLS Compiler provide FPGA-optimized implementations of certain C and C++ functions.

Table 18.   Intel® HLS Compiler Standard Edition Header Files Summary
HLS Header File Description
HLS/hls.h Required for component identification and component parameter interfaces.
HLS/math.h Includes FPGA-specific definitions for the math functions from the math.h for your operating system.
HLS/extendedmath.h Includes additional FPGA-specific definitions of math functions not in math.h.
HLS/ac_int.h Provides FPGA-optimized arbitrary width integer support.
HLS/ac_fixed.h

Provides FPGA-optimized arbitrary precision fixed point support.

HLS/ac_fixed_math.h

Provides FPGA-optimized arbitrary precision fixed point math functions.

HLS/stdio.h Provides printf support for components so that printf statements work in x86 emulations, but are disabled in component when compiling to an FPGA architecture.
"HLS/iostream" (Linux only) Provides cout and cerr support for components so that cout and cerr statements work in x86 emulations, but are disabled in component when compiling to an FPGA architecture.

hls.h Header File

Syntax
#include "HLS/hls.h"
Description
Required for component identification and component parameter interfaces.

math.h Header File

Syntax
#include "HLS/math.h"
Description
Includes FPGA-specific definitions for the math functions from the math.h for your operating system.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/best_practices/single_vs_double_precision_math.

extendedmath.h Header File

Syntax
#include "HLS/extendedmath.h"
Description
Includes additional FPGA-specific definitions of math functions not in math.h.

To learn more, review the following design: <quartus_installdir>/hls/examples/QRD.

ac_int.h Header File

Syntax
#include "HLS/ac_int.h"
Description
Intel® HLS Compiler version of ac_int header file.

Provides FPGA-optimized arbitrary width integer support.

To learn more, review the following tutorials:
  • <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_int_basic_ops
  • <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_int_overflow
  • <quartus_installdir>/hls/examples/tutorials/best_practices/struct_interfaces

ac_fixed.h Header File

Syntax
#include "HLS/ac_fixed.h"
Description
Intel® HLS Compiler version of the ac_fixed header file.

Provides FPGA-optimized arbitrary precision fixed point support.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_fixed_constructor.

ac_fixed_math.h Header File

Syntax
#include "HLS/ac_fixed_math.h"
Description
Intel® HLS Compiler version of the ac_fixed_math header file.

Provides FPGA-optimized arbitrary precision fixed point math functions.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/ac_datatypes/ac_fixed_math_library.

stdio.h Header File

Syntax
#include "HLS/stdio.h"
Description
Provides printf support for components so that printf statements work in x86 emulations, but are disabled in component when compiling to an FPGA architecture.

iostream Header File (Linux only)

Syntax
#include HLS/iostream
Description
Provides cout and cerr support for components so that cout and cerr statements work in x86 emulations, but are disabled in component when compiling to an FPGA architecture.

.