Header File

A library must declare function prototypes that map onto the IP block in a header file that can be #included in user application source files. These functions define the function call interface for accessing the IP through software application code.

For example:
 // FILE: fir.h
#define N 256
void fir(signed char X[N], short Y[N]);

A library header file contains function declarations, or software entry points for the library. Some of the declared functions in a C-callable IP library can be hardware functions that map onto an IP block.

Note: There are several requirements on the hardware function declarations:
  • Every function argument must map onto one of the ports of the IP. For memory mapped ports, including scalar arguments and pointers, the mapping includes the register offset. Supported IP port types include AXI4 (master or slave), AXI4 stream (master or slave), and AXI4-lite (slave).
  • Every IP port must be mapped from some function argument in the library, and every application must ensure make calls into the library to define dataflow to every port.
  • Multiple functions can map onto the IP, and different functions can have arguments that map onto the same IP port, but these must be declared to be consistent. For example, you cannot have two functions with different argument types that map onto the same port, nor have two different array arguments that map onto a single stream port.