CC27xxDriverLibrary
[apu.h] APU Advanced Operations
Collaboration diagram for [apu.h] APU Advanced Operations:

Functions

void APUSpSmoothCovMatrix (uint16_t N, void *pInput, uint16_t L, void *pResult, uint16_t fb)
 APU accelerator for covariance matrix computation using spatial smoothing and forward-backward averaging (optional) More...
 
void APUJacobiEVD (uint16_t N, void *pInput, void *pResultV, uint16_t maxIter, float minSum, float epsTol)
 APU accelerator for Jacobi Eigen-Decomposition (EVD) of Hermitian Matrix. More...
 
void APUGaussJordanElim (uint16_t M, uint16_t N, void *pInput, float epsTol)
 APU accelerator for Gauss-Jordan Elimination of a rectable complex matrix. More...
 
void APUConfigFft (uint16_t N, void *pX)
 Configure APU accelerator for Fast Fourier transform. More...
 
void APUComputeFft (uint16_t N, void *pX)
 APU accelerator for Fast Fourier transform. More...
 
void APUComputeIfft (uint16_t N, void *pX)
 APU accelerator for invert Fast Fourier transform. More...
 
void APUUnitCircle (uint16_t N, uint16_t M, uint16_t phase, uint16_t conj, void *pResult)
 APU accelerator for generating points evenly distributed on unit circle. More...
 
void APUVectorMaxMin (uint16_t N, void *pInput, float thresh, uint16_t op, void *pResult)
 APU accelerator for computing max/min of the real part of a vector and a real value scalar. More...
 
void APUVectorR2C (uint16_t N, void *pInputA, void *pInputB, uint16_t op, void *pResult)
 APU accelerator for converting back and forth between real and complex numbers. More...
 
void APUHermLo (uint16_t N, void *pInput, void *pResult)
 APU accelerator for converting Hermitian upper-triangular to lower-triangular. More...
 

Detailed Description

Close the Doxygen group.

Function Documentation

§ APUSpSmoothCovMatrix()

void APUSpSmoothCovMatrix ( uint16_t  N,
void *  pInput,
uint16_t  L,
void *  pResult,
uint16_t  fb 
)

APU accelerator for covariance matrix computation using spatial smoothing and forward-backward averaging (optional)

Calculate covariance matrix with spatial smoothing and forward-backward averaging. Given a received signal length N, a smaller matrix (LxL) with L < N is created by averaging (N-L+1) overlapped covariance matrices. The spatially smoothed matrix can also be applied forward-backward averaging (optional).

Parameters
Nlength of the received signal vector
pInputa pointer to the base of the input vector, in APU memory
Lsize of the output square covariance matrix
pResulta pointer to the output covariance matrix, in APU memory
fbforward-backward averaging (FBA) option
  • APU_FBA_DISABLE : No FBA
  • APU_FBA_ENABLE : Applying FBA on top of spatially smoothed matrix
Returns
None

References APU_API_COVMATRIX, and APU_GET_DATA_MEM_OFFSET.

§ APUJacobiEVD()

void APUJacobiEVD ( uint16_t  N,
void *  pInput,
void *  pResultV,
uint16_t  maxIter,
float  minSum,
float  epsTol 
)

APU accelerator for Jacobi Eigen-Decomposition (EVD) of Hermitian Matrix.

Calculate the eigenvalues and eigenvectors of a Hermitian matrix.

Defined as:

[V D] = eigen_decomposition(A), such that V' * A * V = D

in which, A[NxN] is Hermitian matrix, D[NxN] is a diagonal matrix of eigenvalues, and V[NxN] is a matrix whose columns are the corresponding eigenvectors

Note
Since A is the Hermitian matrix, eigenvalues are all real and positive numbers. In addition, in APU, the output eigenvalues are already sorted in descending order. To save memory, the input matrix A is updated by in-place rotation, resulting in diagonal matrix D
Parameters
Nsize of the input/output square matrices
pInputa pointer to the base of the input Hermitian matrix and the output diagonal matrix D, in APU memory.
pResultVa pointer to output eigenvectors, in APU memory
maxIterthe maximum number of iterations (Jacobi sweeps), typically 3
minSumthreshold for early stopping condition (if summation of the off-diagonal values is smaller than this threshold)
epsTolthreshold for off-diagonal elements to be considered small enough
Returns
None

References APU_API_EIGEN, APU_GET_DATA_MEM_ABS, APU_GET_DATA_MEM_OFFSET, and APU_HEAP_ADDR.

§ APUGaussJordanElim()

void APUGaussJordanElim ( uint16_t  M,
uint16_t  N,
void *  pInput,
float  epsTol 
)

APU accelerator for Gauss-Jordan Elimination of a rectable complex matrix.

Reduce the input rectangle matrix A[MxN] to reduced echelon form using Gauss-Jordan Elimination.

Defined as:

C[MxN] = gauss_elimination(A[MxN])

in which, A[MxN] is input matrix, C[MxN] is the output matrix in reduced echelon form (in other words, C[M,1:M] is the identity matrix).

Note
Gauss-Jordan reduces the matrix to REDUCED echelon form (instead of echelon form with Gauss). In addition, to save memory, the input matrix A is overwritten by its reduced echelon form C using in-place transformation. If out-place ever needed, the input matrix must be copied before calling this function.
Deprecated:
Due to errata SYS_211, this function shall not be used. Instead, use the equivalent function provided in the driver: APULPF3_jacobiEVDDma()
Parameters
Mnumber of rows of input/output matrices
Nnumber of columns of input/output matrices (N >= M)
pInputa pointer to the base of the input matrix and the output matrix, in APU memory
epsTolthreshold that smaller than it, a value considered zero
Returns
None

References APU_API_GAUSS, APU_GET_DATA_MEM_ABS, APU_GET_DATA_MEM_OFFSET, and APU_HEAP_ADDR.

§ APUConfigFft()

void APUConfigFft ( uint16_t  N,
void *  pX 
)

Configure APU accelerator for Fast Fourier transform.

Computes the Discrete Fourier transform (DFT) of a vector using a fast Fourier transform (FFT) algorithm.

Defined as:

Y = DFT(X, N)

in which, X is the input vector length N, Y is the DFT of X with same length.

Note
This is the config function, must be called BEFORE feeding input vector to the APU memory
Parameters
Nlength of input/output vectors
pXa pointer to the base of the input/output vector (since this is config, this pointer is just a placeholder), in APU memory
Returns
None
See also
APUComputeFft()

References APU_API_FFT, and APU_GET_DATA_MEM_OFFSET.

§ APUComputeFft()

void APUComputeFft ( uint16_t  N,
void *  pX 
)

APU accelerator for Fast Fourier transform.

Computes the Discrete Fourier transform (DFT) of a vector using a fast Fourier transform (FFT) algorithm.

Defined as:

Y = DFT(X, N)

in which, X is the input vector length N, Y is the DFT of X with same length.

Note
This is where the FFT computation happen. It should be called AFTER APUConfigFft(). In addition, to save memory, the input is overwritten by the output using in-place transformation. If out-place ever needed, the input vector must be copied before calling this function.
Parameters
Nlength of input/output vectors
pXa pointer to the base of the input/output vector, in APU memory
Returns
None

References APU_API_FFT, and APU_GET_DATA_MEM_OFFSET.

§ APUComputeIfft()

void APUComputeIfft ( uint16_t  N,
void *  pX 
)

APU accelerator for invert Fast Fourier transform.

Computes the invert Discrete Fourier transform (DFT) of a vector using a fast Fourier transform (FFT) algorithm.

Defined as:

Y = IFFT(X, N)

in which, X is the input vector length N, Y is the invert DFT of X with same length.

Note
This is where the IFFT computation happens. It should be called AFTER APUConfigFft(). In addition, to save memory, the input is overwritten by the output using in-place transformation. If out-place ever needed, the input vector must be copied before calling this function.
Deprecated:
Due to errata SYS_211, this function shall not be used. Instead, use the equivalent function provided in the driver: APULPF3_gaussJordanElimDma().
Parameters
Nlength of input/output vectors
pXa pointer to the base of the input/output vector, in APU memory
Returns
None

References APU_API_FFT, and APU_GET_DATA_MEM_OFFSET.

§ APUUnitCircle()

void APUUnitCircle ( uint16_t  N,
uint16_t  M,
uint16_t  phase,
uint16_t  conj,
void *  pResult 
)

APU accelerator for generating points evenly distributed on unit circle.

APU generates a unit circle as follows: exp(-j*2*pi*(k*M+phase)/1024 * (-1)^(conj)) here k is iterated internally by the APU from 0 to N-1. The result is stored at pResult

  • k = 0:N-1 (Iterated internally)
  • M = 10-bit constant
  • phase = 10-bit constant
  • conj = 0 or 1
Parameters
Nnumber of points to be generated
Mconstant M in k*M+phase
phaseconstant phase in k*M+phase
conj
  • conj = 0 : Without conjugate the output
  • conj = 1 : Conjugate output
pResulta pointer to the output vector of points, in APU memory
Returns
None

References APU_API_UNITCIRC, and APU_GET_DATA_MEM_OFFSET.

§ APUVectorMaxMin()

void APUVectorMaxMin ( uint16_t  N,
void *  pInput,
float  thresh,
uint16_t  op,
void *  pResult 
)

APU accelerator for computing max/min of the real part of a vector and a real value scalar.

APU accelerator for computing max/min of the real part of a vector and a real value scalar.

When op is APU_OP_MAX the function is defined as:

Y = max(X, thresh) = [max(real(X[i]), thresh)] for i = 1:N

When op is APU_OP_MIN the function is defined as:

Y = min(X, thresh) = [min(real(X[i]), thresh)] for i = 1:N

in which, X and Y is the N-length complex vector, and thresh is a real scalar.

Deprecated:
Due to errata SYS_211, this function shall not be used. Instead, use the equivalent function provided in the driver: APULPF3_vectorMaxMinDma().
Parameters
Nlength of input/output vectors
pInputa pointer to the base of the input vector, in APU memory
thresha real value threshold to be compared against
opselect between max or min operators
pResulta pointer to the output vector of points, in APU memory
Returns
None

References APU_API_MAXMIN, APU_GET_DATA_MEM_ABS, APU_GET_DATA_MEM_OFFSET, and APU_HEAP_ADDR.

§ APUVectorR2C()

void APUVectorR2C ( uint16_t  N,
void *  pInputA,
void *  pInputB,
uint16_t  op,
void *  pResult 
)

APU accelerator for converting back and forth between real and complex numbers.

APU accelerator for converting back and forth between real and complex numbers for vectors.

Defined as:

Y = R2C(A, B) = [R2C(A[i], B[i])] for i = 1:N

in which, A, B and Y are N-length complex vectors.

Parameters
Nlength of input/output vectors
pInputAa pointer to the base of the input vector A, in APU memory
pInputBa pointer to the base of the input vector B, in APU memory Note that when only vector A is used, this pInputB pointer is ignored and can be NULL.
pResulta pointer to the base of the output vector Y, in APU memory
opselect among converters, must be one of:
pResulta pointer to the output vector of points, in APU memory
Returns
None

References APU_API_R2C, and APU_GET_DATA_MEM_OFFSET.

§ APUHermLo()

void APUHermLo ( uint16_t  N,
void *  pInput,
void *  pResult 
)

APU accelerator for converting Hermitian upper-triangular to lower-triangular.

APU accelerator for converting converting Hermitian upper-triangular to lower-triangular. To save memory, APU stores only upper-triangular elements of Hermitian matrix in column-major order. This function converts this format to lower-triangular, column-major order Hermitian.

Parameters
Nlength of input/output vectors
pInputa pointer to the base of the input vector, in APU memory
pResulta pointer to the output vector of points, in APU memory
Returns
None

References APU_API_HERMLO, and APU_GET_DATA_MEM_OFFSET.