The following functions have been added to aid the use of the array types with the FIR Compiler C Model and, specifically, the advanced channel patterns.
Set Channel
xip_status
xip_array_<type>_set_chan(
xip_array_<type>* p
const <type> value,
size_t path,
size_t chan,
size_t index
xip_fir_v7_2_pattern pattern
);
This function maps an array index for one channel, specified by path and chan,
onto the 3-D structure of xip_array_<type>
structure expected
by the xip_fir_v7_2_data_send
(see Send DATA Packet) and
xip_fir_v7_2_data_get
(see Get DATA Packet) functions of the model.
This function should be particularly useful for the Advanced Interleaved Channels feature; where locations in the input array are remapped to duplicate entries for some channels. Figure 2 shows this requirement.
pattern
should be set to P_BASIC for a Basic Interleaved Channel model configuration and set to
the current pattern ID for an Advanced Interleaved Channel model configuration.
See Table 1 for a list of all the supported patterns and see fir_compiler_v7_2_bitacc_cmodel.h for the enumerated pattern IDs.
Get Channel
xip_status
xip_array_<type>_get_chan(
xip_array_<type>* p
<type>* value,
size_t path,
size_t chan,
size_t index
xip_fir_v7_2_pattern pattern
);
This function is the reciprocal of the
xip_array_<type>_set_chan
function and extracts the value of
an individual channel for a given index, path and channel. The function issues an
XIP_STATUS_ERROR if the index exceeds the array capacity or size.