Logo
MSP DSP Library
Utility

Data Structures

struct  msp_q15_to_iq31_params
 Parameters for Q15 to IQ31 conversion. More...
 
struct  msp_iq31_to_q15_params
 Parameters for IQ31 to Q15 conversion. More...
 
struct  msp_cmplx_q15_params
 Parameters for creating Q15 complex vector from real and imaginary vectors. More...
 
struct  msp_cmplx_iq31_params
 Parameters for creating IQ31 complex vector from real and imaginary vectors. More...
 
struct  msp_copy_q15_params
 Parameters for Q15 vector copy function. More...
 
struct  msp_copy_iq31_params
 Parameters for IQ31 vector copy function. More...
 
struct  msp_fill_q15_params
 Parameters for Q15 real vector fill. More...
 
struct  msp_fill_iq31_params
 Parameters for IQ31 real vector fill. More...
 
struct  msp_cmplx_fill_q15_params
 Parameters for Q15 complex vector fill. More...
 
struct  msp_cmplx_fill_iq31_params
 Parameters for IQ31 complex vector fill. More...
 
struct  msp_interleave_q15_params
 Parameters for Q15 vector interleave. More...
 
struct  msp_interleave_iq31_params
 Parameters for IQ31 vector interleave. More...
 
struct  msp_deinterleave_q15_params
 Parameters for Q15 vector deinterleave. More...
 
struct  msp_deinterleave_iq31_params
 Parameters for IQ31 vector deinterleave. More...
 
struct  msp_sinusoid_q15_params
 Parameters for Q15 sinusoid generation. More...
 

Functions

msp_status msp_q15_to_iq31 (const msp_q15_to_iq31_params *params, const _q15 *src, _iq31 *dst)
 Convert Q15 vector to IQ31 format. More...
 
msp_status msp_iq31_to_q15 (const msp_iq31_to_q15_params *params, const _iq31 *src, _q15 *dst)
 Convert IQ31 vector to Q15 format. More...
 
msp_status msp_cmplx_q15 (const msp_cmplx_q15_params *params, const _q15 *real, const _q15 *imag, _q15 *dst)
 Create Q15 complex vector from real and imaginary vectors. More...
 
msp_status msp_cmplx_iq31 (const msp_cmplx_iq31_params *params, const _iq31 *real, const _iq31 *imag, _iq31 *dst)
 Create IQ31 complex vector from real and imaginary vectors. More...
 
msp_status msp_copy_q15 (const msp_copy_q15_params *params, const _q15 *src, _q15 *dst)
 Real Q15 vector copy. More...
 
msp_status msp_copy_iq31 (const msp_copy_iq31_params *params, const _iq31 *src, _iq31 *dst)
 Real IQ31 vector copy. More...
 
msp_status msp_fill_q15 (const msp_fill_q15_params *params, _q15 *dst)
 Real Q15 vector fill with constant. More...
 
msp_status msp_fill_iq31 (const msp_fill_iq31_params *params, _iq31 *dst)
 Real IQ31 vector fill with constant. More...
 
msp_status msp_cmplx_fill_q15 (const msp_cmplx_fill_q15_params *params, _q15 *dst)
 Complex Q15 vector fill with constant. More...
 
msp_status msp_cmplx_fill_iq31 (const msp_cmplx_fill_iq31_params *params, _iq31 *dst)
 Complex IQ31 vector fill with constant. More...
 
msp_status msp_interleave_q15 (const msp_interleave_q15_params *params, const _q15 *src, _q15 *dst)
 Insert a single channel into a multiple-channel destination. More...
 
msp_status msp_interleave_iq31 (const msp_interleave_iq31_params *params, const _iq31 *src, _iq31 *dst)
 Insert a single channel into a multiple-channel destination. More...
 
msp_status msp_deinterleave_q15 (const msp_deinterleave_q15_params *params, const _q15 *src, _q15 *dst)
 Extract a single channel from multiple-channel source. More...
 
msp_status msp_deinterleave_iq31 (const msp_deinterleave_iq31_params *params, const _iq31 *src, _iq31 *dst)
 Extract a single channel from multiple-channel source. More...
 
msp_status msp_sinusoid_q15 (const msp_sinusoid_q15_params *params, _q15 *dst)
 Generate a sinusoid with specified amplitude and frequency. More...
 

Detailed Description

This file provides utility functions for operations such as data copy, array fill and deinterleaving of channel data.

Function Documentation

msp_status msp_cmplx_fill_iq31 ( const msp_cmplx_fill_iq31_params params,
_iq31 dst 
)

Complex IQ31 vector fill with constant.

Details
Fill of complex IQ31 destination vector with constant real and imaginary components.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the complex fill parameter structure.
dstPointer to the destination vector.
Returns
Status of the operation.
msp_status msp_cmplx_fill_q15 ( const msp_cmplx_fill_q15_params params,
_q15 dst 
)

Complex Q15 vector fill with constant.

Details
Fill of complex Q15 destination vector with constant real and imaginary components.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the complex fill parameter structure.
dstPointer to the destination vector.
Returns
Status of the operation.
msp_status msp_cmplx_iq31 ( const msp_cmplx_iq31_params params,
const _iq31 real,
const _iq31 imag,
_iq31 dst 
)

Create IQ31 complex vector from real and imaginary vectors.

Details
Create IQ31 complex vector from real and imaginary vectorsof the same length.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the parameter structure.
realPointer to the IQ31 real vector.
imagPointer to the IQ31 imaginary vector.
dstPointer to the IQ31 complex destination vector.
Returns
Status of the operation.
msp_status msp_cmplx_q15 ( const msp_cmplx_q15_params params,
const _q15 real,
const _q15 imag,
_q15 dst 
)

Create Q15 complex vector from real and imaginary vectors.

Details
Create Q15 complex vector from real and imaginary vectorsof the same length.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the parameter structure.
realPointer to the Q15 real vector.
imagPointer to the Q15 imaginary vector.
dstPointer to the Q15 complex destination vector.
Returns
Status of the operation.
Examples:
transform_ex2_cmplx_fft_auto_q15.c, and vector_ex2_complex_add_q15.c.
msp_status msp_copy_iq31 ( const msp_copy_iq31_params params,
const _iq31 src,
_iq31 dst 
)

Real IQ31 vector copy.

Details
Copy of real IQ31 source vector to destination vector.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the vector copy parameter structure.
srcPointer to the source data to copy.
dstPointer to the destination vector.
Returns
Status of the operation.
Examples:
filter_ex2_fir_iq31.c.
msp_status msp_copy_q15 ( const msp_copy_q15_params params,
const _q15 src,
_q15 dst 
)

Real Q15 vector copy.

Details
Copy of real Q15 source vector to destination vector.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the vector copy parameter structure.
srcPointer to the source data to copy.
dstPointer to the destination vector.
Returns
Status of the operation.
Examples:
filter_ex1_fir_q15.c, transform_ex1_fft_fixed_q15.c, transform_ex2_cmplx_fft_auto_q15.c, and transform_ex3_fft_iq31.c.
msp_status msp_deinterleave_iq31 ( const msp_deinterleave_iq31_params params,
const _iq31 src,
_iq31 dst 
)

Extract a single channel from multiple-channel source.

Details
A single IQ31 vector is extracted from multiple interleaved vectors. For example, a deinterleave operation to extract channel one from a four channel source vector x[] with channel length 4 will extract the following data:
x[1], x[5], x[9], x[13]
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the deinterleave parameter structure.
srcPointer to the source data to deinterleave.
dstPointer to the destination data to store results.
Returns
Status of the operation.
msp_status msp_deinterleave_q15 ( const msp_deinterleave_q15_params params,
const _q15 src,
_q15 dst 
)

Extract a single channel from multiple-channel source.

Details
A single Q15 vector is extracted from multiple interleaved vectors. For example, a deinterleave operation to extract channel one from a four channel source vector x[] with channel length 4 will extract the following data:
x[1], x[5], x[9], x[13]
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the deinterleave parameter structure.
srcPointer to the source data to deinterleave.
dstPointer to the destination data to store results.
Returns
Status of the operation.
msp_status msp_fill_iq31 ( const msp_fill_iq31_params params,
_iq31 dst 
)

Real IQ31 vector fill with constant.

Details
Fill of real IQ31 destination vector with constant.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the vector copy parameter structure.
dstPointer to the destination vector.
Returns
Status of the operation.
Examples:
filter_ex2_fir_iq31.c.
msp_status msp_fill_q15 ( const msp_fill_q15_params params,
_q15 dst 
)

Real Q15 vector fill with constant.

Details
Fill of real Q15 destination vector with constant.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the vector copy parameter structure.
dstPointer to the destination vector.
Returns
Status of the operation.
Examples:
filter_ex1_fir_q15.c, filter_ex3_biquad_cascade_df1_q15.c, filter_ex4_biquad_cascade_df2_q15.c, filter_ex5_biquad_cascade_df2_ext_q15.c, transform_ex1_fft_fixed_q15.c, transform_ex2_cmplx_fft_auto_q15.c, and transform_ex3_fft_iq31.c.
msp_status msp_interleave_iq31 ( const msp_interleave_iq31_params params,
const _iq31 src,
_iq31 dst 
)

Insert a single channel into a multiple-channel destination.

Details
A single IQ31 vector is inserted into multiple interleaved vectors. For example, a interleave operation to insert a source vector x[] into channel one of a four channel destination vector y[] will yield the following data result:
y[0], x[0], y[2], y[3], y[4], x[1], y[6], y[7] ...
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the interleave parameter structure.
srcPointer to the source data to interleave.
dstPointer to the destination data to interleave into.
Returns
Status of the operation.
msp_status msp_interleave_q15 ( const msp_interleave_q15_params params,
const _q15 src,
_q15 dst 
)

Insert a single channel into a multiple-channel destination.

Details
A single Q15 vector is inserted into multiple interleaved vectors. For example, a interleave operation to insert a source vector x[] into channel one of a four channel destination vector y[] will yield the following data result:
y[0], x[0], y[2], y[3], y[4], x[1], y[6], y[7] ...
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the interleave parameter structure.
srcPointer to the source data to interleave.
dstPointer to the destination data to interleave into.
Returns
Status of the operation.
msp_status msp_iq31_to_q15 ( const msp_iq31_to_q15_params params,
const _iq31 src,
_q15 dst 
)

Convert IQ31 vector to Q15 format.

Details
Convert a IQ31 data vector to a Q15 format data vector of the same length.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the parameter structure.
srcPointer to the IQ31 source vector.
dstPointer to the Q15 destination vector.
Returns
Status of the operation.
msp_status msp_q15_to_iq31 ( const msp_q15_to_iq31_params params,
const _q15 src,
_iq31 dst 
)

Convert Q15 vector to IQ31 format.

Details
Convert a Q15 data vector to a IQ31 format data vector of the same length.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the parameter structure.
srcPointer to the Q15 source vector.
dstPointer to the IQ31 destination vector.
Returns
Status of the operation.
Examples:
filter_ex2_fir_iq31.c, and transform_ex3_fft_iq31.c.
msp_status msp_sinusoid_q15 ( const msp_sinusoid_q15_params params,
_q15 dst 
)

Generate a sinusoid with specified amplitude and frequency.

Details
Generate a sinusoid waveform with configured amplitude and frequency parameters using DF1 biquad functions.
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
Parameters
paramsPointer to the sinusoid parameter structure.
dstPointer to the destination to store generated sinusoid.
Returns
Status of the operation.
Examples:
filter_ex1_fir_q15.c, filter_ex2_fir_iq31.c, filter_ex3_biquad_cascade_df1_q15.c, filter_ex4_biquad_cascade_df2_q15.c, filter_ex5_biquad_cascade_df2_ext_q15.c, matrix_ex1_add_q15.c, matrix_ex2_trans_q15.c, matrix_ex3_mpy_q15.c, transform_ex1_fft_fixed_q15.c, transform_ex2_cmplx_fft_auto_q15.c, transform_ex3_fft_iq31.c, vector_ex1_max_q15.c, and vector_ex2_complex_add_q15.c.