Dynamic Arrays - 7.2 English

FIR Compiler (PG149)

Document ID
PG149
Release Date
2022-10-26
Version
7.2 English

The C model represents input and output data using multi-dimensional dynamic arrays. The xip_array_<type> structure is used to specify a multi-dimensional dynamic array containing elements of type xip_<type> . Several utility functions are provided that allow creation, allocation and destruction of array instances.

For each array type, the DECLARE_XIP_ARRAY(<type>) macro can be used to declare the structure and utility function prototypes. The C model header already contains declarations for the following array types:

xip_array_real for arrays of xip_real

xip_array_complex for arrays of xip_complex

xip_array_uint for arrays of xip_uint

xip_array_mpz for arrays of xip_mpz

xip_array_mpz_complex for arrays of xip_mpz_complex

The utility functions for each array type can be defined using the DEFINE_XIP_ARRAY(<type>) macro. The utility function must be defined somewhere within user code before the functions can be used; see the run_bitacc_cmodel.c file for examples.

Further utility functions, specific to the FIR Compiler C Model, can be declared and defined using the DECLARE_FIR_XIP_ARRAY(<type>) and DEFINE_FIR_XIP_ARRAY(<type>) macros. The C model header already contains declarations for the following array types:

xip_array_real

xip_array_complex

xip_array_mpz

xip_array_mpz_complex