![]() |
![]() |
CC27xxDriverLibrary
|
![]() |
Modules | |
[apu.h] APU Vector Operations | |
[apu.h] APU Matrix Operations | |
[apu.h] APU Advanced Operations | |
Macros | |
#define | APU_FBA_ENABLE 1 |
Enable Forward/Backward Averaging. More... | |
#define | APU_FBA_DISABLE 0 |
Disable Forward/Backward Averaging. More... | |
#define | APU_MEMORY_INTERLEAVED 1 |
Set APU memory in interleaved mode. More... | |
#define | APU_MEMORY_MIRRORED 0 |
Set APU memory in mirrored mode. More... | |
#define | APU_GET_DATA_MEM_OFFSET(x) ((uint32_t)x - (uint32_t)VCERAM_DATA0_BASE) >> 3 |
#define | APU_GET_DATA_MEM_ABS(x) ((uint32_t)VCERAM_DATA0_BASE + (((uint32_t)x) << 3)) |
Functions | |
void | APUWaitOnIrq (void) |
Wait for the APU interrupt. More... | |
bool | APUOperationDone (void) |
Check if the APU has completed its operation. More... | |
void | APUWaitOp (void) |
Wait for the APU to start and finish. More... | |
void | APUSetConfig (uint32_t memConfig) |
Configure the APU. More... | |
void | APUNop (void) |
APU NOP. More... | |
The APU - Algorithm Processing Unit - is a generic mathematical acceleration module that is able to operate with single-precision floating point numbers (IEEE 754 format) and is optimized to work with complex numbers. This module is able to deal with vector (and matrix) operations efficiently
In this material, a "number" is meant to represent a complex number, or two single precision IEEE 754 floating point numbers. There are two possible representations for complex numbers, cartesian or polar.
The data memory can be used by the APU in two different configurations, depending on the application. These configurations are known as "Interleaved Mode" (RAID 0) or "Mirrored Mode" (RAID 1). The APU shall be configured to either of those operation modes.
The data memories is seen differently from the CPU system side and from the APU side. Essentially, the CPU will observe the normal 32-bit, byte oriented, memory map, whereas the APU will operate and observe a 64-bit wide word-oriented map. The CPU will operate with a 32-bit global address and then APU will only need a 12 bit local address. This table illustrates the differences in the two views.
Vector X with length N is stored by N units in APU memory from address start_address to end_address = start_address
From system address scheme:
Matrix A[MxN] with M rows and N columns is stored by M*N units in APU memory in the column-major order from start_address to end_address = start_address + M*N - 1. Generally, element A[i,j] (i = 0 to M-1, j = 0 to N-1) is stored at start_addres + j * M + i in APU memory
From system address scheme:
Triangular matrix T[NxN] with N rows and N columns can be stored in an efficient manner by N*(N+1)/2 units in the data memory from address start_address to end_address = start_address + N*(N+1)/2 - 1. A simple way to access these matrices is to create the following LUT in the system CPU: LUT = [0,1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171,190,210,231,253,276,300,325,351,378,406,435,465] with LUT[j] (j = 0 to N-1) is basically the order of element T[0,j] in APU memory. Generally, element T[i,j] (i,j = 0 to N-1) is stored at start_address + LUT[j] + i in APU memory.
From system address scheme:
The API functions can be grouped like this:
APU Control Operations:
Vector Operations:
Matrix Operations:
Advanced Operations:
#define APU_FBA_ENABLE 1 |
Enable Forward/Backward Averaging.
#define APU_FBA_DISABLE 0 |
Disable Forward/Backward Averaging.
#define APU_MEMORY_INTERLEAVED 1 |
Set APU memory in interleaved mode.
Referenced by APUSetConfig().
#define APU_MEMORY_MIRRORED 0 |
Set APU memory in mirrored mode.
Referenced by APUSetConfig().
#define APU_GET_DATA_MEM_OFFSET | ( | x | ) | ((uint32_t)x - (uint32_t)VCERAM_DATA0_BASE) >> 3 |
Referenced by APUComputeFft(), APUComputeIfft(), APUConfigFft(), APUGaussJordanElim(), APUJacobiEVD(), APUMatrixMult(), APUMatrixMultHerm(), APUMatrixMultSym(), APUMatrixNorm(), APUMatrixScalarMult(), APUMatrixScalarSum(), APUMatrixSum(), APUSpSmoothCovMatrix(), APUUnitCircle(), APUVectorCart2Pol(), APUVectorDot(), APUVectorDotConj(), APUVectorMult(), APUVectorMultConj(), APUVectorPol2Cart(), APUVectorSort(), and APUVectorSum().
#define APU_GET_DATA_MEM_ABS | ( | x | ) | ((uint32_t)VCERAM_DATA0_BASE + (((uint32_t)x) << 3)) |
Referenced by APUGaussJordanElim(), and APUJacobiEVD().
void APUWaitOnIrq | ( | void | ) |
Wait for the APU interrupt.
This function busy-waits until the APU API interrupt is set.
References HWREG, VCE_BASE, VCE_ICLR_API_YES, VCE_O_ICLR, VCE_O_RIS, and VCE_RIS_API_M.
bool APUOperationDone | ( | void | ) |
Check if the APU has completed its operation.
Checks the APU message box to see if it has completed its operation.
References APU_MSGBOX_CMDOK, HWREG, VCE_BASE, and VCE_O_MSGBOX.
Referenced by APUWaitOp().
void APUWaitOp | ( | void | ) |
Wait for the APU to start and finish.
Wait for the APU to both begin and complete its operation.
References APUOperationDone().
void APUSetConfig | ( | uint32_t | memConfig | ) |
Configure the APU.
Enable the APU, initialize it and configure its memory mode.
memConfig | is the memory configuration mode, either mirrored or interleaved. Must be one of the following: |
References APU_API_CONFIG, APU_MEMORY_INTERLEAVED, APU_MEMORY_MIRRORED, HWREG, VCE_BASE, VCE_ENABLE_TOPSM_ONE, VCE_INIT_TOPSM_ONE, VCE_LSECTL_MEMORY_INTERLEAVED, VCE_LSECTL_MEMORY_MIRRORED, VCE_O_API, VCE_O_CMDPAR0, VCE_O_ENABLE, and VCE_O_INIT.
void APUNop | ( | void | ) |
APU NOP.
Configure the APU to do nothing.
References APU_API_NOP, HWREG, VCE_BASE, and VCE_O_API.