The generated FPGA Interface C API consists of the following files:

  • a .h file
  • a .lvbitx file
  • NiFpga.h
  • NiFpga.c

Generated .h File

The .h file is a C header file that contains all the constants required by function calls in your application. For example, NiFpga_Open requires the name of the .lvbitx file, provided by the generated *_Bitfile constant. A digital signature of the FPGA bitstream in the bitfile, provided by the generated *_Signature constant.

The other constants represent register offsets of:

  • Each control
  • Indicator
  • FIFO in your VI
  • Other necessary information

Generated .lvbitx Bitfile

This is a version of the original .lvbitx bitfile, renamed to match the prefix of the constants in the .h header file. NiFpga_Open must find this file in order to ensure the bitstream is downloaded to the FPGA.

NiFpga.h File

This is a C header file. It is identical for all generated C APIs. It declares all the errors, types, constants, and functions needed to write an application. Most of these functions are defined in NiFpga.c.

NiFpga.c File

This is a C source file that you must include in your application. It is identical for all generated C APIs. It defines all the functions your application can call. NiFpga.c loads and unloads the NiFpga library at runtime, and forwards function calls to that library.
Note If you installed LabWindows/CVI support and are using LabWindows/CVI to develop your C application, you do not need NiFpga.h or NiFpga.c. Exclude them from the files to be generated and use the header and library files installed with LabWindows/CVI support.