Logo
MSP DSP Library
DSPLib_lea.h
1 #ifndef __DSPLIB_LEA_H__
2 #define __DSPLIB_LEA_H__
3 
4 //******************************************************************************
5 //
13 //
14 //******************************************************************************
15 
16 //*****************************************************************************
17 //
18 // If building with a C++ compiler, make all of the definitions in this header
19 // have a C binding.
20 //
21 //*****************************************************************************
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26 
27 #if defined(__MSP430_HAS_LEA__) && !defined(MSP_DISABLE_LEA)
28 
29 #if __MSP430_HEADER_VERSION__ < 1192
30 #error "DSPLib: Device header file is out of date, please upgrade to the \
31 latest support package to use this version of DSPLib with LEA."
32 #endif
33 
34 //******************************************************************************
35 //
47 //
48 //******************************************************************************
49 #define MSP_USE_LEA 1
50 
51 // LEA revision A.
52 #define MSP_LEA_REVISION_A 0
53 
54 // LEA revision B.
55 #define MSP_LEA_REVISION_B 1
56 
57 // LEA revision B.
58 #define MSP_LEA_REVISION_C 2
59 
60 // Unknown revision of LEA.
61 #define MSP_LEA_REVISION_UNKNOWN 255
62 
63 #if !defined(MSP_LEA_REVISION)
64 
65 //******************************************************************************
66 //
70 //
71 //******************************************************************************
72 #define MSP_LEA_REVISION MSP_LEA_REVISION_B
73 
74 #endif //MSP_LEA_REVISION
75 
76 //******************************************************************************
77 //
81 //
82 //******************************************************************************
83 #define MSP_LEA_CONVERT_ADDRESS(x) ((uint16_t)(((uintptr_t)(x) >> 2) & 0xffff))
84 
85 //******************************************************************************
86 //
90 //
91 //******************************************************************************
92 #define MSP_LEA_REVERT_ADDRESS(x) ((uintptr_t)(((uint32_t)(x) << 2)))
93 
94 // Cast read-only registers to const to avoid compiler warnings.
95 #define MSP_LEA_BOTTOM (*((const uint16_t *)(&LEAMB)))
96 #define MSP_LEA_TOP (*((const uint16_t *)(&LEAMT)))
97 
98 //******************************************************************************
99 //
103 //
104 //******************************************************************************
105 #define MSP_LEA_RANGE(x) (((uintptr_t)(x) >= MSP_LEA_BOTTOM) \
106  && ((uintptr_t)(x) < MSP_LEA_TOP))
107 
108 //******************************************************************************
109 //
113 //
114 //******************************************************************************
115 #define MSP_LEA_ALIGNED(x,n) (!((uint32_t)(x) & ((n)-1)))
116 
117 //******************************************************************************
118 //
122 //
123 //******************************************************************************
124 #define MSP_LEA_VALID_ADDRESS(x,n) (MSP_LEA_RANGE(x) & MSP_LEA_ALIGNED(x,n))
125 
126 //******************************************************************************
127 //
131 //
132 //******************************************************************************
133 #define MSP_LEA_CONST_ZERO 0xA000
134 
135 //******************************************************************************
136 //
140 //
141 //******************************************************************************
142 #define MSP_LEA_CONST_ONE 0xAC00
143 
144 //******************************************************************************
145 //
149 //
150 //******************************************************************************
151 #define MSP_LEA_Q15_CONST_NEG_ONE 0xB000
152 
153  //******************************************************************************
154 //
158 //
159 //******************************************************************************
160 #define MSP_LEA_IQ31_CONST_NEG_ONE 0xE000
161 
162  //******************************************************************************
163 //
167 //
168 //******************************************************************************
169 #define LEACMD__INTERLEAVEEVENEVEN (0x0000f000)
170 
171  //******************************************************************************
172 //
176 //
177 //******************************************************************************
178 #define LEACMD__INTERLEAVEEVENODD (0x0000f001)
179 
180  //******************************************************************************
181 //
185 //
186 //******************************************************************************
187 #define LEACMD__INTERLEAVEODDEVEN (0x0000f002)
188 
189  //******************************************************************************
190 //
194 //
195 //******************************************************************************
196 #define LEACMD__INTERLEAVEODDODD (0x0000f003)
197 
198 //******************************************************************************
199 //
203 //
204 //******************************************************************************
205 typedef struct {
207  uint16_t vectorSize;
209  uint16_t input2;
211  uint16_t output;
213  uint16_t input1Offset;
215  uint16_t input2Offset;
217  uint16_t outputOffset;
219 
220 //******************************************************************************
221 //
225 //
226 //******************************************************************************
227 typedef struct {
229  uint16_t vectorSize;
231  uint16_t input2;
233  uint16_t output;
235  uint16_t input1Offset;
237  uint16_t input2Offset;
239  uint16_t outputOffset;
241 
242 //******************************************************************************
243 //
247 //
248 //******************************************************************************
249 typedef struct {
251  uint16_t vectorSize;
253  uint16_t input2;
255  uint16_t output;
257  uint16_t input1Offset;
259  uint16_t input2Offset;
261  uint16_t outputOffset;
263 
264 //******************************************************************************
265 //
269 //
270 //******************************************************************************
271 typedef struct {
273  uint16_t vectorSize;
275  uint16_t input2;
277  uint16_t output;
279  uint16_t input1Offset;
281  uint16_t input2Offset;
283  uint16_t outputOffset;
285 
286 //******************************************************************************
287 //
291 //
292 //******************************************************************************
293 typedef struct {
295  uint16_t vectorSize;
297  uint16_t input2;
299  uint16_t output;
301  uint16_t input1Offset;
303  uint16_t input2Offset;
305  uint16_t outputOffset;
307 
308 //******************************************************************************
309 //
313 //
314 //******************************************************************************
315 typedef struct {
317  uint16_t vectorSize;
319  uint16_t input2;
321  uint16_t output;
323  uint16_t input1Offset;
325  uint16_t input2Offset;
327  uint16_t outputOffset;
329 
330 //******************************************************************************
331 //
335 //
336 //******************************************************************************
337 typedef struct {
339  uint16_t vectorSize;
341  uint16_t input2;
343  uint16_t output;
345  uint16_t reserved;
347 
348 //******************************************************************************
349 //
353 //
354 //******************************************************************************
355 typedef struct {
357  uint16_t vectorSize;
359  uint16_t input2;
361  uint16_t output;
363  uint16_t input1Offset;
365  uint16_t input2Offset;
367  uint16_t reserved;
369 
370 //******************************************************************************
371 //
375 //
376 //******************************************************************************
377 typedef struct {
379  uint16_t vectorSize;
381  uint16_t output;
383  uint16_t coeff;
385  uint16_t order;
387  int32_t scaleFactor;
389 
390 //******************************************************************************
391 //
395 //
396 //******************************************************************************
397 typedef struct {
399  uint16_t vectorSize;
401  uint16_t output;
403 
404 //******************************************************************************
405 //
409 //
410 //******************************************************************************
411 typedef struct {
413  uint16_t vectorSize;
415  uint16_t output;
417  uint16_t inputOffset;
419  uint16_t reserved;
421 
422 //******************************************************************************
423 //
427 //
428 //******************************************************************************
429 typedef struct {
431  uint16_t vectorSize;
433  uint16_t output;
435 
436 //******************************************************************************
437 //
441 //
442 //******************************************************************************
443 typedef struct {
445  uint16_t vectorSize;
447  uint16_t output;
449  uint16_t inputOffset;
451  uint16_t reserved;
453 
454 //******************************************************************************
455 //
459 //
460 //******************************************************************************
461 typedef struct {
463  uint16_t vectorSize;
465  uint16_t output;
467 
468 //******************************************************************************
469 //
473 //
474 //******************************************************************************
475 typedef struct {
477  uint16_t vectorSize;
479  uint16_t output;
481  uint16_t inputOffset;
483  uint16_t reserved;
485 
486 //******************************************************************************
487 //
491 //
492 //******************************************************************************
493 typedef struct {
495  uint16_t vectorSize;
497  uint16_t output;
499  uint16_t inputOffset;
501  uint16_t reserved;
503 
504 //******************************************************************************
505 //
509 //
510 //******************************************************************************
511 typedef struct {
513  uint16_t vectorSize;
515  uint16_t output;
517  uint16_t inputOffset;
519  uint16_t reserved;
521 
522 //******************************************************************************
523 //
527 //
528 //******************************************************************************
529 typedef struct {
531  uint16_t vectorSize;
533  uint16_t input2;
535  uint16_t output;
537  uint16_t input1Offset;
539  uint16_t input2Offset;
541  uint16_t outputOffset;
543 
544 //******************************************************************************
545 //
549 //
550 //******************************************************************************
551 typedef struct {
553  uint16_t vectorSize;
555  uint16_t input2;
557  uint16_t output;
559  uint16_t input1Offset;
561  uint16_t input2Offset;
563  uint16_t reserved;
565 
566 //******************************************************************************
567 //
571 //
572 //******************************************************************************
573 typedef struct {
575  uint16_t rowSize;
577  uint16_t colSize;
579  uint16_t colVector;
581  uint16_t output;
583 
584 //******************************************************************************
585 //
589 //
590 //******************************************************************************
591 typedef struct {
593  uint16_t vectorSize;
595  uint16_t coeffs;
597  uint16_t output;
599  uint16_t tapLength;
601  uint16_t bufferMask;
603  uint16_t reserved;
605 
606 //******************************************************************************
607 //
611 //
612 //******************************************************************************
613 typedef struct {
615  uint16_t vectorSize;
617  uint16_t coeffs;
619  uint16_t output;
621  uint16_t tapLength;
623  uint16_t bufferMask;
625  uint16_t reserved;
627 
628 //******************************************************************************
629 //
633 //
634 //******************************************************************************
635 typedef struct {
637  uint16_t vectorSize;
639  uint16_t coeffs;
641  uint16_t output;
643  uint16_t tapLength;
645  uint16_t bufferMask;
647  uint16_t reserved;
649 
650 //******************************************************************************
651 //
655 //
656 //******************************************************************************
657 typedef struct {
659  uint16_t vectorSize;
661  uint16_t coeffs;
663  uint16_t output;
665  uint16_t tapLength;
667  uint16_t bufferMask;
669  uint16_t reserved;
671 
672 //******************************************************************************
673 //
677 //
678 //******************************************************************************
679 typedef struct {
681  uint16_t vectorSizeBy2;
683  uint16_t output;
685  uint16_t state;
687  uint16_t coeffs;
689  uint16_t direction;
691  uint16_t reserved;
693 
694 //******************************************************************************
695 //
700 //
701 //******************************************************************************
702 typedef struct {
704  uint16_t vectorSizeBy2;
706  uint16_t output;
708  uint16_t state;
710  uint16_t coeffs;
712 
713 //******************************************************************************
714 //
719 //
720 //******************************************************************************
721 typedef struct {
723  uint16_t sqrtVectorSize;
725  uint16_t reserved;
727 
728 //******************************************************************************
729 //
734 //
735 //******************************************************************************
736 typedef struct {
738  uint16_t sqrtVectorSize;
740  uint16_t reserved;
742 
743 //******************************************************************************
744 //
748 //
749 //******************************************************************************
750 typedef struct {
752  uint16_t vectorSizeBy2;
754  uint16_t log2Size;
756 
757 //******************************************************************************
758 //
762 //
763 //******************************************************************************
764 typedef struct {
766  uint16_t vectorSizeBy2;
768  uint16_t log2Size;
770 
771 //******************************************************************************
772 //
776 //
777 //******************************************************************************
778 typedef struct {
780  uint16_t vectorSize;
782  uint16_t log2Size;
784 
785 //******************************************************************************
786 //
790 //
791 //******************************************************************************
792 typedef struct {
794  uint16_t vectorSize;
796  uint16_t log2Size;
798 
799 //******************************************************************************
800 //
804 //
805 //******************************************************************************
806 typedef struct {
808  uint16_t vectorSize;
810  uint16_t log2Size;
812 
813 //******************************************************************************
814 //
820 //
821 //******************************************************************************
822 typedef struct {
824  uint16_t output;
826  uint16_t channel;
828  uint16_t numChannels;
830  uint16_t vectorSize;
832 
833 //******************************************************************************
834 //
840 //
841 //******************************************************************************
842 typedef struct {
844  uint16_t vectorSize;
846  uint16_t interleaveDepth;
848  uint16_t output;
850  uint16_t reserved;
852 
853 //******************************************************************************
854 //
858 //
859 //******************************************************************************
860 typedef struct {
862  uint16_t vectorSize;
864  uint16_t interleaveDepth;
866  uint16_t output;
868  uint16_t reserved;
870 
871 //******************************************************************************
872 //
876 //
877 //******************************************************************************
878 extern const uint32_t MSP_LEA_MIN[23];
879 
880 //******************************************************************************
881 //
885 //
886 //******************************************************************************
887 extern const uint32_t MSP_LEA_MINUNSIGNED[23];
888 
889 //******************************************************************************
890 //
894 //
895 //******************************************************************************
896 extern const uint32_t MSP_LEA_MINLONGMATRIX[20];
897 
898 //******************************************************************************
899 //
903 //
904 //******************************************************************************
905 extern const uint32_t MSP_LEA_MINUNSIGNEDLONGMATRIX[20];
906 
907 //******************************************************************************
908 //
912 //
913 //******************************************************************************
914 extern const uint32_t MSP_LEA_MAX[23];
915 
916 //******************************************************************************
917 //
921 //
922 //******************************************************************************
923 extern const uint32_t MSP_LEA_MAXUNSIGNED[23];
924 
925 //******************************************************************************
926 //
930 //
931 //******************************************************************************
932 extern const uint32_t MSP_LEA_MAXLONGMATRIX[20];
933 
934 //******************************************************************************
935 //
939 //
940 //******************************************************************************
941 extern const uint32_t MSP_LEA_MAXUNSIGNEDLONGMATRIX[20];
942 
943 //******************************************************************************
944 //
948 //
949 //******************************************************************************
950 extern const uint32_t MSP_LEA_MACLONGMATRIX[18];
951 
952 //******************************************************************************
953 //
957 //
958 //******************************************************************************
959 extern const uint32_t MSP_LEA_FFTCOMPLEXAUTOSCALING[58];
960 
961 //******************************************************************************
962 //
966 //
967 //******************************************************************************
968 extern const uint32_t MSP_LEA_FFTCOMPLEXLONG[64];
969 
970 //******************************************************************************
971 //
975 //
976 //******************************************************************************
977 extern const uint32_t MSP_LEA_MPYLONGMATRIX[17];
978 
979 //******************************************************************************
980 //
984 //
985 //******************************************************************************
986 extern const uint32_t MSP_LEA_IIRBQ1[31];
987 
988 //******************************************************************************
989 //
993 //
994 //******************************************************************************
995 extern const uint32_t MSP_LEA_IIRBQ2[32];
996 
997 //******************************************************************************
998 //
1002 //
1003 //******************************************************************************
1004 extern const uint32_t MSP_LEA_IIRBQ2EXTENDED[47];
1005 
1006 //******************************************************************************
1007 //
1011 //
1012 //******************************************************************************
1013 extern const uint32_t MSP_LEA_FIRLONG[30];
1014 
1015 //******************************************************************************
1016 //
1020 //
1021 //******************************************************************************
1022 extern const uint32_t MSP_LEA_FIRCOMPLEXLONG[43];
1023 
1024 //******************************************************************************
1025 //
1029 //
1030 //******************************************************************************
1031 extern const uint32_t MSP_LEA_INTERLEAVEEVENEVEN[22];
1032 
1033 //******************************************************************************
1034 //
1038 //
1039 //******************************************************************************
1040 extern const uint32_t MSP_LEA_INTERLEAVEEVENODD[24];
1041 
1042 //******************************************************************************
1043 //
1047 //
1048 //******************************************************************************
1049 extern const uint32_t MSP_LEA_INTERLEAVEODDEVEN[22];
1050 
1051 //******************************************************************************
1052 //
1056 //
1057 //******************************************************************************
1058 extern const uint32_t MSP_LEA_INTERLEAVEODDODD[24];
1059 
1060 //******************************************************************************
1061 //
1065 //
1066 //******************************************************************************
1067 extern volatile uint16_t msp_lea_ifg;
1068 
1069 //******************************************************************************
1070 //
1074 //
1075 //******************************************************************************
1076 extern volatile uint16_t msp_lea_locked;
1077 
1078 //******************************************************************************
1079 //
1085 //
1086 //******************************************************************************
1087 extern void msp_lea_init(void);
1088 
1089 //******************************************************************************
1090 //
1097 //
1098 //******************************************************************************
1099 static inline void msp_lea_invokeCommand(uint16_t cmdId)
1100 {
1101  /* Save interrupt state and disable interrupts. */
1102  uint16_t interruptState = __get_interrupt_state();
1103  __disable_interrupt();
1104 
1105  /* Clear interrupt flag and invoke the command. */
1106  msp_lea_ifg = 0;
1107  LEAPMCB = cmdId | LEAITFLG1;
1108 
1109 #if defined(MSP_DISABLE_LPM0)
1110 #warning "DSPLib: LPM0 is disabled, undefine MSP_DISABLE_LPM0 to enable LPM0."
1111  /* Do not enter LPM0, poll interrupt flags for command completion. */
1112  __bis_SR_register(GIE);
1113  while(!msp_lea_ifg);
1114 #elif ((MSP_LEA_REVISION==MSP_LEA_REVISION_A) && !defined(MSP_ENABLE_LPM0))
1115  /* Do not enter LPM0, poll interrupt flags for command completion. */
1116  __bis_SR_register(GIE);
1117  while(!msp_lea_ifg);
1118 #else
1119  /* Enter LPM0 and wait for command complete interrupt to wake the device. */
1120  __bis_SR_register(GIE+LPM0_bits);
1121 #endif
1122 
1123  /* Restore original interrupt state. */
1124  __set_interrupt_state(interruptState);
1125 }
1126 
1127 //******************************************************************************
1128 //
1136 //
1137 //******************************************************************************
1138 static inline void *msp_lea_allocMemory(uint16_t length)
1139 {
1140  LEACNF2 -= length;
1141  return (void *)MSP_LEA_REVERT_ADDRESS(LEACNF2);
1142 }
1143 
1144 //******************************************************************************
1145 //
1153 //
1154 //******************************************************************************
1155 static inline void msp_lea_freeMemory(uint16_t length)
1156 {
1157  LEACNF2 += length;
1158 }
1159 
1160 //******************************************************************************
1161 //
1167 //
1168 //******************************************************************************
1169 static inline bool msp_lea_acquireLock(void)
1170 {
1171 #ifndef MSP_DISABLE_DIAGNOSTICS
1172  bool status;
1173 
1174  /* Save interrupt state and disable interrupts. */
1175  uint16_t interruptState = __get_interrupt_state();
1176  __disable_interrupt();
1177 
1178  /* Check LEA-SC busy flag and DSPLib lock flags. */
1179  if ((LEACNF1 & LEABUSY) || msp_lea_locked) {
1180  status = false;
1181  }
1182  else {
1183  status = true;
1184  msp_lea_locked = true;
1185  }
1186 
1187  /* Restore interrupt state and return status. */
1188  __set_interrupt_state(interruptState);
1189  return status;
1190 #endif //MSP_DISABLE_DIAGNOSTICS
1191 }
1192 
1193 //******************************************************************************
1194 //
1200 //
1201 //******************************************************************************
1202 static inline void msp_lea_freeLock(void)
1203 {
1204 #ifndef MSP_DISABLE_DIAGNOSTICS
1205  msp_lea_locked = false;
1206 #endif //MSP_DISABLE_DIAGNOSTICS
1207 }
1208 
1209 //******************************************************************************
1210 //
1216 //
1217 //******************************************************************************
1218 extern void msp_lea_initCommandTable(void);
1219 
1220 //******************************************************************************
1221 //
1227 //
1228 //******************************************************************************
1229 extern uint16_t msp_lea_getRevision(void);
1230 
1231 //******************************************************************************
1232 //
1238 //
1239 //******************************************************************************
1240 extern uint16_t msp_lea_loadCommand(
1241  uint16_t commandId, const void *command, uint16_t length);
1242 
1243 #endif
1244 
1245 //*****************************************************************************
1246 //
1247 // Mark the end of the C bindings section for C++ compilers.
1248 //
1249 //*****************************************************************************
1250 #ifdef __cplusplus
1251 }
1252 #endif
1253 
1254 #endif // __DSPLIB_LEA_H__
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:862
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:257
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:445
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:277
Parameter structure for LEACMD__MAXUNSIGNEDMATRIX command.
Definition: DSPLib_lea.h:443
volatile uint16_t msp_lea_ifg
DSPLib interrupt flags.
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:501
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:844
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:619
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:669
const uint32_t MSP_LEA_MINLONGMATRIX[20]
LEA patch for the LEA__MINLONGMATRIX command.
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:259
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:343
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:537
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:273
const uint32_t MSP_LEA_FIRCOMPLEXLONG[43]
LEA patch for the LEA__FIRCOMPLEXLONG command.
#define MSP_LEA_REVERT_ADDRESS(x)
Convert LEA address to MSP430 address mapping.
Definition: DSPLib_lea.h:92
Parameter structure for LEACMD__FFTCOMPLEXAUTOSCALING command.
Definition: DSPLib_lea.h:750
Parameter structure for LEACMD__MIN command.
Definition: DSPLib_lea.h:461
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:413
const uint32_t MSP_LEA_INTERLEAVEODDEVEN[22]
LEA function for the LEACMD__INTERLEAVEODDEVEN command.
uint16_t direction
Input increment direction.
Definition: DSPLib_lea.h:689
Parameter structure for LEACMD__POLYNOMIAL command.
Definition: DSPLib_lea.h:377
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:541
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:211
Parameter structure for LEACMD__DEINTERLEAVELONG command.
Definition: DSPLib_lea.h:860
Parameter structure for LEACMD__FIR command.
Definition: DSPLib_lea.h:591
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:345
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:465
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:563
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:253
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:850
uint16_t inputOffset
Offset of input vector.
Definition: DSPLib_lea.h:417
const uint32_t MSP_LEA_FIRLONG[30]
LEA patch for the LEA__FIRLONG command.
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:447
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:321
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:357
uint16_t colSize
Input column size.
Definition: DSPLib_lea.h:577
Parameter structure for LEAMD__ADDLONGMATRIX command.
Definition: DSPLib_lea.h:227
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:830
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:531
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:519
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:553
Parameter structure for LEACMD__MAXUNSIGNED command.
Definition: DSPLib_lea.h:429
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:239
int32_t scaleFactor
Scale factor.
Definition: DSPLib_lea.h:387
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:255
uint16_t coeffs
FIR coefficient vector.
Definition: DSPLib_lea.h:661
uint16_t bufferMask
Input buffer increment mask.
Definition: DSPLib_lea.h:601
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:213
const uint32_t MSP_LEA_MACLONGMATRIX[18]
LEA patch for the LEA__MACLONGMATRIX command.
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:663
uint16_t numChannels
Number of destination channels.
Definition: DSPLib_lea.h:828
Parameter structure for LEACMD__FFT command.
Definition: DSPLib_lea.h:792
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:231
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:691
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:399
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:341
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:557
uint16_t log2Size
Log base 2 of 2*vectorSizeBy2 parameter.
Definition: DSPLib_lea.h:754
const uint32_t MSP_LEA_IIRBQ2EXTENDED[47]
LEA patch for the LEA__IIRBQ2EXTENDED command.
Parameter structure for LEACMD__FFTLONG command.
Definition: DSPLib_lea.h:806
Parameter structure for LEACMD__MAX command.
Definition: DSPLib_lea.h:397
uint16_t bufferMask
Input buffer increment mask.
Definition: DSPLib_lea.h:667
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:325
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:513
void msp_lea_init(void)
DSPLib initialization routine for LEA.
static void * msp_lea_allocMemory(uint16_t length)
Allocate LEA-SC memory from stack.
Definition: DSPLib_lea.h:1138
Parameter structure for LEACMD__MPYMATRIX command.
Definition: DSPLib_lea.h:293
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:217
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:215
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:647
uint16_t tapLength
Length of FIR coefficient vector.
Definition: DSPLib_lea.h:643
uint16_t coeffs
FIR coefficient vector.
Definition: DSPLib_lea.h:639
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:431
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:535
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:433
uint16_t bufferMask
Input buffer increment mask.
Definition: DSPLib_lea.h:623
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:495
uint16_t coeff
Polynomial coefficient vector.
Definition: DSPLib_lea.h:383
Parameter structure for LEACMD__BITREVERSECOMPLEXLONGEVEN or LEACMD__BITREVERSECOMPLEXLONGODD command...
Definition: DSPLib_lea.h:736
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:848
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:233
Parameter structure for LEACMD__MAC command.
Definition: DSPLib_lea.h:337
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:593
uint16_t tapLength
Length of FIR coefficient vector.
Definition: DSPLib_lea.h:621
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:603
uint16_t sqrtVectorSize
Square root of data vector length.
Definition: DSPLib_lea.h:723
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:581
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:229
Parameter structure for LEACMD__SUBLONGMATRIX command.
Definition: DSPLib_lea.h:271
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:283
const uint32_t MSP_LEA_INTERLEAVEODDODD[24]
LEA function for the LEACMD__INTERLEAVEODDODD command.
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:339
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:419
Parameter structure for LEACMD__ADDMATRIX command.
Definition: DSPLib_lea.h:205
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:515
uint16_t vectorSizeBy2
Length of data vector divided by two, must be a power of two.
Definition: DSPLib_lea.h:766
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:641
uint16_t vectorSizeBy2
Length of data vector divided by two, must be a power of two.
Definition: DSPLib_lea.h:752
Parameter structure for LEACMD__FIRCOMPLEX command.
Definition: DSPLib_lea.h:635
uint16_t colVector
Input column vector.
Definition: DSPLib_lea.h:579
uint16_t rowSize
Input row size.
Definition: DSPLib_lea.h:575
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:415
uint16_t vectorSize
Length of data vector, must be a power of two.
Definition: DSPLib_lea.h:780
const uint32_t MSP_LEA_MPYLONGMATRIX[17]
LEA patch for the LEA__MPYLONGMATRIX command.
Parameter structure for LEACMD__MAXLONGMATRIX command.
Definition: DSPLib_lea.h:411
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:381
uint16_t vectorSize
Length of data vector,must be a power of two.
Definition: DSPLib_lea.h:808
Parameter structure for LEACMD__SUBMATRIX command.
Definition: DSPLib_lea.h:249
const uint32_t MSP_LEA_IIRBQ1[31]
LEA patch for the LEA__IIRBQ1 command.
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:463
uint16_t interleaveDepth
Depth of interleave operation.
Definition: DSPLib_lea.h:864
uint16_t coeffs
Biquad coefficient structure.
Definition: DSPLib_lea.h:710
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:479
const uint32_t MSP_LEA_MIN[23]
LEA patch for the LEA__MIN command.
Parameter structure for LEACMD__FIRLONG command.
Definition: DSPLib_lea.h:613
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:359
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:327
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:597
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:295
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:497
static void msp_lea_freeMemory(uint16_t length)
Free LEA-SC memory from stack.
Definition: DSPLib_lea.h:1155
Parameter structure for LEACMD__MINLONGMATRIX command.
Definition: DSPLib_lea.h:475
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:824
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:379
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:555
const uint32_t MSP_LEA_FFTCOMPLEXLONG[64]
LEA patch for the LEA__FFTCOMPLEXLONG command.
uint16_t log2Size
Log base 2 of 2*vectorSizeBy2 parameter.
Definition: DSPLib_lea.h:768
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:659
uint16_t coeffs
FIR coefficient vector.
Definition: DSPLib_lea.h:617
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:305
const uint32_t MSP_LEA_INTERLEAVEEVENODD[24]
LEA function for the LEACMD__INTERLEAVEEVENODD command.
uint16_t inputOffset
Offset of input vector.
Definition: DSPLib_lea.h:517
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:275
Parameter structure for LEACMD__MINUNSIGNEDMATRIX command.
Definition: DSPLib_lea.h:493
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:625
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:367
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:209
uint16_t vectorSizeBy2
Length of data vector divided by two.
Definition: DSPLib_lea.h:704
Parameter structure for LEACMD__BITREVERSECOMPLEXEVEN or LEACMD__BITREVERSECOMPLEXODD commands...
Definition: DSPLib_lea.h:721
uint16_t outputOffset
Offset of output vector.
Definition: DSPLib_lea.h:261
volatile uint16_t msp_lea_locked
DSPLib LEA-SC locked flag.
Parameter structure for LEACMD__MINLONGUNSIGNED command.
Definition: DSPLib_lea.h:511
uint16_t inputOffset
Offset of input vector.
Definition: DSPLib_lea.h:481
Parameter structure for LEACMD__MACCOMPLEXMATRIX command.
Definition: DSPLib_lea.h:551
const uint32_t MSP_LEA_MINUNSIGNED[23]
LEA patch for the LEA__MINUNSIGNED command.
uint16_t sqrtVectorSize
Square root of data vector length.
Definition: DSPLib_lea.h:738
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:365
const uint32_t MSP_LEA_MAXUNSIGNEDLONGMATRIX[20]
LEA patch for the LEA__MAXUNSIGNEDLONGMATRIX command.
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:361
uint16_t inputOffset
Offset of input vector.
Definition: DSPLib_lea.h:499
Parameter structure for LEACMD__IIRBQ2 and LEACMD__IIRBQ2EXTENDED commands.
Definition: DSPLib_lea.h:702
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:725
Parameter structure for LEACMD__IIRBQ1 command.
Definition: DSPLib_lea.h:679
uint16_t coeffs
FIR coefficient vector.
Definition: DSPLib_lea.h:595
uint16_t vectorSize
Length of data vector, must be a power of two.
Definition: DSPLib_lea.h:794
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:401
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:559
const uint32_t MSP_LEA_MAXUNSIGNED[23]
LEA patch for the LEA__MAXUNSIGNED command.
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:706
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:683
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:251
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:303
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:319
uint16_t bufferMask
Input buffer increment mask.
Definition: DSPLib_lea.h:645
void msp_lea_initCommandTable(void)
Initialize the table used for loading commands.
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:477
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:297
static void msp_lea_freeLock(void)
Free LEA-SC module.
Definition: DSPLib_lea.h:1202
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:237
const uint32_t MSP_LEA_INTERLEAVEEVENEVEN[22]
LEA function for the LEACMD__INTERLEAVEEVENEVEN command.
uint16_t channel
Channel to insert vector into.
Definition: DSPLib_lea.h:826
Parameter structure for LEACMD__MPYLONGMATRIX command.
Definition: DSPLib_lea.h:315
uint16_t order
Polynomial coefficient order.
Definition: DSPLib_lea.h:385
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:561
uint16_t state
Biquad state structure.
Definition: DSPLib_lea.h:685
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:483
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:451
uint16_t vectorSizeBy2
Length of data vector divided by two.
Definition: DSPLib_lea.h:681
Parameter structure for LEACMD__FIRLONGCOMPLEX command.
Definition: DSPLib_lea.h:657
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:323
uint16_t input2
Input data vector 2.
Definition: DSPLib_lea.h:533
const uint32_t MSP_LEA_IIRBQ2[32]
LEA patch for the LEA__IIRBQ2 command.
static void msp_lea_invokeCommand(uint16_t cmdId)
Invoke a command with interrupts enabled and enter low-power mode or poll the interrupt flag...
Definition: DSPLib_lea.h:1099
static bool msp_lea_acquireLock(void)
Acquire LEA-SC module if available.
Definition: DSPLib_lea.h:1169
Parameter structure for LEACMD__MPYCOMPLEXMATRIX command.
Definition: DSPLib_lea.h:529
uint16_t state
Biquad state structure.
Definition: DSPLib_lea.h:708
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:235
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:868
uint16_t log2Size
Log base 2 of vectorSize parameter.
Definition: DSPLib_lea.h:810
uint16_t vectorSize
Length of data vector, must be a multiple of two.
Definition: DSPLib_lea.h:207
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:363
Parameter structure for LEACMD__MPYMATRIXROW command.
Definition: DSPLib_lea.h:573
uint16_t reserved
Reserved padding.
Definition: DSPLib_lea.h:740
const uint32_t MSP_LEA_MAXLONGMATRIX[20]
LEA patch for the LEA__MAXLONGMATRIX command.
uint16_t tapLength
Length of FIR coefficient vector.
Definition: DSPLib_lea.h:599
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:866
uint16_t msp_lea_getRevision(void)
Return the revision of LEA code ROM.
uint16_t log2Size
Log base 2 of vectorSize parameter.
Definition: DSPLib_lea.h:796
uint16_t interleaveDepth
Depth of interleave operation.
Definition: DSPLib_lea.h:846
uint16_t output
Output data vector.
Definition: DSPLib_lea.h:299
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:281
uint16_t msp_lea_loadCommand(uint16_t commandId, const void *command, uint16_t length)
Load a LEA command into code memory.
const uint32_t MSP_LEA_MINUNSIGNEDLONGMATRIX[20]
LEA patch for the LEA__MINUNSIGNEDLONGMATRIX command.
Parameter structure for LEACMD__DEINTERLEAVEEVENEVEN, LEACMD__DEINTERLEAVEEVENODD, LEACMD__DEINTERLEAVEODDEVEN and LEACMD__DEINTERLEAVEODDODD commands.
Definition: DSPLib_lea.h:842
uint16_t inputOffset
Offset of input vector.
Definition: DSPLib_lea.h:449
Parameter structure for LEACMD__FFTCOMPLEXFIXEDSCALING command.
Definition: DSPLib_lea.h:764
Parameter structure for LEACMD__INTERLEAVEEVENEVEN, LEACMD__INTERLEAVEEVENODD, LEACMD__INTERLEAVEODDE...
Definition: DSPLib_lea.h:822
uint16_t log2Size
Log base 2 of vectorSize parameter.
Definition: DSPLib_lea.h:782
Parameter structure for LEACMD__FFTCOMPLEXLONG command.
Definition: DSPLib_lea.h:778
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:317
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:301
const uint32_t MSP_LEA_FFTCOMPLEXAUTOSCALING[58]
LEA patch for the LEACMD__FFTCOMPLEXAUTOSCALING command.
const uint32_t MSP_LEA_MAX[23]
LEA patch for the LEA__MAX command.
uint16_t input2Offset
Offset of input vector 2.
Definition: DSPLib_lea.h:539
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:615
uint16_t vectorSize
Length of data vector.
Definition: DSPLib_lea.h:637
uint16_t coeffs
Biquad coefficient structure.
Definition: DSPLib_lea.h:687
Parameter structure for LEACMD__MACLONGMATRIX command.
Definition: DSPLib_lea.h:355
uint16_t input1Offset
Offset of input vector 1.
Definition: DSPLib_lea.h:279
uint16_t tapLength
Length of FIR coefficient vector.
Definition: DSPLib_lea.h:665