Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 12/19/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

11.1. Static-Object Libraries

A static-object library is a single platform-specific archive file that contains one or more object files, each of which contains implementations of one or more functions.

The object and library files use the same formats as the operating system that you compile your Intel® HLS Compiler code on, with additional sections that carry additional library information. On Linux platforms, a library is a .a archive file that contains .o object files. On Windows platforms, a library is a .lib archive file that contains .obj object files.

You can call the functions in the library from your component without needing to know the hardware design or the implementation details of the underlying functions in the library. Add the library to the i++ command line when your compile your component.

You can create a library from your HLS C++ code source files or register transfer level (RTL) language source files. You can target the library for use with one of the following Intel® high-level design products:
  • Intel® HLS Compiler Pro Edition
  • Intel® FPGA SDK for OpenCL™ Pro Edition

    To create a library from your HLS code that targets the Intel® FPGA SDK for OpenCL™ , you must have the Intel® FPGA SDK for OpenCL™ Pro Edition installed. The version of the SDK must be same as your version of Intel® HLS Compiler.

Creating a library is a two-step process
  1. Each object file is generated from input source files with the fpga_crossgen command.

    The required input source files depend on the type of source code you are creating the object from.

    An object is effectively an intermediate representation of your source code with both a CPU representation and an FPGA representation of your code.

    An object can be targeted for use with only one Intel® high-level design product. If you want to target more than one high-level design product, you must generate a separate object for each target product.

  2. Object files are collected into a library file with the fpga_libtool command

    Objects created from different types of source code can be collected into a library, provided all objects target the same high-level design product.

    Libraries must be built and used by the same version number Intel FPGA high-level design tool. For example, to compile your component with the Intel HLS Compiler Version 22.4, the libraries included in your component must have been created with a version 22.4 Intel FPGA high-level design tool.

Figure 18. High-Level View of the Library Creation Process