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 ofxip_real
-
xip_array_complex
for arrays ofxip_complex
-
xip_array_uint
for arrays ofxip_uint
-
xip_array_mpz
for arrays ofxip_mpz
-
xip_array_mpz_complex
for arrays ofxip_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