MSP DSP Library
|
Data Structures | |
struct | MSP_LEA_ADDMATRIX_PARAMS |
Parameter structure for LEACMD__ADDMATRIX command. More... | |
struct | MSP_LEA_ADDLONGMATRIX_PARAMS |
Parameter structure for LEAMD__ADDLONGMATRIX command. More... | |
struct | MSP_LEA_SUBMATRIX_PARAMS |
Parameter structure for LEACMD__SUBMATRIX command. More... | |
struct | MSP_LEA_SUBLONGMATRIX_PARAMS |
Parameter structure for LEACMD__SUBLONGMATRIX command. More... | |
struct | MSP_LEA_MPYMATRIX_PARAMS |
Parameter structure for LEACMD__MPYMATRIX command. More... | |
struct | MSP_LEA_MPYLONGMATRIX_PARAMS |
Parameter structure for LEACMD__MPYLONGMATRIX command. More... | |
struct | MSP_LEA_MAC_PARAMS |
Parameter structure for LEACMD__MAC command. More... | |
struct | MSP_LEA_MACLONG_PARAMS |
Parameter structure for LEACMD__MACLONGMATRIX command. More... | |
struct | MSP_LEA_POLY_PARAMS |
Parameter structure for LEACMD__POLYNOMIAL command. More... | |
struct | MSP_LEA_MAX_PARAMS |
Parameter structure for LEACMD__MAX command. More... | |
struct | MSP_LEA_MAXLONG_PARAMS |
Parameter structure for LEACMD__MAXLONGMATRIX command. More... | |
struct | MSP_LEA_MAXUNSIGNED_PARAMS |
Parameter structure for LEACMD__MAXUNSIGNED command. More... | |
struct | MSP_LEA_MAXLONGUNSIGNED_PARAMS |
Parameter structure for LEACMD__MAXUNSIGNEDMATRIX command. More... | |
struct | MSP_LEA_MIN_PARAMS |
Parameter structure for LEACMD__MIN command. More... | |
struct | MSP_LEA_MINLONG_PARAMS |
Parameter structure for LEACMD__MINLONGMATRIX command. More... | |
struct | MSP_LEA_MINUNSIGNED_PARAMS |
Parameter structure for LEACMD__MINUNSIGNEDMATRIX command. More... | |
struct | MSP_LEA_MINLONGUNSIGNED_PARAMS |
Parameter structure for LEACMD__MINLONGUNSIGNED command. More... | |
struct | MSP_LEA_MPYCOMPLEXMATRIX_PARAMS |
Parameter structure for LEACMD__MPYCOMPLEXMATRIX command. More... | |
struct | MSP_LEA_MACCOMPLEXMATRIX_PARAMS |
Parameter structure for LEACMD__MACCOMPLEXMATRIX command. More... | |
struct | MSP_LEA_MPYMATRIXROW_PARAMS |
Parameter structure for LEACMD__MPYMATRIXROW command. More... | |
struct | MSP_LEA_FIR_PARAMS |
Parameter structure for LEACMD__FIR command. More... | |
struct | MSP_LEA_FIRLONG_PARAMS |
Parameter structure for LEACMD__FIRLONG command. More... | |
struct | MSP_LEA_FIRCOMPLEX_PARAMS |
Parameter structure for LEACMD__FIRCOMPLEX command. More... | |
struct | MSP_LEA_FIRLONGCOMPLEX_PARAMS |
Parameter structure for LEACMD__FIRLONGCOMPLEX command. More... | |
struct | MSP_LEA_IIRBQ1_PARAMS |
Parameter structure for LEACMD__IIRBQ1 command. More... | |
struct | MSP_LEA_IIRBQ2_PARAMS |
Parameter structure for LEACMD__IIRBQ2 and LEACMD__IIRBQ2EXTENDED commands. More... | |
struct | MSP_LEA_BITREVERSECOMPLEX_PARAMS |
Parameter structure for LEACMD__BITREVERSECOMPLEXEVEN or LEACMD__BITREVERSECOMPLEXODD commands. More... | |
struct | MSP_LEA_BITREVERSECOMPLEXLONG_PARAMS |
Parameter structure for LEACMD__BITREVERSECOMPLEXLONGEVEN or LEACMD__BITREVERSECOMPLEXLONGODD commands. More... | |
struct | MSP_LEA_FFTCOMPLEXAUTOSCALING_PARAMS |
Parameter structure for LEACMD__FFTCOMPLEXAUTOSCALING command. More... | |
struct | MSP_LEA_FFTCOMPLEXFIXEDSCALING_PARAMS |
Parameter structure for LEACMD__FFTCOMPLEXFIXEDSCALING command. More... | |
struct | MSP_LEA_FFTCOMPLEXLONG_PARAMS |
Parameter structure for LEACMD__FFTCOMPLEXLONG command. More... | |
struct | MSP_LEA_FFT_PARAMS |
Parameter structure for LEACMD__FFT command. More... | |
struct | MSP_LEA_FFTLONG_PARAMS |
Parameter structure for LEACMD__FFTLONG command. More... | |
struct | MSP_LEA_INTERLEAVE_PARAMS |
Parameter structure for LEACMD__INTERLEAVEEVENEVEN, LEACMD__INTERLEAVEEVENODD, LEACMD__INTERLEAVEODDEVEN and LEACMD__INTERLEAVEODDODD commands. More... | |
struct | MSP_LEA_DEINTERLEAVE_PARAMS |
Parameter structure for LEACMD__DEINTERLEAVEEVENEVEN, LEACMD__DEINTERLEAVEEVENODD, LEACMD__DEINTERLEAVEODDEVEN and LEACMD__DEINTERLEAVEODDODD commands. More... | |
struct | MSP_LEA_DEINTERLEAVELONG_PARAMS |
Parameter structure for LEACMD__DEINTERLEAVELONG command. More... | |
Macros | |
#define | MSP_USE_LEA 1 |
Enable the LEA accelerator for DSPLib functions. The default is to use LEA when available, to disable LEA define MSP_DISABLE_LEA in the compiler settings. More... | |
#define | MSP_LEA_REVISION MSP_LEA_REVISION_B |
If a LEA revision is not specified default to revision B. | |
#define | MSP_LEA_CONVERT_ADDRESS(x) ((uint16_t)(((uintptr_t)(x) >> 2) & 0xffff)) |
Convert MSP430 address to internal LEA address mapping. | |
#define | MSP_LEA_REVERT_ADDRESS(x) ((uintptr_t)(((uint32_t)(x) << 2))) |
Convert LEA address to MSP430 address mapping. | |
#define | MSP_LEA_RANGE(x) |
Check that the address is aligned correctly. More... | |
#define | MSP_LEA_ALIGNED(x, n) (!((uint32_t)(x) & ((n)-1))) |
Check that the address is within the LEA RAM. | |
#define | MSP_LEA_VALID_ADDRESS(x, n) (MSP_LEA_RANGE(x) & MSP_LEA_ALIGNED(x,n)) |
Check that the address aligment is valid and within the LEA RAM. | |
#define | MSP_LEA_CONST_ZERO 0xA000 |
LEA constant memory address for 0x0000 coefficients. | |
#define | MSP_LEA_CONST_ONE 0xAC00 |
LEA constant memory address for 0x7fff coefficients. | |
#define | MSP_LEA_Q15_CONST_NEG_ONE 0xB000 |
LEA constant memory address for 0x8000 coefficients. | |
#define | MSP_LEA_IQ31_CONST_NEG_ONE 0xE000 |
LEA constant memory address for 0x80000000 coefficients. | |
#define | LEACMD__INTERLEAVEEVENEVEN (0x0000f000) |
LEA command ID for interleave even even command. | |
#define | LEACMD__INTERLEAVEEVENODD (0x0000f001) |
LEA command ID for interleave even odd command. | |
#define | LEACMD__INTERLEAVEODDEVEN (0x0000f002) |
LEA command ID for interleave odd even command. | |
#define | LEACMD__INTERLEAVEODDODD (0x0000f003) |
LEA command ID for interleave odd odd command. | |
Functions | |
void | msp_lea_init (void) |
DSPLib initialization routine for LEA. More... | |
static void | msp_lea_invokeCommand (uint16_t cmdId) |
Invoke a command with interrupts enabled and enter low-power mode or poll the interrupt flag. More... | |
static void * | msp_lea_allocMemory (uint16_t length) |
Allocate LEA-SC memory from stack. More... | |
static void | msp_lea_freeMemory (uint16_t length) |
Free LEA-SC memory from stack. More... | |
static bool | msp_lea_acquireLock (void) |
Acquire LEA-SC module if available. More... | |
static void | msp_lea_freeLock (void) |
Free LEA-SC module. More... | |
void | msp_lea_initCommandTable (void) |
Initialize the table used for loading commands. More... | |
uint16_t | msp_lea_getRevision (void) |
Return the revision of LEA code ROM. More... | |
uint16_t | msp_lea_loadCommand (uint16_t commandId, const void *command, uint16_t length) |
Load a LEA command into code memory. More... | |
Variables | |
const uint32_t | MSP_LEA_MIN [23] |
LEA patch for the LEA__MIN command. | |
const uint32_t | MSP_LEA_MINUNSIGNED [23] |
LEA patch for the LEA__MINUNSIGNED command. | |
const uint32_t | MSP_LEA_MINLONGMATRIX [20] |
LEA patch for the LEA__MINLONGMATRIX command. | |
const uint32_t | MSP_LEA_MINUNSIGNEDLONGMATRIX [20] |
LEA patch for the LEA__MINUNSIGNEDLONGMATRIX command. | |
const uint32_t | MSP_LEA_MAX [23] |
LEA patch for the LEA__MAX command. | |
const uint32_t | MSP_LEA_MAXUNSIGNED [23] |
LEA patch for the LEA__MAXUNSIGNED command. | |
const uint32_t | MSP_LEA_MAXLONGMATRIX [20] |
LEA patch for the LEA__MAXLONGMATRIX command. | |
const uint32_t | MSP_LEA_MAXUNSIGNEDLONGMATRIX [20] |
LEA patch for the LEA__MAXUNSIGNEDLONGMATRIX command. | |
const uint32_t | MSP_LEA_MACLONGMATRIX [18] |
LEA patch for the LEA__MACLONGMATRIX command. | |
const uint32_t | MSP_LEA_FFTCOMPLEXAUTOSCALING [58] |
LEA patch for the LEACMD__FFTCOMPLEXAUTOSCALING command. | |
const uint32_t | MSP_LEA_FFTCOMPLEXLONG [64] |
LEA patch for the LEA__FFTCOMPLEXLONG command. | |
const uint32_t | MSP_LEA_MPYLONGMATRIX [17] |
LEA patch for the LEA__MPYLONGMATRIX command. | |
const uint32_t | MSP_LEA_IIRBQ1 [31] |
LEA patch for the LEA__IIRBQ1 command. | |
const uint32_t | MSP_LEA_IIRBQ2 [32] |
LEA patch for the LEA__IIRBQ2 command. | |
const uint32_t | MSP_LEA_IIRBQ2EXTENDED [47] |
LEA patch for the LEA__IIRBQ2EXTENDED command. | |
const uint32_t | MSP_LEA_FIRLONG [30] |
LEA patch for the LEA__FIRLONG command. | |
const uint32_t | MSP_LEA_FIRCOMPLEXLONG [43] |
LEA patch for the LEA__FIRCOMPLEXLONG command. | |
const uint32_t | MSP_LEA_INTERLEAVEEVENEVEN [22] |
LEA function for the LEACMD__INTERLEAVEEVENEVEN command. | |
const uint32_t | MSP_LEA_INTERLEAVEEVENODD [24] |
LEA function for the LEACMD__INTERLEAVEEVENODD command. | |
const uint32_t | MSP_LEA_INTERLEAVEODDEVEN [22] |
LEA function for the LEACMD__INTERLEAVEODDEVEN command. | |
const uint32_t | MSP_LEA_INTERLEAVEODDODD [24] |
LEA function for the LEACMD__INTERLEAVEODDODD command. | |
volatile uint16_t | msp_lea_ifg |
DSPLib interrupt flags. | |
volatile uint16_t | msp_lea_locked |
DSPLib LEA-SC locked flag. | |
Definitions required to support the use of LEA.
#define MSP_LEA_RANGE | ( | x | ) |
Check that the address is aligned correctly.
#define MSP_USE_LEA 1 |
Enable the LEA accelerator for DSPLib functions. The default is to use LEA when available, to disable LEA define MSP_DISABLE_LEA in the compiler settings.
It is always recommended to use LEA for lowest power and best performance. Disabling LEA is only intended to be used for benchmarking LEA performance against the CPU and hardware multiplier or by users who would like to dedicate the LEA peripheral to a specific function and run the remainder on the CPU.
|
inlinestatic |
Acquire LEA-SC module if available.
|
inlinestatic |
Allocate LEA-SC memory from stack.
length | Length of memory to allocate in 32-bit words. |
|
inlinestatic |
Free LEA-SC module.
|
inlinestatic |
Free LEA-SC memory from stack.
length | Length of memory to allocate in 32-bit words. |
uint16_t msp_lea_getRevision | ( | void | ) |
Return the revision of LEA code ROM.
void msp_lea_init | ( | void | ) |
DSPLib initialization routine for LEA.
void msp_lea_initCommandTable | ( | void | ) |
Initialize the table used for loading commands.
|
inlinestatic |
Invoke a command with interrupts enabled and enter low-power mode or poll the interrupt flag.
uint16_t msp_lea_loadCommand | ( | uint16_t | commandId, |
const void * | command, | ||
uint16_t | length | ||
) |
Load a LEA command into code memory.