Robobo
arm_math.h
1 /* ----------------------------------------------------------------------
2  * Copyright (C) 2010 ARM Limited. All rights reserved.
3  *
4  * $Date: 15. July 2011
5  * $Revision: V1.0.10
6  *
7  * Project: CMSIS DSP Library
8  * Title: arm_math.h
9  *
10  * Description: Public header file for CMSIS DSP Library
11  *
12  * Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
13  *
14  * Version 1.0.10 2011/7/15
15  * Big Endian support added and Merged M0 and M3/M4 Source code.
16  *
17  * Version 1.0.3 2010/11/29
18  * Re-organized the CMSIS folders and updated documentation.
19  *
20  * Version 1.0.2 2010/11/11
21  * Documentation updated.
22  *
23  * Version 1.0.1 2010/10/05
24  * Production release and review comments incorporated.
25  *
26  * Version 1.0.0 2010/09/20
27  * Production release and review comments incorporated.
28  * -------------------------------------------------------------------- */
29 
251 #ifndef _ARM_MATH_H
252 #define _ARM_MATH_H
253 
254 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
255 
256 #if defined (ARM_MATH_CM4)
257  #include "core_cm4.h"
258 #elif defined (ARM_MATH_CM3)
259  #include "core_cm3.h"
260 #elif defined (ARM_MATH_CM0)
261  #include "core_cm0.h"
262 #else
263 #include "ARMCM4.h"
264 #warning "Define either ARM_MATH_CM4 OR ARM_MATH_CM3...By Default building on ARM_MATH_CM4....."
265 #endif
266 
267 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
268 #include "string.h"
269  #include "math.h"
270 #ifdef __cplusplus
271 extern "C"
272 {
273 #endif
274 
275 
280 #define DELTA_Q31 (0x100)
281 #define DELTA_Q15 0x5
282 #define INDEX_MASK 0x0000003F
283 #define PI 3.14159265358979f
284 
289 #define TABLE_SIZE 256
290 #define TABLE_SPACING_Q31 0x800000
291 #define TABLE_SPACING_Q15 0x80
292 
296  /* 1.31(q31) Fixed value of 2/360 */
297  /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
298 #define INPUT_SPACING 0xB60B61
299 
300 
305  typedef enum
306  {
307  ARM_MATH_SUCCESS = 0,
308  ARM_MATH_ARGUMENT_ERROR = -1,
309  ARM_MATH_LENGTH_ERROR = -2,
310  ARM_MATH_SIZE_MISMATCH = -3,
311  ARM_MATH_NANINF = -4,
312  ARM_MATH_SINGULAR = -5,
313  ARM_MATH_TEST_FAILURE = -6
314  } arm_status;
315 
319  typedef int8_t q7_t;
320 
324  typedef int16_t q15_t;
325 
329  typedef int32_t q31_t;
330 
334  typedef int64_t q63_t;
335 
339  typedef float float32_t;
340 
344  typedef double float64_t;
345 
349 #define __SIMD32(addr) (*(int32_t **) & (addr))
350 
351 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0)
352 
355 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
356  (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
357 
358 #endif
359 
360 
364 #ifndef ARM_MATH_BIG_ENDIAN
365 
366 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
367  (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
368  (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
369  (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
370 #else
371 
372 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
373  (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
374  (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
375  (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
376 
377 #endif
378 
379 
383  static __INLINE q31_t clip_q63_to_q31(
384  q63_t x)
385  {
386  return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
387  ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
388  }
389 
393  static __INLINE q15_t clip_q63_to_q15(
394  q63_t x)
395  {
396  return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
397  ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
398  }
399 
403  static __INLINE q7_t clip_q31_to_q7(
404  q31_t x)
405  {
406  return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
407  ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
408  }
409 
413  static __INLINE q15_t clip_q31_to_q15(
414  q31_t x)
415  {
416  return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
417  ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
418  }
419 
424  static __INLINE q63_t mult32x64(
425  q63_t x,
426  q31_t y)
427  {
428  return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
429  (((q63_t) (x >> 32) * y)));
430  }
431 
432 
433 #if defined (ARM_MATH_CM0) && defined ( __CC_ARM )
434 #define __CLZ __clz
435 #endif
436 
437 #if defined (ARM_MATH_CM0) && ((defined (__ICCARM__)) ||(defined (__GNUC__)) || defined (__TASKING__) )
438 
439  static __INLINE uint32_t __CLZ(q31_t data);
440 
441 
442  static __INLINE uint32_t __CLZ(q31_t data)
443  {
444  uint32_t count = 0;
445  uint32_t mask = 0x80000000;
446 
447  while((data & mask) == 0)
448  {
449  count += 1u;
450  mask = mask >> 1u;
451  }
452 
453  return(count);
454 
455  }
456 
457 #endif
458 
463  static __INLINE uint32_t arm_recip_q31(
464  q31_t in,
465  q31_t * dst,
466  q31_t * pRecipTable)
467  {
468 
469  uint32_t out, tempVal;
470  uint32_t index, i;
471  uint32_t signBits;
472 
473  if(in > 0)
474  {
475  signBits = __CLZ(in) - 1;
476  }
477  else
478  {
479  signBits = __CLZ(-in) - 1;
480  }
481 
482  /* Convert input sample to 1.31 format */
483  in = in << signBits;
484 
485  /* calculation of index for initial approximated Val */
486  index = (uint32_t) (in >> 24u);
487  index = (index & INDEX_MASK);
488 
489  /* 1.31 with exp 1 */
490  out = pRecipTable[index];
491 
492  /* calculation of reciprocal value */
493  /* running approximation for two iterations */
494  for (i = 0u; i < 2u; i++)
495  {
496  tempVal = (q31_t) (((q63_t) in * out) >> 31u);
497  tempVal = 0x7FFFFFFF - tempVal;
498  /* 1.31 with exp 1 */
499  //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
500  out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
501  }
502 
503  /* write output */
504  *dst = out;
505 
506  /* return num of signbits of out = 1/in value */
507  return (signBits + 1u);
508 
509  }
510 
514  static __INLINE uint32_t arm_recip_q15(
515  q15_t in,
516  q15_t * dst,
517  q15_t * pRecipTable)
518  {
519 
520  uint32_t out = 0, tempVal = 0;
521  uint32_t index = 0, i = 0;
522  uint32_t signBits = 0;
523 
524  if(in > 0)
525  {
526  signBits = __CLZ(in) - 17;
527  }
528  else
529  {
530  signBits = __CLZ(-in) - 17;
531  }
532 
533  /* Convert input sample to 1.15 format */
534  in = in << signBits;
535 
536  /* calculation of index for initial approximated Val */
537  index = in >> 8;
538  index = (index & INDEX_MASK);
539 
540  /* 1.15 with exp 1 */
541  out = pRecipTable[index];
542 
543  /* calculation of reciprocal value */
544  /* running approximation for two iterations */
545  for (i = 0; i < 2; i++)
546  {
547  tempVal = (q15_t) (((q31_t) in * out) >> 15);
548  tempVal = 0x7FFF - tempVal;
549  /* 1.15 with exp 1 */
550  out = (q15_t) (((q31_t) out * tempVal) >> 14);
551  }
552 
553  /* write output */
554  *dst = out;
555 
556  /* return num of signbits of out = 1/in value */
557  return (signBits + 1);
558 
559  }
560 
561 
562  /*
563  * @brief C custom defined intrinisic function for only M0 processors
564  */
565 #if defined(ARM_MATH_CM0)
566 
567  static __INLINE q31_t __SSAT(
568  q31_t x,
569  uint32_t y)
570  {
571  int32_t posMax, negMin;
572  uint32_t i;
573 
574  posMax = 1;
575  for (i = 0; i < (y - 1); i++)
576  {
577  posMax = posMax * 2;
578  }
579 
580  if(x > 0)
581  {
582  posMax = (posMax - 1);
583 
584  if(x > posMax)
585  {
586  x = posMax;
587  }
588  }
589  else
590  {
591  negMin = -posMax;
592 
593  if(x < negMin)
594  {
595  x = negMin;
596  }
597  }
598  return (x);
599 
600 
601  }
602 
603 #endif /* end of ARM_MATH_CM0 */
604 
605 
606 
607  /*
608  * @brief C custom defined intrinsic function for M3 and M0 processors
609  */
610 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0)
611 
612  /*
613  * @brief C custom defined QADD8 for M3 and M0 processors
614  */
615  static __INLINE q31_t __QADD8(
616  q31_t x,
617  q31_t y)
618  {
619 
620  q31_t sum;
621  q7_t r, s, t, u;
622 
623  r = (char) x;
624  s = (char) y;
625 
626  r = __SSAT((q31_t) (r + s), 8);
627  s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
628  t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
629  u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
630 
631  sum = (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
632  (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
633 
634  return sum;
635 
636  }
637 
638  /*
639  * @brief C custom defined QSUB8 for M3 and M0 processors
640  */
641  static __INLINE q31_t __QSUB8(
642  q31_t x,
643  q31_t y)
644  {
645 
646  q31_t sum;
647  q31_t r, s, t, u;
648 
649  r = (char) x;
650  s = (char) y;
651 
652  r = __SSAT((r - s), 8);
653  s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
654  t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
655  u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
656 
657  sum =
658  (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r & 0x000000FF);
659 
660  return sum;
661  }
662 
663  /*
664  * @brief C custom defined QADD16 for M3 and M0 processors
665  */
666 
667  /*
668  * @brief C custom defined QADD16 for M3 and M0 processors
669  */
670  static __INLINE q31_t __QADD16(
671  q31_t x,
672  q31_t y)
673  {
674 
675  q31_t sum;
676  q31_t r, s;
677 
678  r = (short) x;
679  s = (short) y;
680 
681  r = __SSAT(r + s, 16);
682  s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
683 
684  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
685 
686  return sum;
687 
688  }
689 
690  /*
691  * @brief C custom defined SHADD16 for M3 and M0 processors
692  */
693  static __INLINE q31_t __SHADD16(
694  q31_t x,
695  q31_t y)
696  {
697 
698  q31_t sum;
699  q31_t r, s;
700 
701  r = (short) x;
702  s = (short) y;
703 
704  r = ((r >> 1) + (s >> 1));
705  s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
706 
707  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
708 
709  return sum;
710 
711  }
712 
713  /*
714  * @brief C custom defined QSUB16 for M3 and M0 processors
715  */
716  static __INLINE q31_t __QSUB16(
717  q31_t x,
718  q31_t y)
719  {
720 
721  q31_t sum;
722  q31_t r, s;
723 
724  r = (short) x;
725  s = (short) y;
726 
727  r = __SSAT(r - s, 16);
728  s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
729 
730  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
731 
732  return sum;
733  }
734 
735  /*
736  * @brief C custom defined SHSUB16 for M3 and M0 processors
737  */
738  static __INLINE q31_t __SHSUB16(
739  q31_t x,
740  q31_t y)
741  {
742 
743  q31_t diff;
744  q31_t r, s;
745 
746  r = (short) x;
747  s = (short) y;
748 
749  r = ((r >> 1) - (s >> 1));
750  s = (((x >> 17) - (y >> 17)) << 16);
751 
752  diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
753 
754  return diff;
755  }
756 
757  /*
758  * @brief C custom defined QASX for M3 and M0 processors
759  */
760  static __INLINE q31_t __QASX(
761  q31_t x,
762  q31_t y)
763  {
764 
765  q31_t sum = 0;
766 
767  sum = ((sum + clip_q31_to_q15((q31_t) ((short) (x >> 16) + (short) y))) << 16) +
768  clip_q31_to_q15((q31_t) ((short) x - (short) (y >> 16)));
769 
770  return sum;
771  }
772 
773  /*
774  * @brief C custom defined SHASX for M3 and M0 processors
775  */
776  static __INLINE q31_t __SHASX(
777  q31_t x,
778  q31_t y)
779  {
780 
781  q31_t sum;
782  q31_t r, s;
783 
784  r = (short) x;
785  s = (short) y;
786 
787  r = ((r >> 1) - (y >> 17));
788  s = (((x >> 17) + (s >> 1)) << 16);
789 
790  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
791 
792  return sum;
793  }
794 
795 
796  /*
797  * @brief C custom defined QSAX for M3 and M0 processors
798  */
799  static __INLINE q31_t __QSAX(
800  q31_t x,
801  q31_t y)
802  {
803 
804  q31_t sum = 0;
805 
806  sum = ((sum + clip_q31_to_q15((q31_t) ((short) (x >> 16) - (short) y))) << 16) +
807  clip_q31_to_q15((q31_t) ((short) x + (short) (y >> 16)));
808 
809  return sum;
810  }
811 
812  /*
813  * @brief C custom defined SHSAX for M3 and M0 processors
814  */
815  static __INLINE q31_t __SHSAX(
816  q31_t x,
817  q31_t y)
818  {
819 
820  q31_t sum;
821  q31_t r, s;
822 
823  r = (short) x;
824  s = (short) y;
825 
826  r = ((r >> 1) + (y >> 17));
827  s = (((x >> 17) - (s >> 1)) << 16);
828 
829  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
830 
831  return sum;
832  }
833 
834  /*
835  * @brief C custom defined SMUSDX for M3 and M0 processors
836  */
837  static __INLINE q31_t __SMUSDX(
838  q31_t x,
839  q31_t y)
840  {
841 
842  return ((q31_t)(((short) x * (short) (y >> 16)) -
843  ((short) (x >> 16) * (short) y)));
844  }
845 
846  /*
847  * @brief C custom defined SMUADX for M3 and M0 processors
848  */
849  static __INLINE q31_t __SMUADX(
850  q31_t x,
851  q31_t y)
852  {
853 
854  return ((q31_t)(((short) x * (short) (y >> 16)) +
855  ((short) (x >> 16) * (short) y)));
856  }
857 
858  /*
859  * @brief C custom defined QADD for M3 and M0 processors
860  */
861  static __INLINE q31_t __QADD(
862  q31_t x,
863  q31_t y)
864  {
865  return clip_q63_to_q31((q63_t) x + y);
866  }
867 
868  /*
869  * @brief C custom defined QSUB for M3 and M0 processors
870  */
871  static __INLINE q31_t __QSUB(
872  q31_t x,
873  q31_t y)
874  {
875  return clip_q63_to_q31((q63_t) x - y);
876  }
877 
878  /*
879  * @brief C custom defined SMLAD for M3 and M0 processors
880  */
881  static __INLINE q31_t __SMLAD(
882  q31_t x,
883  q31_t y,
884  q31_t sum)
885  {
886 
887  return (sum + ((short) (x >> 16) * (short) (y >> 16)) +
888  ((short) x * (short) y));
889  }
890 
891  /*
892  * @brief C custom defined SMLADX for M3 and M0 processors
893  */
894  static __INLINE q31_t __SMLADX(
895  q31_t x,
896  q31_t y,
897  q31_t sum)
898  {
899 
900  return (sum + ((short) (x >> 16) * (short) (y)) +
901  ((short) x * (short) (y >> 16)));
902  }
903 
904  /*
905  * @brief C custom defined SMLSDX for M3 and M0 processors
906  */
907  static __INLINE q31_t __SMLSDX(
908  q31_t x,
909  q31_t y,
910  q31_t sum)
911  {
912 
913  return (sum - ((short) (x >> 16) * (short) (y)) +
914  ((short) x * (short) (y >> 16)));
915  }
916 
917  /*
918  * @brief C custom defined SMLALD for M3 and M0 processors
919  */
920  static __INLINE q63_t __SMLALD(
921  q31_t x,
922  q31_t y,
923  q63_t sum)
924  {
925 
926  return (sum + ((short) (x >> 16) * (short) (y >> 16)) +
927  ((short) x * (short) y));
928  }
929 
930  /*
931  * @brief C custom defined SMLALDX for M3 and M0 processors
932  */
933  static __INLINE q63_t __SMLALDX(
934  q31_t x,
935  q31_t y,
936  q63_t sum)
937  {
938 
939  return (sum + ((short) (x >> 16) * (short) y)) +
940  ((short) x * (short) (y >> 16));
941  }
942 
943  /*
944  * @brief C custom defined SMUAD for M3 and M0 processors
945  */
946  static __INLINE q31_t __SMUAD(
947  q31_t x,
948  q31_t y)
949  {
950 
951  return (((x >> 16) * (y >> 16)) +
952  (((x << 16) >> 16) * ((y << 16) >> 16)));
953  }
954 
955  /*
956  * @brief C custom defined SMUSD for M3 and M0 processors
957  */
958  static __INLINE q31_t __SMUSD(
959  q31_t x,
960  q31_t y)
961  {
962 
963  return (-((x >> 16) * (y >> 16)) +
964  (((x << 16) >> 16) * ((y << 16) >> 16)));
965  }
966 
967 
968 
969 
970 #endif /* (ARM_MATH_CM3) || defined (ARM_MATH_CM0) */
971 
972 
976  typedef struct
977  {
978  uint16_t numTaps;
979  q7_t *pState;
980  q7_t *pCoeffs;
982 
986  typedef struct
987  {
988  uint16_t numTaps;
989  q15_t *pState;
990  q15_t *pCoeffs;
992 
996  typedef struct
997  {
998  uint16_t numTaps;
999  q31_t *pState;
1000  q31_t *pCoeffs;
1002 
1006  typedef struct
1007  {
1008  uint16_t numTaps;
1009  float32_t *pState;
1010  float32_t *pCoeffs;
1012 
1013 
1022  void arm_fir_q7(
1023  const arm_fir_instance_q7 * S,
1024  q7_t * pSrc,
1025  q7_t * pDst,
1026  uint32_t blockSize);
1027 
1028 
1038  void arm_fir_init_q7(
1039  arm_fir_instance_q7 * S,
1040  uint16_t numTaps,
1041  q7_t * pCoeffs,
1042  q7_t * pState,
1043  uint32_t blockSize);
1044 
1045 
1054  void arm_fir_q15(
1055  const arm_fir_instance_q15 * S,
1056  q15_t * pSrc,
1057  q15_t * pDst,
1058  uint32_t blockSize);
1059 
1068  void arm_fir_fast_q15(
1069  const arm_fir_instance_q15 * S,
1070  q15_t * pSrc,
1071  q15_t * pDst,
1072  uint32_t blockSize);
1073 
1085  arm_status arm_fir_init_q15(
1087  uint16_t numTaps,
1088  q15_t * pCoeffs,
1089  q15_t * pState,
1090  uint32_t blockSize);
1091 
1100  void arm_fir_q31(
1101  const arm_fir_instance_q31 * S,
1102  q31_t * pSrc,
1103  q31_t * pDst,
1104  uint32_t blockSize);
1105 
1114  void arm_fir_fast_q31(
1115  const arm_fir_instance_q31 * S,
1116  q31_t * pSrc,
1117  q31_t * pDst,
1118  uint32_t blockSize);
1119 
1129  void arm_fir_init_q31(
1131  uint16_t numTaps,
1132  q31_t * pCoeffs,
1133  q31_t * pState,
1134  uint32_t blockSize);
1135 
1144  void arm_fir_f32(
1145  const arm_fir_instance_f32 * S,
1146  float32_t * pSrc,
1147  float32_t * pDst,
1148  uint32_t blockSize);
1149 
1159  void arm_fir_init_f32(
1161  uint16_t numTaps,
1162  float32_t * pCoeffs,
1163  float32_t * pState,
1164  uint32_t blockSize);
1165 
1166 
1170  typedef struct
1171  {
1172  int8_t numStages;
1173  q15_t *pState;
1174  q15_t *pCoeffs;
1175  int8_t postShift;
1178 
1179 
1183  typedef struct
1184  {
1185  uint32_t numStages;
1186  q31_t *pState;
1187  q31_t *pCoeffs;
1188  uint8_t postShift;
1191 
1195  typedef struct
1196  {
1197  uint32_t numStages;
1198  float32_t *pState;
1199  float32_t *pCoeffs;
1203 
1204 
1205 
1216  const arm_biquad_casd_df1_inst_q15 * S,
1217  q15_t * pSrc,
1218  q15_t * pDst,
1219  uint32_t blockSize);
1220 
1233  uint8_t numStages,
1234  q15_t * pCoeffs,
1235  q15_t * pState,
1236  int8_t postShift);
1237 
1238 
1249  const arm_biquad_casd_df1_inst_q15 * S,
1250  q15_t * pSrc,
1251  q15_t * pDst,
1252  uint32_t blockSize);
1253 
1254 
1265  const arm_biquad_casd_df1_inst_q31 * S,
1266  q31_t * pSrc,
1267  q31_t * pDst,
1268  uint32_t blockSize);
1269 
1280  const arm_biquad_casd_df1_inst_q31 * S,
1281  q31_t * pSrc,
1282  q31_t * pDst,
1283  uint32_t blockSize);
1284 
1297  uint8_t numStages,
1298  q31_t * pCoeffs,
1299  q31_t * pState,
1300  int8_t postShift);
1301 
1312  const arm_biquad_casd_df1_inst_f32 * S,
1313  float32_t * pSrc,
1314  float32_t * pDst,
1315  uint32_t blockSize);
1316 
1328  uint8_t numStages,
1329  float32_t * pCoeffs,
1330  float32_t * pState);
1331 
1332 
1337  typedef struct
1338  {
1339  uint16_t numRows;
1340  uint16_t numCols;
1341  float32_t *pData;
1343 
1348  typedef struct
1349  {
1350  uint16_t numRows;
1351  uint16_t numCols;
1352  q15_t *pData;
1355 
1360  typedef struct
1361  {
1362  uint16_t numRows;
1363  uint16_t numCols;
1364  q31_t *pData;
1367 
1368 
1369 
1379  arm_status arm_mat_add_f32(
1380  const arm_matrix_instance_f32 * pSrcA,
1381  const arm_matrix_instance_f32 * pSrcB,
1382  arm_matrix_instance_f32 * pDst);
1383 
1393  arm_status arm_mat_add_q15(
1394  const arm_matrix_instance_q15 * pSrcA,
1395  const arm_matrix_instance_q15 * pSrcB,
1396  arm_matrix_instance_q15 * pDst);
1397 
1407  arm_status arm_mat_add_q31(
1408  const arm_matrix_instance_q31 * pSrcA,
1409  const arm_matrix_instance_q31 * pSrcB,
1410  arm_matrix_instance_q31 * pDst);
1411 
1412 
1421  arm_status arm_mat_trans_f32(
1422  const arm_matrix_instance_f32 * pSrc,
1423  arm_matrix_instance_f32 * pDst);
1424 
1425 
1434  arm_status arm_mat_trans_q15(
1435  const arm_matrix_instance_q15 * pSrc,
1436  arm_matrix_instance_q15 * pDst);
1437 
1446  arm_status arm_mat_trans_q31(
1447  const arm_matrix_instance_q31 * pSrc,
1448  arm_matrix_instance_q31 * pDst);
1449 
1450 
1460  arm_status arm_mat_mult_f32(
1461  const arm_matrix_instance_f32 * pSrcA,
1462  const arm_matrix_instance_f32 * pSrcB,
1463  arm_matrix_instance_f32 * pDst);
1464 
1474  arm_status arm_mat_mult_q15(
1475  const arm_matrix_instance_q15 * pSrcA,
1476  const arm_matrix_instance_q15 * pSrcB,
1477  arm_matrix_instance_q15 * pDst,
1478  q15_t * pState);
1479 
1490  arm_status arm_mat_mult_fast_q15(
1491  const arm_matrix_instance_q15 * pSrcA,
1492  const arm_matrix_instance_q15 * pSrcB,
1493  arm_matrix_instance_q15 * pDst,
1494  q15_t * pState);
1495 
1505  arm_status arm_mat_mult_q31(
1506  const arm_matrix_instance_q31 * pSrcA,
1507  const arm_matrix_instance_q31 * pSrcB,
1508  arm_matrix_instance_q31 * pDst);
1509 
1519  arm_status arm_mat_mult_fast_q31(
1520  const arm_matrix_instance_q31 * pSrcA,
1521  const arm_matrix_instance_q31 * pSrcB,
1522  arm_matrix_instance_q31 * pDst);
1523 
1524 
1534  arm_status arm_mat_sub_f32(
1535  const arm_matrix_instance_f32 * pSrcA,
1536  const arm_matrix_instance_f32 * pSrcB,
1537  arm_matrix_instance_f32 * pDst);
1538 
1548  arm_status arm_mat_sub_q15(
1549  const arm_matrix_instance_q15 * pSrcA,
1550  const arm_matrix_instance_q15 * pSrcB,
1551  arm_matrix_instance_q15 * pDst);
1552 
1562  arm_status arm_mat_sub_q31(
1563  const arm_matrix_instance_q31 * pSrcA,
1564  const arm_matrix_instance_q31 * pSrcB,
1565  arm_matrix_instance_q31 * pDst);
1566 
1576  arm_status arm_mat_scale_f32(
1577  const arm_matrix_instance_f32 * pSrc,
1578  float32_t scale,
1579  arm_matrix_instance_f32 * pDst);
1580 
1591  arm_status arm_mat_scale_q15(
1592  const arm_matrix_instance_q15 * pSrc,
1593  q15_t scaleFract,
1594  int32_t shift,
1595  arm_matrix_instance_q15 * pDst);
1596 
1607  arm_status arm_mat_scale_q31(
1608  const arm_matrix_instance_q31 * pSrc,
1609  q31_t scaleFract,
1610  int32_t shift,
1611  arm_matrix_instance_q31 * pDst);
1612 
1613 
1623  void arm_mat_init_q31(
1625  uint16_t nRows,
1626  uint16_t nColumns,
1627  q31_t *pData);
1628 
1638  void arm_mat_init_q15(
1640  uint16_t nRows,
1641  uint16_t nColumns,
1642  q15_t *pData);
1643 
1653  void arm_mat_init_f32(
1655  uint16_t nRows,
1656  uint16_t nColumns,
1657  float32_t *pData);
1658 
1659 
1660 
1664  typedef struct
1665  {
1666  q15_t A0;
1667  #ifdef ARM_MATH_CM0
1668  q15_t A1;
1669  q15_t A2;
1670  #else
1671  q31_t A1;
1672  #endif
1673  q15_t state[3];
1674  q15_t Kp;
1675  q15_t Ki;
1676  q15_t Kd;
1678 
1682  typedef struct
1683  {
1684  q31_t A0;
1685  q31_t A1;
1686  q31_t A2;
1687  q31_t state[3];
1688  q31_t Kp;
1689  q31_t Ki;
1690  q31_t Kd;
1693 
1697  typedef struct
1698  {
1699  float32_t A0;
1700  float32_t A1;
1701  float32_t A2;
1702  float32_t state[3];
1703  float32_t Kp;
1704  float32_t Ki;
1705  float32_t Kd;
1707 
1708 
1709 
1716  void arm_pid_init_f32(
1718  int32_t resetStateFlag);
1719 
1725  void arm_pid_reset_f32(
1726  arm_pid_instance_f32 * S);
1727 
1728 
1735  void arm_pid_init_q31(
1737  int32_t resetStateFlag);
1738 
1739 
1746  void arm_pid_reset_q31(
1747  arm_pid_instance_q31 * S);
1748 
1755  void arm_pid_init_q15(
1757  int32_t resetStateFlag);
1758 
1764  void arm_pid_reset_q15(
1765  arm_pid_instance_q15 * S);
1766 
1767 
1771  typedef struct
1772  {
1773  uint32_t nValues;
1774  float32_t x1;
1775  float32_t xSpacing;
1776  float32_t *pYData;
1778 
1783  typedef struct
1784  {
1785  uint16_t numRows;
1786  uint16_t numCols;
1787  float32_t *pData;
1789 
1794  typedef struct
1795  {
1796  uint16_t numRows;
1797  uint16_t numCols;
1798  q31_t *pData;
1800 
1805  typedef struct
1806  {
1807  uint16_t numRows;
1808  uint16_t numCols;
1809  q15_t *pData;
1811 
1816  typedef struct
1817  {
1818  uint16_t numRows;
1819  uint16_t numCols;
1820  q7_t *pData;
1822 
1823 
1833  void arm_mult_q7(
1834  q7_t * pSrcA,
1835  q7_t * pSrcB,
1836  q7_t * pDst,
1837  uint32_t blockSize);
1838 
1848  void arm_mult_q15(
1849  q15_t * pSrcA,
1850  q15_t * pSrcB,
1851  q15_t * pDst,
1852  uint32_t blockSize);
1853 
1863  void arm_mult_q31(
1864  q31_t * pSrcA,
1865  q31_t * pSrcB,
1866  q31_t * pDst,
1867  uint32_t blockSize);
1868 
1878  void arm_mult_f32(
1879  float32_t * pSrcA,
1880  float32_t * pSrcB,
1881  float32_t * pDst,
1882  uint32_t blockSize);
1883 
1884 
1889  typedef struct
1890  {
1891  uint16_t fftLen;
1892  uint8_t ifftFlag;
1893  uint8_t bitReverseFlag;
1894  q15_t *pTwiddle;
1895  uint16_t *pBitRevTable;
1896  uint16_t twidCoefModifier;
1897  uint16_t bitRevFactor;
1899 
1904  typedef struct
1905  {
1906  uint16_t fftLen;
1907  uint8_t ifftFlag;
1908  uint8_t bitReverseFlag;
1909  q31_t *pTwiddle;
1910  uint16_t *pBitRevTable;
1911  uint16_t twidCoefModifier;
1912  uint16_t bitRevFactor;
1914 
1919  typedef struct
1920  {
1921  uint16_t fftLen;
1922  uint8_t ifftFlag;
1923  uint8_t bitReverseFlag;
1924  float32_t *pTwiddle;
1925  uint16_t *pBitRevTable;
1926  uint16_t twidCoefModifier;
1927  uint16_t bitRevFactor;
1928  float32_t onebyfftLen;
1930 
1938  void arm_cfft_radix4_q15(
1939  const arm_cfft_radix4_instance_q15 * S,
1940  q15_t * pSrc);
1941 
1951  arm_status arm_cfft_radix4_init_q15(
1953  uint16_t fftLen,
1954  uint8_t ifftFlag,
1955  uint8_t bitReverseFlag);
1956 
1964  void arm_cfft_radix4_q31(
1965  const arm_cfft_radix4_instance_q31 * S,
1966  q31_t * pSrc);
1967 
1977  arm_status arm_cfft_radix4_init_q31(
1979  uint16_t fftLen,
1980  uint8_t ifftFlag,
1981  uint8_t bitReverseFlag);
1982 
1990  void arm_cfft_radix4_f32(
1991  const arm_cfft_radix4_instance_f32 * S,
1992  float32_t * pSrc);
1993 
2003  arm_status arm_cfft_radix4_init_f32(
2005  uint16_t fftLen,
2006  uint8_t ifftFlag,
2007  uint8_t bitReverseFlag);
2008 
2009 
2010 
2011  /*----------------------------------------------------------------------
2012  * Internal functions prototypes FFT function
2013  ----------------------------------------------------------------------*/
2014 
2024  void arm_radix4_butterfly_f32(
2025  float32_t * pSrc,
2026  uint16_t fftLen,
2027  float32_t * pCoef,
2028  uint16_t twidCoefModifier);
2029 
2040  void arm_radix4_butterfly_inverse_f32(
2041  float32_t * pSrc,
2042  uint16_t fftLen,
2043  float32_t * pCoef,
2044  uint16_t twidCoefModifier,
2045  float32_t onebyfftLen);
2046 
2056  void arm_bitreversal_f32(
2057  float32_t *pSrc,
2058  uint16_t fftSize,
2059  uint16_t bitRevFactor,
2060  uint16_t *pBitRevTab);
2061 
2071  void arm_radix4_butterfly_q31(
2072  q31_t *pSrc,
2073  uint32_t fftLen,
2074  q31_t *pCoef,
2075  uint32_t twidCoefModifier);
2076 
2086  void arm_radix4_butterfly_inverse_q31(
2087  q31_t * pSrc,
2088  uint32_t fftLen,
2089  q31_t * pCoef,
2090  uint32_t twidCoefModifier);
2091 
2101  void arm_bitreversal_q31(
2102  q31_t * pSrc,
2103  uint32_t fftLen,
2104  uint16_t bitRevFactor,
2105  uint16_t *pBitRevTab);
2106 
2116  void arm_radix4_butterfly_q15(
2117  q15_t *pSrc16,
2118  uint32_t fftLen,
2119  q15_t *pCoef16,
2120  uint32_t twidCoefModifier);
2121 
2131  void arm_radix4_butterfly_inverse_q15(
2132  q15_t *pSrc16,
2133  uint32_t fftLen,
2134  q15_t *pCoef16,
2135  uint32_t twidCoefModifier);
2136 
2146  void arm_bitreversal_q15(
2147  q15_t * pSrc,
2148  uint32_t fftLen,
2149  uint16_t bitRevFactor,
2150  uint16_t *pBitRevTab);
2151 
2156  typedef struct
2157  {
2158  uint32_t fftLenReal;
2159  uint32_t fftLenBy2;
2160  uint8_t ifftFlagR;
2163  q15_t *pTwiddleAReal;
2164  q15_t *pTwiddleBReal;
2167 
2172  typedef struct
2173  {
2174  uint32_t fftLenReal;
2175  uint32_t fftLenBy2;
2176  uint8_t ifftFlagR;
2179  q31_t *pTwiddleAReal;
2180  q31_t *pTwiddleBReal;
2183 
2188  typedef struct
2189  {
2190  uint32_t fftLenReal;
2191  uint16_t fftLenBy2;
2192  uint8_t ifftFlagR;
2195  float32_t *pTwiddleAReal;
2196  float32_t *pTwiddleBReal;
2199 
2208  void arm_rfft_q15(
2209  const arm_rfft_instance_q15 * S,
2210  q15_t * pSrc,
2211  q15_t * pDst);
2212 
2223  arm_status arm_rfft_init_q15(
2226  uint32_t fftLenReal,
2227  uint32_t ifftFlagR,
2228  uint32_t bitReverseFlag);
2229 
2238  void arm_rfft_q31(
2239  const arm_rfft_instance_q31 * S,
2240  q31_t * pSrc,
2241  q31_t * pDst);
2242 
2253  arm_status arm_rfft_init_q31(
2256  uint32_t fftLenReal,
2257  uint32_t ifftFlagR,
2258  uint32_t bitReverseFlag);
2259 
2270  arm_status arm_rfft_init_f32(
2273  uint32_t fftLenReal,
2274  uint32_t ifftFlagR,
2275  uint32_t bitReverseFlag);
2276 
2285  void arm_rfft_f32(
2286  const arm_rfft_instance_f32 * S,
2287  float32_t * pSrc,
2288  float32_t * pDst);
2289 
2294  typedef struct
2295  {
2296  uint16_t N;
2297  uint16_t Nby2;
2298  float32_t normalize;
2299  float32_t *pTwiddle;
2300  float32_t *pCosFactor;
2304 
2316  arm_status arm_dct4_init_f32(
2318  arm_rfft_instance_f32 * S_RFFT,
2320  uint16_t N,
2321  uint16_t Nby2,
2322  float32_t normalize);
2323 
2332  void arm_dct4_f32(
2333  const arm_dct4_instance_f32 * S,
2334  float32_t * pState,
2335  float32_t * pInlineBuffer);
2336 
2341  typedef struct
2342  {
2343  uint16_t N;
2344  uint16_t Nby2;
2345  q31_t normalize;
2346  q31_t *pTwiddle;
2347  q31_t *pCosFactor;
2351 
2363  arm_status arm_dct4_init_q31(
2365  arm_rfft_instance_q31 * S_RFFT,
2367  uint16_t N,
2368  uint16_t Nby2,
2369  q31_t normalize);
2370 
2379  void arm_dct4_q31(
2380  const arm_dct4_instance_q31 * S,
2381  q31_t * pState,
2382  q31_t * pInlineBuffer);
2383 
2388  typedef struct
2389  {
2390  uint16_t N;
2391  uint16_t Nby2;
2392  q15_t normalize;
2393  q15_t *pTwiddle;
2394  q15_t *pCosFactor;
2398 
2410  arm_status arm_dct4_init_q15(
2412  arm_rfft_instance_q15 * S_RFFT,
2414  uint16_t N,
2415  uint16_t Nby2,
2416  q15_t normalize);
2417 
2426  void arm_dct4_q15(
2427  const arm_dct4_instance_q15 * S,
2428  q15_t * pState,
2429  q15_t * pInlineBuffer);
2430 
2440  void arm_add_f32(
2441  float32_t * pSrcA,
2442  float32_t * pSrcB,
2443  float32_t * pDst,
2444  uint32_t blockSize);
2445 
2455  void arm_add_q7(
2456  q7_t * pSrcA,
2457  q7_t * pSrcB,
2458  q7_t * pDst,
2459  uint32_t blockSize);
2460 
2470  void arm_add_q15(
2471  q15_t * pSrcA,
2472  q15_t * pSrcB,
2473  q15_t * pDst,
2474  uint32_t blockSize);
2475 
2485  void arm_add_q31(
2486  q31_t * pSrcA,
2487  q31_t * pSrcB,
2488  q31_t * pDst,
2489  uint32_t blockSize);
2490 
2500  void arm_sub_f32(
2501  float32_t * pSrcA,
2502  float32_t * pSrcB,
2503  float32_t * pDst,
2504  uint32_t blockSize);
2505 
2515  void arm_sub_q7(
2516  q7_t * pSrcA,
2517  q7_t * pSrcB,
2518  q7_t * pDst,
2519  uint32_t blockSize);
2520 
2530  void arm_sub_q15(
2531  q15_t * pSrcA,
2532  q15_t * pSrcB,
2533  q15_t * pDst,
2534  uint32_t blockSize);
2535 
2545  void arm_sub_q31(
2546  q31_t * pSrcA,
2547  q31_t * pSrcB,
2548  q31_t * pDst,
2549  uint32_t blockSize);
2550 
2560  void arm_scale_f32(
2561  float32_t * pSrc,
2562  float32_t scale,
2563  float32_t * pDst,
2564  uint32_t blockSize);
2565 
2576  void arm_scale_q7(
2577  q7_t * pSrc,
2578  q7_t scaleFract,
2579  int8_t shift,
2580  q7_t * pDst,
2581  uint32_t blockSize);
2582 
2593  void arm_scale_q15(
2594  q15_t * pSrc,
2595  q15_t scaleFract,
2596  int8_t shift,
2597  q15_t * pDst,
2598  uint32_t blockSize);
2599 
2610  void arm_scale_q31(
2611  q31_t * pSrc,
2612  q31_t scaleFract,
2613  int8_t shift,
2614  q31_t * pDst,
2615  uint32_t blockSize);
2616 
2625  void arm_abs_q7(
2626  q7_t * pSrc,
2627  q7_t * pDst,
2628  uint32_t blockSize);
2629 
2638  void arm_abs_f32(
2639  float32_t * pSrc,
2640  float32_t * pDst,
2641  uint32_t blockSize);
2642 
2651  void arm_abs_q15(
2652  q15_t * pSrc,
2653  q15_t * pDst,
2654  uint32_t blockSize);
2655 
2664  void arm_abs_q31(
2665  q31_t * pSrc,
2666  q31_t * pDst,
2667  uint32_t blockSize);
2668 
2678  void arm_dot_prod_f32(
2679  float32_t * pSrcA,
2680  float32_t * pSrcB,
2681  uint32_t blockSize,
2682  float32_t * result);
2683 
2693  void arm_dot_prod_q7(
2694  q7_t * pSrcA,
2695  q7_t * pSrcB,
2696  uint32_t blockSize,
2697  q31_t * result);
2698 
2708  void arm_dot_prod_q15(
2709  q15_t * pSrcA,
2710  q15_t * pSrcB,
2711  uint32_t blockSize,
2712  q63_t * result);
2713 
2723  void arm_dot_prod_q31(
2724  q31_t * pSrcA,
2725  q31_t * pSrcB,
2726  uint32_t blockSize,
2727  q63_t * result);
2728 
2738  void arm_shift_q7(
2739  q7_t * pSrc,
2740  int8_t shiftBits,
2741  q7_t * pDst,
2742  uint32_t blockSize);
2743 
2753  void arm_shift_q15(
2754  q15_t * pSrc,
2755  int8_t shiftBits,
2756  q15_t * pDst,
2757  uint32_t blockSize);
2758 
2768  void arm_shift_q31(
2769  q31_t * pSrc,
2770  int8_t shiftBits,
2771  q31_t * pDst,
2772  uint32_t blockSize);
2773 
2783  void arm_offset_f32(
2784  float32_t * pSrc,
2785  float32_t offset,
2786  float32_t * pDst,
2787  uint32_t blockSize);
2788 
2798  void arm_offset_q7(
2799  q7_t * pSrc,
2800  q7_t offset,
2801  q7_t * pDst,
2802  uint32_t blockSize);
2803 
2813  void arm_offset_q15(
2814  q15_t * pSrc,
2815  q15_t offset,
2816  q15_t * pDst,
2817  uint32_t blockSize);
2818 
2828  void arm_offset_q31(
2829  q31_t * pSrc,
2830  q31_t offset,
2831  q31_t * pDst,
2832  uint32_t blockSize);
2833 
2842  void arm_negate_f32(
2843  float32_t * pSrc,
2844  float32_t * pDst,
2845  uint32_t blockSize);
2846 
2855  void arm_negate_q7(
2856  q7_t * pSrc,
2857  q7_t * pDst,
2858  uint32_t blockSize);
2859 
2868  void arm_negate_q15(
2869  q15_t * pSrc,
2870  q15_t * pDst,
2871  uint32_t blockSize);
2872 
2881  void arm_negate_q31(
2882  q31_t * pSrc,
2883  q31_t * pDst,
2884  uint32_t blockSize);
2892  void arm_copy_f32(
2893  float32_t * pSrc,
2894  float32_t * pDst,
2895  uint32_t blockSize);
2896 
2904  void arm_copy_q7(
2905  q7_t * pSrc,
2906  q7_t * pDst,
2907  uint32_t blockSize);
2908 
2916  void arm_copy_q15(
2917  q15_t * pSrc,
2918  q15_t * pDst,
2919  uint32_t blockSize);
2920 
2928  void arm_copy_q31(
2929  q31_t * pSrc,
2930  q31_t * pDst,
2931  uint32_t blockSize);
2939  void arm_fill_f32(
2940  float32_t value,
2941  float32_t * pDst,
2942  uint32_t blockSize);
2943 
2951  void arm_fill_q7(
2952  q7_t value,
2953  q7_t * pDst,
2954  uint32_t blockSize);
2955 
2963  void arm_fill_q15(
2964  q15_t value,
2965  q15_t * pDst,
2966  uint32_t blockSize);
2967 
2975  void arm_fill_q31(
2976  q31_t value,
2977  q31_t * pDst,
2978  uint32_t blockSize);
2979 
2990  void arm_conv_f32(
2991  float32_t * pSrcA,
2992  uint32_t srcALen,
2993  float32_t * pSrcB,
2994  uint32_t srcBLen,
2995  float32_t * pDst);
2996 
3007  void arm_conv_q15(
3008  q15_t * pSrcA,
3009  uint32_t srcALen,
3010  q15_t * pSrcB,
3011  uint32_t srcBLen,
3012  q15_t * pDst);
3013 
3024  void arm_conv_fast_q15(
3025  q15_t * pSrcA,
3026  uint32_t srcALen,
3027  q15_t * pSrcB,
3028  uint32_t srcBLen,
3029  q15_t * pDst);
3030 
3041  void arm_conv_q31(
3042  q31_t * pSrcA,
3043  uint32_t srcALen,
3044  q31_t * pSrcB,
3045  uint32_t srcBLen,
3046  q31_t * pDst);
3047 
3058  void arm_conv_fast_q31(
3059  q31_t * pSrcA,
3060  uint32_t srcALen,
3061  q31_t * pSrcB,
3062  uint32_t srcBLen,
3063  q31_t * pDst);
3064 
3075  void arm_conv_q7(
3076  q7_t * pSrcA,
3077  uint32_t srcALen,
3078  q7_t * pSrcB,
3079  uint32_t srcBLen,
3080  q7_t * pDst);
3081 
3094  arm_status arm_conv_partial_f32(
3095  float32_t * pSrcA,
3096  uint32_t srcALen,
3097  float32_t * pSrcB,
3098  uint32_t srcBLen,
3099  float32_t * pDst,
3100  uint32_t firstIndex,
3101  uint32_t numPoints);
3102 
3115  arm_status arm_conv_partial_q15(
3116  q15_t * pSrcA,
3117  uint32_t srcALen,
3118  q15_t * pSrcB,
3119  uint32_t srcBLen,
3120  q15_t * pDst,
3121  uint32_t firstIndex,
3122  uint32_t numPoints);
3123 
3136  arm_status arm_conv_partial_fast_q15(
3137  q15_t * pSrcA,
3138  uint32_t srcALen,
3139  q15_t * pSrcB,
3140  uint32_t srcBLen,
3141  q15_t * pDst,
3142  uint32_t firstIndex,
3143  uint32_t numPoints);
3144 
3157  arm_status arm_conv_partial_q31(
3158  q31_t * pSrcA,
3159  uint32_t srcALen,
3160  q31_t * pSrcB,
3161  uint32_t srcBLen,
3162  q31_t * pDst,
3163  uint32_t firstIndex,
3164  uint32_t numPoints);
3165 
3166 
3179  arm_status arm_conv_partial_fast_q31(
3180  q31_t * pSrcA,
3181  uint32_t srcALen,
3182  q31_t * pSrcB,
3183  uint32_t srcBLen,
3184  q31_t * pDst,
3185  uint32_t firstIndex,
3186  uint32_t numPoints);
3187 
3200  arm_status arm_conv_partial_q7(
3201  q7_t * pSrcA,
3202  uint32_t srcALen,
3203  q7_t * pSrcB,
3204  uint32_t srcBLen,
3205  q7_t * pDst,
3206  uint32_t firstIndex,
3207  uint32_t numPoints);
3208 
3209 
3214  typedef struct
3215  {
3216  uint8_t M;
3217  uint16_t numTaps;
3218  q15_t *pCoeffs;
3219  q15_t *pState;
3221 
3226  typedef struct
3227  {
3228  uint8_t M;
3229  uint16_t numTaps;
3230  q31_t *pCoeffs;
3231  q31_t *pState;
3234 
3239  typedef struct
3240  {
3241  uint8_t M;
3242  uint16_t numTaps;
3243  float32_t *pCoeffs;
3244  float32_t *pState;
3247 
3248 
3249 
3259  void arm_fir_decimate_f32(
3261  float32_t * pSrc,
3262  float32_t * pDst,
3263  uint32_t blockSize);
3264 
3265 
3278  arm_status arm_fir_decimate_init_f32(
3280  uint16_t numTaps,
3281  uint8_t M,
3282  float32_t * pCoeffs,
3283  float32_t * pState,
3284  uint32_t blockSize);
3285 
3295  void arm_fir_decimate_q15(
3297  q15_t * pSrc,
3298  q15_t * pDst,
3299  uint32_t blockSize);
3300 
3312  q15_t * pSrc,
3313  q15_t * pDst,
3314  uint32_t blockSize);
3315 
3316 
3317 
3330  arm_status arm_fir_decimate_init_q15(
3332  uint16_t numTaps,
3333  uint8_t M,
3334  q15_t * pCoeffs,
3335  q15_t * pState,
3336  uint32_t blockSize);
3337 
3347  void arm_fir_decimate_q31(
3349  q31_t * pSrc,
3350  q31_t * pDst,
3351  uint32_t blockSize);
3352 
3364  q31_t * pSrc,
3365  q31_t * pDst,
3366  uint32_t blockSize);
3367 
3368 
3381  arm_status arm_fir_decimate_init_q31(
3383  uint16_t numTaps,
3384  uint8_t M,
3385  q31_t * pCoeffs,
3386  q31_t * pState,
3387  uint32_t blockSize);
3388 
3389 
3390 
3395  typedef struct
3396  {
3397  uint8_t L;
3398  uint16_t phaseLength;
3399  q15_t *pCoeffs;
3400  q15_t *pState;
3402 
3407  typedef struct
3408  {
3409  uint8_t L;
3410  uint16_t phaseLength;
3411  q31_t *pCoeffs;
3412  q31_t *pState;
3414 
3419  typedef struct
3420  {
3421  uint8_t L;
3422  uint16_t phaseLength;
3423  float32_t *pCoeffs;
3424  float32_t *pState;
3426 
3427 
3439  q15_t * pSrc,
3440  q15_t * pDst,
3441  uint32_t blockSize);
3442 
3443 
3456  arm_status arm_fir_interpolate_init_q15(
3458  uint8_t L,
3459  uint16_t numTaps,
3460  q15_t * pCoeffs,
3461  q15_t * pState,
3462  uint32_t blockSize);
3463 
3475  q31_t * pSrc,
3476  q31_t * pDst,
3477  uint32_t blockSize);
3478 
3491  arm_status arm_fir_interpolate_init_q31(
3493  uint8_t L,
3494  uint16_t numTaps,
3495  q31_t * pCoeffs,
3496  q31_t * pState,
3497  uint32_t blockSize);
3498 
3499 
3511  float32_t * pSrc,
3512  float32_t * pDst,
3513  uint32_t blockSize);
3514 
3527  arm_status arm_fir_interpolate_init_f32(
3529  uint8_t L,
3530  uint16_t numTaps,
3531  float32_t * pCoeffs,
3532  float32_t * pState,
3533  uint32_t blockSize);
3534 
3539  typedef struct
3540  {
3541  uint8_t numStages;
3542  q63_t *pState;
3543  q31_t *pCoeffs;
3544  uint8_t postShift;
3547 
3548 
3559  q31_t * pSrc,
3560  q31_t * pDst,
3561  uint32_t blockSize);
3562 
3563 
3575  uint8_t numStages,
3576  q31_t * pCoeffs,
3577  q63_t * pState,
3578  uint8_t postShift);
3579 
3580 
3581 
3586  typedef struct
3587  {
3588  uint8_t numStages;
3589  float32_t *pState;
3590  float32_t *pCoeffs;
3592 
3593 
3605  float32_t * pSrc,
3606  float32_t * pDst,
3607  uint32_t blockSize);
3608 
3609 
3621  uint8_t numStages,
3622  float32_t * pCoeffs,
3623  float32_t * pState);
3624 
3625 
3626 
3631  typedef struct
3632  {
3633  uint16_t numStages;
3634  q15_t *pState;
3635  q15_t *pCoeffs;
3637 
3642  typedef struct
3643  {
3644  uint16_t numStages;
3645  q31_t *pState;
3646  q31_t *pCoeffs;
3648 
3653  typedef struct
3654  {
3655  uint16_t numStages;
3656  float32_t *pState;
3657  float32_t *pCoeffs;
3659 
3671  uint16_t numStages,
3672  q15_t * pCoeffs,
3673  q15_t * pState);
3674 
3675 
3684  void arm_fir_lattice_q15(
3685  const arm_fir_lattice_instance_q15 * S,
3686  q15_t * pSrc,
3687  q15_t * pDst,
3688  uint32_t blockSize);
3689 
3701  uint16_t numStages,
3702  q31_t * pCoeffs,
3703  q31_t * pState);
3704 
3705 
3715  void arm_fir_lattice_q31(
3716  const arm_fir_lattice_instance_q31 * S,
3717  q31_t * pSrc,
3718  q31_t * pDst,
3719  uint32_t blockSize);
3720 
3732  uint16_t numStages,
3733  float32_t * pCoeffs,
3734  float32_t * pState);
3735 
3745  void arm_fir_lattice_f32(
3746  const arm_fir_lattice_instance_f32 * S,
3747  float32_t * pSrc,
3748  float32_t * pDst,
3749  uint32_t blockSize);
3750 
3754  typedef struct
3755  {
3756  uint16_t numStages;
3757  q15_t *pState;
3758  q15_t *pkCoeffs;
3759  q15_t *pvCoeffs;
3761 
3765  typedef struct
3766  {
3767  uint16_t numStages;
3768  q31_t *pState;
3769  q31_t *pkCoeffs;
3770  q31_t *pvCoeffs;
3772 
3776  typedef struct
3777  {
3778  uint16_t numStages;
3779  float32_t *pState;
3780  float32_t *pkCoeffs;
3781  float32_t *pvCoeffs;
3783 
3793  void arm_iir_lattice_f32(
3794  const arm_iir_lattice_instance_f32 * S,
3795  float32_t * pSrc,
3796  float32_t * pDst,
3797  uint32_t blockSize);
3798 
3812  uint16_t numStages,
3813  float32_t *pkCoeffs,
3814  float32_t *pvCoeffs,
3815  float32_t *pState,
3816  uint32_t blockSize);
3817 
3818 
3828  void arm_iir_lattice_q31(
3829  const arm_iir_lattice_instance_q31 * S,
3830  q31_t * pSrc,
3831  q31_t * pDst,
3832  uint32_t blockSize);
3833 
3834 
3848  uint16_t numStages,
3849  q31_t *pkCoeffs,
3850  q31_t *pvCoeffs,
3851  q31_t *pState,
3852  uint32_t blockSize);
3853 
3854 
3864  void arm_iir_lattice_q15(
3865  const arm_iir_lattice_instance_q15 * S,
3866  q15_t * pSrc,
3867  q15_t * pDst,
3868  uint32_t blockSize);
3869 
3870 
3884  uint16_t numStages,
3885  q15_t *pkCoeffs,
3886  q15_t *pvCoeffs,
3887  q15_t *pState,
3888  uint32_t blockSize);
3889 
3894  typedef struct
3895  {
3896  uint16_t numTaps;
3897  float32_t *pState;
3898  float32_t *pCoeffs;
3899  float32_t mu;
3901 
3913  void arm_lms_f32(
3914  const arm_lms_instance_f32 * S,
3915  float32_t * pSrc,
3916  float32_t * pRef,
3917  float32_t * pOut,
3918  float32_t * pErr,
3919  uint32_t blockSize);
3920 
3932  void arm_lms_init_f32(
3934  uint16_t numTaps,
3935  float32_t * pCoeffs,
3936  float32_t * pState,
3937  float32_t mu,
3938  uint32_t blockSize);
3939 
3944  typedef struct
3945  {
3946  uint16_t numTaps;
3947  q15_t *pState;
3948  q15_t *pCoeffs;
3949  q15_t mu;
3950  uint32_t postShift;
3952 
3953 
3966  void arm_lms_init_q15(
3968  uint16_t numTaps,
3969  q15_t * pCoeffs,
3970  q15_t * pState,
3971  q15_t mu,
3972  uint32_t blockSize,
3973  uint32_t postShift);
3974 
3986  void arm_lms_q15(
3987  const arm_lms_instance_q15 * S,
3988  q15_t * pSrc,
3989  q15_t * pRef,
3990  q15_t * pOut,
3991  q15_t * pErr,
3992  uint32_t blockSize);
3993 
3994 
3999  typedef struct
4000  {
4001  uint16_t numTaps;
4002  q31_t *pState;
4003  q31_t *pCoeffs;
4004  q31_t mu;
4005  uint32_t postShift;
4008 
4020  void arm_lms_q31(
4021  const arm_lms_instance_q31 * S,
4022  q31_t * pSrc,
4023  q31_t * pRef,
4024  q31_t * pOut,
4025  q31_t * pErr,
4026  uint32_t blockSize);
4027 
4040  void arm_lms_init_q31(
4042  uint16_t numTaps,
4043  q31_t *pCoeffs,
4044  q31_t *pState,
4045  q31_t mu,
4046  uint32_t blockSize,
4047  uint32_t postShift);
4048 
4053  typedef struct
4054  {
4055  uint16_t numTaps;
4056  float32_t *pState;
4057  float32_t *pCoeffs;
4058  float32_t mu;
4059  float32_t energy;
4060  float32_t x0;
4062 
4074  void arm_lms_norm_f32(
4076  float32_t * pSrc,
4077  float32_t * pRef,
4078  float32_t * pOut,
4079  float32_t * pErr,
4080  uint32_t blockSize);
4081 
4093  void arm_lms_norm_init_f32(
4095  uint16_t numTaps,
4096  float32_t * pCoeffs,
4097  float32_t * pState,
4098  float32_t mu,
4099  uint32_t blockSize);
4100 
4101 
4105  typedef struct
4106  {
4107  uint16_t numTaps;
4108  q31_t *pState;
4109  q31_t *pCoeffs;
4110  q31_t mu;
4111  uint8_t postShift;
4112  q31_t *recipTable;
4113  q31_t energy;
4114  q31_t x0;
4116 
4128  void arm_lms_norm_q31(
4130  q31_t * pSrc,
4131  q31_t * pRef,
4132  q31_t * pOut,
4133  q31_t * pErr,
4134  uint32_t blockSize);
4135 
4148  void arm_lms_norm_init_q31(
4150  uint16_t numTaps,
4151  q31_t * pCoeffs,
4152  q31_t * pState,
4153  q31_t mu,
4154  uint32_t blockSize,
4155  uint8_t postShift);
4156 
4161  typedef struct
4162  {
4163  uint16_t numTaps;
4164  q15_t *pState;
4165  q15_t *pCoeffs;
4166  q15_t mu;
4167  uint8_t postShift;
4168  q15_t *recipTable;
4169  q15_t energy;
4170  q15_t x0;
4172 
4184  void arm_lms_norm_q15(
4186  q15_t * pSrc,
4187  q15_t * pRef,
4188  q15_t * pOut,
4189  q15_t * pErr,
4190  uint32_t blockSize);
4191 
4192 
4205  void arm_lms_norm_init_q15(
4207  uint16_t numTaps,
4208  q15_t * pCoeffs,
4209  q15_t * pState,
4210  q15_t mu,
4211  uint32_t blockSize,
4212  uint8_t postShift);
4213 
4224  void arm_correlate_f32(
4225  float32_t * pSrcA,
4226  uint32_t srcALen,
4227  float32_t * pSrcB,
4228  uint32_t srcBLen,
4229  float32_t * pDst);
4230 
4241  void arm_correlate_q15(
4242  q15_t * pSrcA,
4243  uint32_t srcALen,
4244  q15_t * pSrcB,
4245  uint32_t srcBLen,
4246  q15_t * pDst);
4247 
4259  q15_t * pSrcA,
4260  uint32_t srcALen,
4261  q15_t * pSrcB,
4262  uint32_t srcBLen,
4263  q15_t * pDst);
4264 
4275  void arm_correlate_q31(
4276  q31_t * pSrcA,
4277  uint32_t srcALen,
4278  q31_t * pSrcB,
4279  uint32_t srcBLen,
4280  q31_t * pDst);
4281 
4293  q31_t * pSrcA,
4294  uint32_t srcALen,
4295  q31_t * pSrcB,
4296  uint32_t srcBLen,
4297  q31_t * pDst);
4298 
4309  void arm_correlate_q7(
4310  q7_t * pSrcA,
4311  uint32_t srcALen,
4312  q7_t * pSrcB,
4313  uint32_t srcBLen,
4314  q7_t * pDst);
4315 
4319  typedef struct
4320  {
4321  uint16_t numTaps;
4322  uint16_t stateIndex;
4323  float32_t *pState;
4324  float32_t *pCoeffs;
4325  uint16_t maxDelay;
4326  int32_t *pTapDelay;
4328 
4333  typedef struct
4334  {
4335  uint16_t numTaps;
4336  uint16_t stateIndex;
4337  q31_t *pState;
4338  q31_t *pCoeffs;
4339  uint16_t maxDelay;
4340  int32_t *pTapDelay;
4342 
4347  typedef struct
4348  {
4349  uint16_t numTaps;
4350  uint16_t stateIndex;
4351  q15_t *pState;
4352  q15_t *pCoeffs;
4353  uint16_t maxDelay;
4354  int32_t *pTapDelay;
4356 
4361  typedef struct
4362  {
4363  uint16_t numTaps;
4364  uint16_t stateIndex;
4365  q7_t *pState;
4366  q7_t *pCoeffs;
4367  uint16_t maxDelay;
4368  int32_t *pTapDelay;
4370 
4381  void arm_fir_sparse_f32(
4383  float32_t * pSrc,
4384  float32_t * pDst,
4385  float32_t * pScratchIn,
4386  uint32_t blockSize);
4387 
4402  uint16_t numTaps,
4403  float32_t * pCoeffs,
4404  float32_t * pState,
4405  int32_t * pTapDelay,
4406  uint16_t maxDelay,
4407  uint32_t blockSize);
4408 
4419  void arm_fir_sparse_q31(
4421  q31_t * pSrc,
4422  q31_t * pDst,
4423  q31_t * pScratchIn,
4424  uint32_t blockSize);
4425 
4440  uint16_t numTaps,
4441  q31_t * pCoeffs,
4442  q31_t * pState,
4443  int32_t * pTapDelay,
4444  uint16_t maxDelay,
4445  uint32_t blockSize);
4446 
4458  void arm_fir_sparse_q15(
4460  q15_t * pSrc,
4461  q15_t * pDst,
4462  q15_t * pScratchIn,
4463  q31_t * pScratchOut,
4464  uint32_t blockSize);
4465 
4466 
4481  uint16_t numTaps,
4482  q15_t * pCoeffs,
4483  q15_t * pState,
4484  int32_t * pTapDelay,
4485  uint16_t maxDelay,
4486  uint32_t blockSize);
4487 
4499  void arm_fir_sparse_q7(
4501  q7_t * pSrc,
4502  q7_t * pDst,
4503  q7_t * pScratchIn,
4504  q31_t * pScratchOut,
4505  uint32_t blockSize);
4506 
4521  uint16_t numTaps,
4522  q7_t * pCoeffs,
4523  q7_t * pState,
4524  int32_t *pTapDelay,
4525  uint16_t maxDelay,
4526  uint32_t blockSize);
4527 
4528 
4529  /*
4530  * @brief Floating-point sin_cos function.
4531  * @param[in] theta input value in degrees
4532  * @param[out] *pSinVal points to the processed sine output.
4533  * @param[out] *pCosVal points to the processed cos output.
4534  * @return none.
4535  */
4536 
4537  void arm_sin_cos_f32(
4538  float32_t theta,
4539  float32_t *pSinVal,
4540  float32_t *pCcosVal);
4541 
4542  /*
4543  * @brief Q31 sin_cos function.
4544  * @param[in] theta scaled input value in degrees
4545  * @param[out] *pSinVal points to the processed sine output.
4546  * @param[out] *pCosVal points to the processed cosine output.
4547  * @return none.
4548  */
4549 
4550  void arm_sin_cos_q31(
4551  q31_t theta,
4552  q31_t *pSinVal,
4553  q31_t *pCosVal);
4554 
4555 
4564  void arm_cmplx_conj_f32(
4565  float32_t * pSrc,
4566  float32_t * pDst,
4567  uint32_t numSamples);
4568 
4577  void arm_cmplx_conj_q31(
4578  q31_t * pSrc,
4579  q31_t * pDst,
4580  uint32_t numSamples);
4581 
4590  void arm_cmplx_conj_q15(
4591  q15_t * pSrc,
4592  q15_t * pDst,
4593  uint32_t numSamples);
4594 
4595 
4596 
4606  float32_t * pSrc,
4607  float32_t * pDst,
4608  uint32_t numSamples);
4609 
4619  q31_t * pSrc,
4620  q31_t * pDst,
4621  uint32_t numSamples);
4622 
4632  q15_t * pSrc,
4633  q15_t * pDst,
4634  uint32_t numSamples);
4635 
4636 
4711  static __INLINE float32_t arm_pid_f32(
4713  float32_t in)
4714  {
4715  float32_t out;
4716 
4717  /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
4718  out = (S->A0 * in) +
4719  (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
4720 
4721  /* Update state */
4722  S->state[1] = S->state[0];
4723  S->state[0] = in;
4724  S->state[2] = out;
4725 
4726  /* return to application */
4727  return (out);
4728 
4729  }
4730 
4746  static __INLINE q31_t arm_pid_q31(
4748  q31_t in)
4749  {
4750  q63_t acc;
4751  q31_t out;
4752 
4753  /* acc = A0 * x[n] */
4754  acc = (q63_t) S->A0 * in;
4755 
4756  /* acc += A1 * x[n-1] */
4757  acc += (q63_t) S->A1 * S->state[0];
4758 
4759  /* acc += A2 * x[n-2] */
4760  acc += (q63_t) S->A2 * S->state[1];
4761 
4762  /* convert output to 1.31 format to add y[n-1] */
4763  out = (q31_t) (acc >> 31u);
4764 
4765  /* out += y[n-1] */
4766  out += S->state[2];
4767 
4768  /* Update state */
4769  S->state[1] = S->state[0];
4770  S->state[0] = in;
4771  S->state[2] = out;
4772 
4773  /* return to application */
4774  return (out);
4775 
4776  }
4777 
4794  static __INLINE q15_t arm_pid_q15(
4796  q15_t in)
4797  {
4798  q63_t acc;
4799  q15_t out;
4800 
4801  /* Implementation of PID controller */
4802 
4803  #ifdef ARM_MATH_CM0
4804 
4805  /* acc = A0 * x[n] */
4806  acc = ((q31_t) S->A0 )* in ;
4807 
4808  #else
4809 
4810  /* acc = A0 * x[n] */
4811  acc = (q31_t) __SMUAD(S->A0, in);
4812 
4813  #endif
4814 
4815  #ifdef ARM_MATH_CM0
4816 
4817  /* acc += A1 * x[n-1] + A2 * x[n-2] */
4818  acc += (q31_t) S->A1 * S->state[0] ;
4819  acc += (q31_t) S->A2 * S->state[1] ;
4820 
4821  #else
4822 
4823  /* acc += A1 * x[n-1] + A2 * x[n-2] */
4824  acc = __SMLALD(S->A1, (q31_t)__SIMD32(S->state), acc);
4825 
4826  #endif
4827 
4828  /* acc += y[n-1] */
4829  acc += (q31_t) S->state[2] << 15;
4830 
4831  /* saturate the output */
4832  out = (q15_t) (__SSAT((acc >> 15), 16));
4833 
4834  /* Update state */
4835  S->state[1] = S->state[0];
4836  S->state[0] = in;
4837  S->state[2] = out;
4838 
4839  /* return to application */
4840  return (out);
4841 
4842  }
4843 
4857  arm_status arm_mat_inverse_f32(
4858  const arm_matrix_instance_f32 * src,
4859  arm_matrix_instance_f32 * dst);
4860 
4861 
4862 
4905  static __INLINE void arm_clarke_f32(
4906  float32_t Ia,
4907  float32_t Ib,
4908  float32_t * pIalpha,
4909  float32_t * pIbeta)
4910  {
4911  /* Calculate pIalpha using the equation, pIalpha = Ia */
4912  *pIalpha = Ia;
4913 
4914  /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
4915  *pIbeta = ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
4916 
4917  }
4918 
4934  static __INLINE void arm_clarke_q31(
4935  q31_t Ia,
4936  q31_t Ib,
4937  q31_t * pIalpha,
4938  q31_t * pIbeta)
4939  {
4940  q31_t product1, product2; /* Temporary variables used to store intermediate results */
4941 
4942  /* Calculating pIalpha from Ia by equation pIalpha = Ia */
4943  *pIalpha = Ia;
4944 
4945  /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
4946  product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
4947 
4948  /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
4949  product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
4950 
4951  /* pIbeta is calculated by adding the intermediate products */
4952  *pIbeta = __QADD(product1, product2);
4953  }
4954 
4966  void arm_q7_to_q31(
4967  q7_t * pSrc,
4968  q31_t * pDst,
4969  uint32_t blockSize);
4970 
4971 
4972 
4973 
5009  static __INLINE void arm_inv_clarke_f32(
5010  float32_t Ialpha,
5011  float32_t Ibeta,
5012  float32_t * pIa,
5013  float32_t * pIb)
5014  {
5015  /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5016  *pIa = Ialpha;
5017 
5018  /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
5019  *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
5020 
5021  }
5022 
5038  static __INLINE void arm_inv_clarke_q31(
5039  q31_t Ialpha,
5040  q31_t Ibeta,
5041  q31_t * pIa,
5042  q31_t * pIb)
5043  {
5044  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5045 
5046  /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5047  *pIa = Ialpha;
5048 
5049  /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
5050  product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
5051 
5052  /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
5053  product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
5054 
5055  /* pIb is calculated by subtracting the products */
5056  *pIb = __QSUB(product2, product1);
5057 
5058  }
5059 
5071  void arm_q7_to_q15(
5072  q7_t * pSrc,
5073  q15_t * pDst,
5074  uint32_t blockSize);
5075 
5076 
5077 
5125  static __INLINE void arm_park_f32(
5126  float32_t Ialpha,
5127  float32_t Ibeta,
5128  float32_t * pId,
5129  float32_t * pIq,
5130  float32_t sinVal,
5131  float32_t cosVal)
5132  {
5133  /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
5134  *pId = Ialpha * cosVal + Ibeta * sinVal;
5135 
5136  /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
5137  *pIq = -Ialpha * sinVal + Ibeta * cosVal;
5138 
5139  }
5140 
5159  static __INLINE void arm_park_q31(
5160  q31_t Ialpha,
5161  q31_t Ibeta,
5162  q31_t * pId,
5163  q31_t * pIq,
5164  q31_t sinVal,
5165  q31_t cosVal)
5166  {
5167  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5168  q31_t product3, product4; /* Temporary variables used to store intermediate results */
5169 
5170  /* Intermediate product is calculated by (Ialpha * cosVal) */
5171  product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
5172 
5173  /* Intermediate product is calculated by (Ibeta * sinVal) */
5174  product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
5175 
5176 
5177  /* Intermediate product is calculated by (Ialpha * sinVal) */
5178  product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
5179 
5180  /* Intermediate product is calculated by (Ibeta * cosVal) */
5181  product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
5182 
5183  /* Calculate pId by adding the two intermediate products 1 and 2 */
5184  *pId = __QADD(product1, product2);
5185 
5186  /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
5187  *pIq = __QSUB(product4, product3);
5188  }
5189 
5201  void arm_q7_to_float(
5202  q7_t * pSrc,
5203  float32_t * pDst,
5204  uint32_t blockSize);
5205 
5206 
5244  static __INLINE void arm_inv_park_f32(
5245  float32_t Id,
5246  float32_t Iq,
5247  float32_t * pIalpha,
5248  float32_t * pIbeta,
5249  float32_t sinVal,
5250  float32_t cosVal)
5251  {
5252  /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
5253  *pIalpha = Id * cosVal - Iq * sinVal;
5254 
5255  /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
5256  *pIbeta = Id * sinVal + Iq * cosVal;
5257 
5258  }
5259 
5260 
5279  static __INLINE void arm_inv_park_q31(
5280  q31_t Id,
5281  q31_t Iq,
5282  q31_t * pIalpha,
5283  q31_t * pIbeta,
5284  q31_t sinVal,
5285  q31_t cosVal)
5286  {
5287  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5288  q31_t product3, product4; /* Temporary variables used to store intermediate results */
5289 
5290  /* Intermediate product is calculated by (Id * cosVal) */
5291  product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
5292 
5293  /* Intermediate product is calculated by (Iq * sinVal) */
5294  product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
5295 
5296 
5297  /* Intermediate product is calculated by (Id * sinVal) */
5298  product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
5299 
5300  /* Intermediate product is calculated by (Iq * cosVal) */
5301  product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
5302 
5303  /* Calculate pIalpha by using the two intermediate products 1 and 2 */
5304  *pIalpha = __QSUB(product1, product2);
5305 
5306  /* Calculate pIbeta by using the two intermediate products 3 and 4 */
5307  *pIbeta = __QADD(product4, product3);
5308 
5309  }
5310 
5323  void arm_q31_to_float(
5324  q31_t * pSrc,
5325  float32_t * pDst,
5326  uint32_t blockSize);
5327 
5377  static __INLINE float32_t arm_linear_interp_f32(
5379  float32_t x)
5380  {
5381 
5382  float32_t y;
5383  float32_t x0, x1; /* Nearest input values */
5384  float32_t y0, y1; /* Nearest output values */
5385  float32_t xSpacing = S->xSpacing; /* spacing between input values */
5386  int32_t i; /* Index variable */
5387  float32_t *pYData = S->pYData; /* pointer to output table */
5388 
5389  /* Calculation of index */
5390  i = (x - S->x1) / xSpacing;
5391 
5392  if(i < 0)
5393  {
5394  /* Iniatilize output for below specified range as least output value of table */
5395  y = pYData[0];
5396  }
5397  else if(i >= S->nValues)
5398  {
5399  /* Iniatilize output for above specified range as last output value of table */
5400  y = pYData[S->nValues-1];
5401  }
5402  else
5403  {
5404  /* Calculation of nearest input values */
5405  x0 = S->x1 + i * xSpacing;
5406  x1 = S->x1 + (i +1) * xSpacing;
5407 
5408  /* Read of nearest output values */
5409  y0 = pYData[i];
5410  y1 = pYData[i + 1];
5411 
5412  /* Calculation of output */
5413  y = y0 + (x - x0) * ((y1 - y0)/(x1-x0));
5414 
5415  }
5416 
5417  /* returns output value */
5418  return (y);
5419  }
5420 
5436  static __INLINE q31_t arm_linear_interp_q31(q31_t *pYData,
5437  q31_t x, uint32_t nValues)
5438  {
5439  q31_t y; /* output */
5440  q31_t y0, y1; /* Nearest output values */
5441  q31_t fract; /* fractional part */
5442  int32_t index; /* Index to read nearest output values */
5443 
5444  /* Input is in 12.20 format */
5445  /* 12 bits for the table index */
5446  /* Index value calculation */
5447  index = ((x & 0xFFF00000) >> 20);
5448 
5449  if(index >= (nValues - 1))
5450  {
5451  return(pYData[nValues - 1]);
5452  }
5453  else if(index < 0)
5454  {
5455  return(pYData[0]);
5456  }
5457  else
5458  {
5459 
5460  /* 20 bits for the fractional part */
5461  /* shift left by 11 to keep fract in 1.31 format */
5462  fract = (x & 0x000FFFFF) << 11;
5463 
5464  /* Read two nearest output values from the index in 1.31(q31) format */
5465  y0 = pYData[index];
5466  y1 = pYData[index + 1u];
5467 
5468  /* Calculation of y0 * (1-fract) and y is in 2.30 format */
5469  y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
5470 
5471  /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
5472  y += ((q31_t) (((q63_t) y1 * fract) >> 32));
5473 
5474  /* Convert y to 1.31 format */
5475  return (y << 1u);
5476 
5477  }
5478 
5479  }
5480 
5496  static __INLINE q15_t arm_linear_interp_q15(q15_t *pYData, q31_t x, uint32_t nValues)
5497  {
5498  q63_t y; /* output */
5499  q15_t y0, y1; /* Nearest output values */
5500  q31_t fract; /* fractional part */
5501  int32_t index; /* Index to read nearest output values */
5502 
5503  /* Input is in 12.20 format */
5504  /* 12 bits for the table index */
5505  /* Index value calculation */
5506  index = ((x & 0xFFF00000) >> 20u);
5507 
5508  if(index >= (nValues - 1))
5509  {
5510  return(pYData[nValues - 1]);
5511  }
5512  else if(index < 0)
5513  {
5514  return(pYData[0]);
5515  }
5516  else
5517  {
5518  /* 20 bits for the fractional part */
5519  /* fract is in 12.20 format */
5520  fract = (x & 0x000FFFFF);
5521 
5522  /* Read two nearest output values from the index */
5523  y0 = pYData[index];
5524  y1 = pYData[index + 1u];
5525 
5526  /* Calculation of y0 * (1-fract) and y is in 13.35 format */
5527  y = ((q63_t) y0 * (0xFFFFF - fract));
5528 
5529  /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
5530  y += ((q63_t) y1 * (fract));
5531 
5532  /* convert y to 1.15 format */
5533  return (y >> 20);
5534  }
5535 
5536 
5537  }
5538 
5553  static __INLINE q7_t arm_linear_interp_q7(q7_t *pYData, q31_t x, uint32_t nValues)
5554  {
5555  q31_t y; /* output */
5556  q7_t y0, y1; /* Nearest output values */
5557  q31_t fract; /* fractional part */
5558  int32_t index; /* Index to read nearest output values */
5559 
5560  /* Input is in 12.20 format */
5561  /* 12 bits for the table index */
5562  /* Index value calculation */
5563  index = ((x & 0xFFF00000) >> 20u);
5564 
5565 
5566  if(index >= (nValues - 1))
5567  {
5568  return(pYData[nValues - 1]);
5569  }
5570  else if(index < 0)
5571  {
5572  return(pYData[0]);
5573  }
5574  else
5575  {
5576 
5577  /* 20 bits for the fractional part */
5578  /* fract is in 12.20 format */
5579  fract = (x & 0x000FFFFF);
5580 
5581  /* Read two nearest output values from the index and are in 1.7(q7) format */
5582  y0 = pYData[index];
5583  y1 = pYData[index + 1u];
5584 
5585  /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
5586  y = ((y0 * (0xFFFFF - fract)));
5587 
5588  /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
5589  y += (y1 * fract);
5590 
5591  /* convert y to 1.7(q7) format */
5592  return (y >> 20u);
5593 
5594  }
5595 
5596  }
5607  float32_t arm_sin_f32(
5608  float32_t x);
5609 
5616  q31_t arm_sin_q31(
5617  q31_t x);
5618 
5625  q15_t arm_sin_q15(
5626  q15_t x);
5627 
5634  float32_t arm_cos_f32(
5635  float32_t x);
5636 
5643  q31_t arm_cos_q31(
5644  q31_t x);
5645 
5652  q15_t arm_cos_q15(
5653  q15_t x);
5654 
5655 
5695  static __INLINE arm_status arm_sqrt_f32(
5696  float32_t in, float32_t *pOut)
5697  {
5698  if(in > 0)
5699  {
5700 
5701 // #if __FPU_USED
5702  #if (__FPU_USED == 1) && defined ( __CC_ARM )
5703  *pOut = __sqrtf(in);
5704  #else
5705  *pOut = sqrtf(in);
5706  #endif
5707 
5708  return (ARM_MATH_SUCCESS);
5709  }
5710  else
5711  {
5712  *pOut = 0.0f;
5713  return (ARM_MATH_ARGUMENT_ERROR);
5714  }
5715 
5716  }
5717 
5718 
5726  arm_status arm_sqrt_q31(
5727  q31_t in, q31_t *pOut);
5728 
5736  arm_status arm_sqrt_q15(
5737  q15_t in, q15_t *pOut);
5738 
5752  static __INLINE void arm_circularWrite_f32(
5753  int32_t * circBuffer,
5754  int32_t L,
5755  uint16_t * writeOffset,
5756  int32_t bufferInc,
5757  const int32_t * src,
5758  int32_t srcInc,
5759  uint32_t blockSize)
5760  {
5761  uint32_t i = 0u;
5762  int32_t wOffset;
5763 
5764  /* Copy the value of Index pointer that points
5765  * to the current location where the input samples to be copied */
5766  wOffset = *writeOffset;
5767 
5768  /* Loop over the blockSize */
5769  i = blockSize;
5770 
5771  while(i > 0u)
5772  {
5773  /* copy the input sample to the circular buffer */
5774  circBuffer[wOffset] = *src;
5775 
5776  /* Update the input pointer */
5777  src += srcInc;
5778 
5779  /* Circularly update wOffset. Watch out for positive and negative value */
5780  wOffset += bufferInc;
5781  if(wOffset >= L)
5782  wOffset -= L;
5783 
5784  /* Decrement the loop counter */
5785  i--;
5786  }
5787 
5788  /* Update the index pointer */
5789  *writeOffset = wOffset;
5790  }
5791 
5792 
5793 
5797  static __INLINE void arm_circularRead_f32(
5798  int32_t * circBuffer,
5799  int32_t L,
5800  int32_t * readOffset,
5801  int32_t bufferInc,
5802  int32_t * dst,
5803  int32_t * dst_base,
5804  int32_t dst_length,
5805  int32_t dstInc,
5806  uint32_t blockSize)
5807  {
5808  uint32_t i = 0u;
5809  int32_t rOffset, dst_end;
5810 
5811  /* Copy the value of Index pointer that points
5812  * to the current location from where the input samples to be read */
5813  rOffset = *readOffset;
5814  dst_end = (int32_t) (dst_base + dst_length);
5815 
5816  /* Loop over the blockSize */
5817  i = blockSize;
5818 
5819  while(i > 0u)
5820  {
5821  /* copy the sample from the circular buffer to the destination buffer */
5822  *dst = circBuffer[rOffset];
5823 
5824  /* Update the input pointer */
5825  dst += dstInc;
5826 
5827  if(dst == (int32_t *) dst_end)
5828  {
5829  dst = dst_base;
5830  }
5831 
5832  /* Circularly update rOffset. Watch out for positive and negative value */
5833  rOffset += bufferInc;
5834 
5835  if(rOffset >= L)
5836  {
5837  rOffset -= L;
5838  }
5839 
5840  /* Decrement the loop counter */
5841  i--;
5842  }
5843 
5844  /* Update the index pointer */
5845  *readOffset = rOffset;
5846  }
5847 
5852  static __INLINE void arm_circularWrite_q15(
5853  q15_t * circBuffer,
5854  int32_t L,
5855  uint16_t * writeOffset,
5856  int32_t bufferInc,
5857  const q15_t * src,
5858  int32_t srcInc,
5859  uint32_t blockSize)
5860  {
5861  uint32_t i = 0u;
5862  int32_t wOffset;
5863 
5864  /* Copy the value of Index pointer that points
5865  * to the current location where the input samples to be copied */
5866  wOffset = *writeOffset;
5867 
5868  /* Loop over the blockSize */
5869  i = blockSize;
5870 
5871  while(i > 0u)
5872  {
5873  /* copy the input sample to the circular buffer */
5874  circBuffer[wOffset] = *src;
5875 
5876  /* Update the input pointer */
5877  src += srcInc;
5878 
5879  /* Circularly update wOffset. Watch out for positive and negative value */
5880  wOffset += bufferInc;
5881  if(wOffset >= L)
5882  wOffset -= L;
5883 
5884  /* Decrement the loop counter */
5885  i--;
5886  }
5887 
5888  /* Update the index pointer */
5889  *writeOffset = wOffset;
5890  }
5891 
5892 
5893 
5897  static __INLINE void arm_circularRead_q15(
5898  q15_t * circBuffer,
5899  int32_t L,
5900  int32_t * readOffset,
5901  int32_t bufferInc,
5902  q15_t * dst,
5903  q15_t * dst_base,
5904  int32_t dst_length,
5905  int32_t dstInc,
5906  uint32_t blockSize)
5907  {
5908  uint32_t i = 0;
5909  int32_t rOffset, dst_end;
5910 
5911  /* Copy the value of Index pointer that points
5912  * to the current location from where the input samples to be read */
5913  rOffset = *readOffset;
5914 
5915  dst_end = (int32_t) (dst_base + dst_length);
5916 
5917  /* Loop over the blockSize */
5918  i = blockSize;
5919 
5920  while(i > 0u)
5921  {
5922  /* copy the sample from the circular buffer to the destination buffer */
5923  *dst = circBuffer[rOffset];
5924 
5925  /* Update the input pointer */
5926  dst += dstInc;
5927 
5928  if(dst == (q15_t *) dst_end)
5929  {
5930  dst = dst_base;
5931  }
5932 
5933  /* Circularly update wOffset. Watch out for positive and negative value */
5934  rOffset += bufferInc;
5935 
5936  if(rOffset >= L)
5937  {
5938  rOffset -= L;
5939  }
5940 
5941  /* Decrement the loop counter */
5942  i--;
5943  }
5944 
5945  /* Update the index pointer */
5946  *readOffset = rOffset;
5947  }
5948 
5949 
5954  static __INLINE void arm_circularWrite_q7(
5955  q7_t * circBuffer,
5956  int32_t L,
5957  uint16_t * writeOffset,
5958  int32_t bufferInc,
5959  const q7_t * src,
5960  int32_t srcInc,
5961  uint32_t blockSize)
5962  {
5963  uint32_t i = 0u;
5964  int32_t wOffset;
5965 
5966  /* Copy the value of Index pointer that points
5967  * to the current location where the input samples to be copied */
5968  wOffset = *writeOffset;
5969 
5970  /* Loop over the blockSize */
5971  i = blockSize;
5972 
5973  while(i > 0u)
5974  {
5975  /* copy the input sample to the circular buffer */
5976  circBuffer[wOffset] = *src;
5977 
5978  /* Update the input pointer */
5979  src += srcInc;
5980 
5981  /* Circularly update wOffset. Watch out for positive and negative value */
5982  wOffset += bufferInc;
5983  if(wOffset >= L)
5984  wOffset -= L;
5985 
5986  /* Decrement the loop counter */
5987  i--;
5988  }
5989 
5990  /* Update the index pointer */
5991  *writeOffset = wOffset;
5992  }
5993 
5994 
5995 
5999  static __INLINE void arm_circularRead_q7(
6000  q7_t * circBuffer,
6001  int32_t L,
6002  int32_t * readOffset,
6003  int32_t bufferInc,
6004  q7_t * dst,
6005  q7_t * dst_base,
6006  int32_t dst_length,
6007  int32_t dstInc,
6008  uint32_t blockSize)
6009  {
6010  uint32_t i = 0;
6011  int32_t rOffset, dst_end;
6012 
6013  /* Copy the value of Index pointer that points
6014  * to the current location from where the input samples to be read */
6015  rOffset = *readOffset;
6016 
6017  dst_end = (int32_t) (dst_base + dst_length);
6018 
6019  /* Loop over the blockSize */
6020  i = blockSize;
6021 
6022  while(i > 0u)
6023  {
6024  /* copy the sample from the circular buffer to the destination buffer */
6025  *dst = circBuffer[rOffset];
6026 
6027  /* Update the input pointer */
6028  dst += dstInc;
6029 
6030  if(dst == (q7_t *) dst_end)
6031  {
6032  dst = dst_base;
6033  }
6034 
6035  /* Circularly update rOffset. Watch out for positive and negative value */
6036  rOffset += bufferInc;
6037 
6038  if(rOffset >= L)
6039  {
6040  rOffset -= L;
6041  }
6042 
6043  /* Decrement the loop counter */
6044  i--;
6045  }
6046 
6047  /* Update the index pointer */
6048  *readOffset = rOffset;
6049  }
6050 
6051 
6060  void arm_power_q31(
6061  q31_t * pSrc,
6062  uint32_t blockSize,
6063  q63_t * pResult);
6064 
6073  void arm_power_f32(
6074  float32_t * pSrc,
6075  uint32_t blockSize,
6076  float32_t * pResult);
6077 
6086  void arm_power_q15(
6087  q15_t * pSrc,
6088  uint32_t blockSize,
6089  q63_t * pResult);
6090 
6099  void arm_power_q7(
6100  q7_t * pSrc,
6101  uint32_t blockSize,
6102  q31_t * pResult);
6103 
6112  void arm_mean_q7(
6113  q7_t * pSrc,
6114  uint32_t blockSize,
6115  q7_t * pResult);
6116 
6124  void arm_mean_q15(
6125  q15_t * pSrc,
6126  uint32_t blockSize,
6127  q15_t * pResult);
6128 
6136  void arm_mean_q31(
6137  q31_t * pSrc,
6138  uint32_t blockSize,
6139  q31_t * pResult);
6140 
6148  void arm_mean_f32(
6149  float32_t * pSrc,
6150  uint32_t blockSize,
6151  float32_t * pResult);
6152 
6161  void arm_var_f32(
6162  float32_t * pSrc,
6163  uint32_t blockSize,
6164  float32_t * pResult);
6165 
6174  void arm_var_q31(
6175  q31_t * pSrc,
6176  uint32_t blockSize,
6177  q63_t * pResult);
6178 
6187  void arm_var_q15(
6188  q15_t * pSrc,
6189  uint32_t blockSize,
6190  q31_t * pResult);
6191 
6200  void arm_rms_f32(
6201  float32_t * pSrc,
6202  uint32_t blockSize,
6203  float32_t * pResult);
6204 
6213  void arm_rms_q31(
6214  q31_t * pSrc,
6215  uint32_t blockSize,
6216  q31_t * pResult);
6217 
6226  void arm_rms_q15(
6227  q15_t * pSrc,
6228  uint32_t blockSize,
6229  q15_t * pResult);
6230 
6239  void arm_std_f32(
6240  float32_t * pSrc,
6241  uint32_t blockSize,
6242  float32_t * pResult);
6243 
6252  void arm_std_q31(
6253  q31_t * pSrc,
6254  uint32_t blockSize,
6255  q31_t * pResult);
6256 
6265  void arm_std_q15(
6266  q15_t * pSrc,
6267  uint32_t blockSize,
6268  q15_t * pResult);
6269 
6278  void arm_cmplx_mag_f32(
6279  float32_t * pSrc,
6280  float32_t * pDst,
6281  uint32_t numSamples);
6282 
6291  void arm_cmplx_mag_q31(
6292  q31_t * pSrc,
6293  q31_t * pDst,
6294  uint32_t numSamples);
6295 
6304  void arm_cmplx_mag_q15(
6305  q15_t * pSrc,
6306  q15_t * pDst,
6307  uint32_t numSamples);
6308 
6320  q15_t * pSrcA,
6321  q15_t * pSrcB,
6322  uint32_t numSamples,
6323  q31_t * realResult,
6324  q31_t * imagResult);
6325 
6337  q31_t * pSrcA,
6338  q31_t * pSrcB,
6339  uint32_t numSamples,
6340  q63_t * realResult,
6341  q63_t * imagResult);
6342 
6354  float32_t * pSrcA,
6355  float32_t * pSrcB,
6356  uint32_t numSamples,
6357  float32_t * realResult,
6358  float32_t * imagResult);
6359 
6370  q15_t * pSrcCmplx,
6371  q15_t * pSrcReal,
6372  q15_t * pCmplxDst,
6373  uint32_t numSamples);
6374 
6385  q31_t * pSrcCmplx,
6386  q31_t * pSrcReal,
6387  q31_t * pCmplxDst,
6388  uint32_t numSamples);
6389 
6400  float32_t * pSrcCmplx,
6401  float32_t * pSrcReal,
6402  float32_t * pCmplxDst,
6403  uint32_t numSamples);
6404 
6414  void arm_min_q7(
6415  q7_t * pSrc,
6416  uint32_t blockSize,
6417  q7_t * result,
6418  uint32_t * index);
6419 
6429  void arm_min_q15(
6430  q15_t * pSrc,
6431  uint32_t blockSize,
6432  q15_t * pResult,
6433  uint32_t * pIndex);
6434 
6443  void arm_min_q31(
6444  q31_t * pSrc,
6445  uint32_t blockSize,
6446  q31_t * pResult,
6447  uint32_t * pIndex);
6448 
6458  void arm_min_f32(
6459  float32_t * pSrc,
6460  uint32_t blockSize,
6461  float32_t * pResult,
6462  uint32_t * pIndex);
6463 
6473  void arm_max_q7(
6474  q7_t * pSrc,
6475  uint32_t blockSize,
6476  q7_t * pResult,
6477  uint32_t * pIndex);
6478 
6488  void arm_max_q15(
6489  q15_t * pSrc,
6490  uint32_t blockSize,
6491  q15_t * pResult,
6492  uint32_t * pIndex);
6493 
6503  void arm_max_q31(
6504  q31_t * pSrc,
6505  uint32_t blockSize,
6506  q31_t * pResult,
6507  uint32_t * pIndex);
6508 
6518  void arm_max_f32(
6519  float32_t * pSrc,
6520  uint32_t blockSize,
6521  float32_t * pResult,
6522  uint32_t * pIndex);
6523 
6534  q15_t * pSrcA,
6535  q15_t * pSrcB,
6536  q15_t * pDst,
6537  uint32_t numSamples);
6538 
6549  q31_t * pSrcA,
6550  q31_t * pSrcB,
6551  q31_t * pDst,
6552  uint32_t numSamples);
6553 
6564  float32_t * pSrcA,
6565  float32_t * pSrcB,
6566  float32_t * pDst,
6567  uint32_t numSamples);
6568 
6576  void arm_float_to_q31(
6577  float32_t * pSrc,
6578  q31_t * pDst,
6579  uint32_t blockSize);
6580 
6588  void arm_float_to_q15(
6589  float32_t * pSrc,
6590  q15_t * pDst,
6591  uint32_t blockSize);
6592 
6600  void arm_float_to_q7(
6601  float32_t * pSrc,
6602  q7_t * pDst,
6603  uint32_t blockSize);
6604 
6605 
6613  void arm_q31_to_q15(
6614  q31_t * pSrc,
6615  q15_t * pDst,
6616  uint32_t blockSize);
6617 
6625  void arm_q31_to_q7(
6626  q31_t * pSrc,
6627  q7_t * pDst,
6628  uint32_t blockSize);
6629 
6637  void arm_q15_to_float(
6638  q15_t * pSrc,
6639  float32_t * pDst,
6640  uint32_t blockSize);
6641 
6642 
6650  void arm_q15_to_q31(
6651  q15_t * pSrc,
6652  q31_t * pDst,
6653  uint32_t blockSize);
6654 
6655 
6663  void arm_q15_to_q7(
6664  q15_t * pSrc,
6665  q7_t * pDst,
6666  uint32_t blockSize);
6667 
6668 
6740  static __INLINE float32_t arm_bilinear_interp_f32(
6742  float32_t X,
6743  float32_t Y)
6744  {
6745  float32_t out;
6746  float32_t f00, f01, f10, f11;
6747  float32_t *pData = S->pData;
6748  int32_t xIndex, yIndex, index;
6749  float32_t xdiff, ydiff;
6750  float32_t b1, b2, b3, b4;
6751 
6752  xIndex = (int32_t) X;
6753  yIndex = (int32_t) Y;
6754 
6755  /* Care taken for table outside boundary */
6756  /* Returns zero output when values are outside table boundary */
6757  if(xIndex < 0 || xIndex > (S->numRows-1) || yIndex < 0 || yIndex > ( S->numCols-1))
6758  {
6759  return(0);
6760  }
6761 
6762  /* Calculation of index for two nearest points in X-direction */
6763  index = (xIndex - 1) + (yIndex-1) * S->numCols ;
6764 
6765 
6766  /* Read two nearest points in X-direction */
6767  f00 = pData[index];
6768  f01 = pData[index + 1];
6769 
6770  /* Calculation of index for two nearest points in Y-direction */
6771  index = (xIndex-1) + (yIndex) * S->numCols;
6772 
6773 
6774  /* Read two nearest points in Y-direction */
6775  f10 = pData[index];
6776  f11 = pData[index + 1];
6777 
6778  /* Calculation of intermediate values */
6779  b1 = f00;
6780  b2 = f01 - f00;
6781  b3 = f10 - f00;
6782  b4 = f00 - f01 - f10 + f11;
6783 
6784  /* Calculation of fractional part in X */
6785  xdiff = X - xIndex;
6786 
6787  /* Calculation of fractional part in Y */
6788  ydiff = Y - yIndex;
6789 
6790  /* Calculation of bi-linear interpolated output */
6791  out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
6792 
6793  /* return to application */
6794  return (out);
6795 
6796  }
6797 
6807  static __INLINE q31_t arm_bilinear_interp_q31(
6809  q31_t X,
6810  q31_t Y)
6811  {
6812  q31_t out; /* Temporary output */
6813  q31_t acc = 0; /* output */
6814  q31_t xfract, yfract; /* X, Y fractional parts */
6815  q31_t x1, x2, y1, y2; /* Nearest output values */
6816  int32_t rI, cI; /* Row and column indices */
6817  q31_t *pYData = S->pData; /* pointer to output table values */
6818  uint32_t nCols = S->numCols; /* num of rows */
6819 
6820 
6821  /* Input is in 12.20 format */
6822  /* 12 bits for the table index */
6823  /* Index value calculation */
6824  rI = ((X & 0xFFF00000) >> 20u);
6825 
6826  /* Input is in 12.20 format */
6827  /* 12 bits for the table index */
6828  /* Index value calculation */
6829  cI = ((Y & 0xFFF00000) >> 20u);
6830 
6831  /* Care taken for table outside boundary */
6832  /* Returns zero output when values are outside table boundary */
6833  if(rI < 0 || rI > (S->numRows-1) || cI < 0 || cI > ( S->numCols-1))
6834  {
6835  return(0);
6836  }
6837 
6838  /* 20 bits for the fractional part */
6839  /* shift left xfract by 11 to keep 1.31 format */
6840  xfract = (X & 0x000FFFFF) << 11u;
6841 
6842  /* Read two nearest output values from the index */
6843  x1 = pYData[(rI) + nCols * (cI)];
6844  x2 = pYData[(rI) + nCols * (cI) + 1u];
6845 
6846  /* 20 bits for the fractional part */
6847  /* shift left yfract by 11 to keep 1.31 format */
6848  yfract = (Y & 0x000FFFFF) << 11u;
6849 
6850  /* Read two nearest output values from the index */
6851  y1 = pYData[(rI) + nCols * (cI + 1)];
6852  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
6853 
6854  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
6855  out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
6856  acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
6857 
6858  /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
6859  out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
6860  acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
6861 
6862  /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
6863  out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
6864  acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
6865 
6866  /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
6867  out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
6868  acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
6869 
6870  /* Convert acc to 1.31(q31) format */
6871  return (acc << 2u);
6872 
6873  }
6874 
6883  static __INLINE q15_t arm_bilinear_interp_q15(
6885  q31_t X,
6886  q31_t Y)
6887  {
6888  q63_t acc = 0; /* output */
6889  q31_t out; /* Temporary output */
6890  q15_t x1, x2, y1, y2; /* Nearest output values */
6891  q31_t xfract, yfract; /* X, Y fractional parts */
6892  int32_t rI, cI; /* Row and column indices */
6893  q15_t *pYData = S->pData; /* pointer to output table values */
6894  uint32_t nCols = S->numCols; /* num of rows */
6895 
6896  /* Input is in 12.20 format */
6897  /* 12 bits for the table index */
6898  /* Index value calculation */
6899  rI = ((X & 0xFFF00000) >> 20);
6900 
6901  /* Input is in 12.20 format */
6902  /* 12 bits for the table index */
6903  /* Index value calculation */
6904  cI = ((Y & 0xFFF00000) >> 20);
6905 
6906  /* Care taken for table outside boundary */
6907  /* Returns zero output when values are outside table boundary */
6908  if(rI < 0 || rI > (S->numRows-1) || cI < 0 || cI > ( S->numCols-1))
6909  {
6910  return(0);
6911  }
6912 
6913  /* 20 bits for the fractional part */
6914  /* xfract should be in 12.20 format */
6915  xfract = (X & 0x000FFFFF);
6916 
6917  /* Read two nearest output values from the index */
6918  x1 = pYData[(rI) + nCols * (cI)];
6919  x2 = pYData[(rI) + nCols * (cI) + 1u];
6920 
6921 
6922  /* 20 bits for the fractional part */
6923  /* yfract should be in 12.20 format */
6924  yfract = (Y & 0x000FFFFF);
6925 
6926  /* Read two nearest output values from the index */
6927  y1 = pYData[(rI) + nCols * (cI + 1)];
6928  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
6929 
6930  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
6931 
6932  /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
6933  /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
6934  out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
6935  acc = ((q63_t) out * (0xFFFFF - yfract));
6936 
6937  /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
6938  out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
6939  acc += ((q63_t) out * (xfract));
6940 
6941  /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
6942  out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
6943  acc += ((q63_t) out * (yfract));
6944 
6945  /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
6946  out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
6947  acc += ((q63_t) out * (yfract));
6948 
6949  /* acc is in 13.51 format and down shift acc by 36 times */
6950  /* Convert out to 1.15 format */
6951  return (acc >> 36);
6952 
6953  }
6954 
6963  static __INLINE q7_t arm_bilinear_interp_q7(
6965  q31_t X,
6966  q31_t Y)
6967  {
6968  q63_t acc = 0; /* output */
6969  q31_t out; /* Temporary output */
6970  q31_t xfract, yfract; /* X, Y fractional parts */
6971  q7_t x1, x2, y1, y2; /* Nearest output values */
6972  int32_t rI, cI; /* Row and column indices */
6973  q7_t *pYData = S->pData; /* pointer to output table values */
6974  uint32_t nCols = S->numCols; /* num of rows */
6975 
6976  /* Input is in 12.20 format */
6977  /* 12 bits for the table index */
6978  /* Index value calculation */
6979  rI = ((X & 0xFFF00000) >> 20);
6980 
6981  /* Input is in 12.20 format */
6982  /* 12 bits for the table index */
6983  /* Index value calculation */
6984  cI = ((Y & 0xFFF00000) >> 20);
6985 
6986  /* Care taken for table outside boundary */
6987  /* Returns zero output when values are outside table boundary */
6988  if(rI < 0 || rI > (S->numRows-1) || cI < 0 || cI > ( S->numCols-1))
6989  {
6990  return(0);
6991  }
6992 
6993  /* 20 bits for the fractional part */
6994  /* xfract should be in 12.20 format */
6995  xfract = (X & 0x000FFFFF);
6996 
6997  /* Read two nearest output values from the index */
6998  x1 = pYData[(rI) + nCols * (cI)];
6999  x2 = pYData[(rI) + nCols * (cI) + 1u];
7000 
7001 
7002  /* 20 bits for the fractional part */
7003  /* yfract should be in 12.20 format */
7004  yfract = (Y & 0x000FFFFF);
7005 
7006  /* Read two nearest output values from the index */
7007  y1 = pYData[(rI) + nCols * (cI + 1)];
7008  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
7009 
7010  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
7011  out = ((x1 * (0xFFFFF - xfract)));
7012  acc = (((q63_t) out * (0xFFFFF - yfract)));
7013 
7014  /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
7015  out = ((x2 * (0xFFFFF - yfract)));
7016  acc += (((q63_t) out * (xfract)));
7017 
7018  /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
7019  out = ((y1 * (0xFFFFF - xfract)));
7020  acc += (((q63_t) out * (yfract)));
7021 
7022  /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
7023  out = ((y2 * (yfract)));
7024  acc += (((q63_t) out * (xfract)));
7025 
7026  /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
7027  return (acc >> 40);
7028 
7029  }
7030 
7040 #ifdef __cplusplus
7041 }
7042 #endif
7043 
7044 
7045 #endif /* _ARM_MATH_H */
7046 
7047 
q31_t normalize
Definition: arm_math.h:2345
arm_status arm_mat_sub_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix subtraction.
Definition: arm_mat_sub_q31.c:62
void arm_biquad_cascade_df2T_f32(const arm_biquad_cascade_df2T_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_biquad_cascade_df2T_f32.c:143
uint8_t bitReverseFlag
Definition: arm_math.h:1923
float32_t * pState
Definition: arm_math.h:1198
uint8_t bitReverseFlagR
Definition: arm_math.h:2161
float32_t * pCoeffs
Definition: arm_math.h:4324
void arm_fir_interpolate_f32(const arm_fir_interpolate_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR interpolator.
Definition: arm_fir_interpolate_f32.c:135
float32_t * pCoeffs
Definition: arm_math.h:3590
q31_t energy
Definition: arm_math.h:4113
void arm_offset_q15(q15_t *pSrc, q15_t offset, q15_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q15 vector.
Definition: arm_offset_q15.c:58
arm_status arm_mat_trans_q31(const arm_matrix_instance_q31 *pSrc, arm_matrix_instance_q31 *pDst)
Q31 matrix transpose.
Definition: arm_mat_trans_q31.c:55
void arm_cmplx_mag_squared_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude squared.
Definition: arm_cmplx_mag_squared_q31.c:55
void arm_copy_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Copies the elements of a Q7 vector.
Definition: arm_copy_q7.c:53
uint8_t postShift
Definition: arm_math.h:4111
void arm_dot_prod_q7(q7_t *pSrcA, q7_t *pSrcB, uint32_t blockSize, q31_t *result)
Dot product of Q7 vectors.
Definition: arm_dot_prod_q7.c:61
void arm_fir_q15(const arm_fir_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR filter.
Definition: arm_fir_q15.c:68
arm_status arm_sqrt_q15(q15_t in, q15_t *pOut)
Q15 square root function.
Definition: arm_sqrt_q15.c:51
uint16_t twidCoefModifier
Definition: arm_math.h:1911
q15_t * pState
Definition: arm_math.h:1173
uint16_t numStages
Definition: arm_math.h:3778
float32_t * pState
Definition: arm_math.h:3779
Instance structure for the Q31 sparse FIR filter.
Definition: arm_math.h:4333
void arm_std_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Standard deviation of the elements of a Q31 vector.
Definition: arm_std_q31.c:66
float32_t * pState
Definition: arm_math.h:4056
void arm_cmplx_conj_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex conjugate.
Definition: arm_cmplx_conj_q15.c:54
void arm_cmplx_mult_real_f32(float32_t *pSrcCmplx, float32_t *pSrcReal, float32_t *pCmplxDst, uint32_t numSamples)
Floating-point complex-by-real multiplication.
Definition: arm_cmplx_mult_real_f32.c:74
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1805
uint16_t numStages
Definition: arm_math.h:3644
void arm_fir_fast_q31(const arm_fir_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
Definition: arm_fir_fast_q31.c:66
arm_status arm_rfft_init_f32(arm_rfft_instance_f32 *S, arm_cfft_radix4_instance_f32 *S_CFFT, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
Initialization function for the floating-point RFFT/RIFFT.
Definition: arm_rfft_init_f32.c:1638
q15_t A0
Definition: arm_math.h:1666
q15_t * pData
Definition: arm_math.h:1809
float32_t * pState
Definition: arm_math.h:3589
q31_t * recipTable
Definition: arm_math.h:4112
void arm_conv_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences.
Definition: arm_conv_q15.c:68
Instance structure for the floating-point FIR filter.
Definition: arm_math.h:1006
void arm_cmplx_mag_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude.
Definition: arm_cmplx_mag_q31.c:54
q31_t * pState
Definition: arm_math.h:999
void arm_rms_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Root Mean Square of the elements of a Q31 vector.
Definition: arm_rms_q31.c:62
float32_t A0
Definition: arm_math.h:1699
void arm_q7_to_q31(q7_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q31 vector.
Definition: arm_q7_to_q31.c:59
q15_t * pState
Definition: arm_math.h:3947
float32_t Kp
Definition: arm_math.h:1703
q15_t Ki
Definition: arm_math.h:1675
void arm_fir_sparse_q15(arm_fir_sparse_instance_q15 *S, q15_t *pSrc, q15_t *pDst, q15_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q15 sparse FIR filter.
Definition: arm_fir_sparse_q15.c:60
uint16_t fftLen
Definition: arm_math.h:1906
uint8_t ifftFlagR
Definition: arm_math.h:2176
void arm_fir_lattice_q15(const arm_fir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR lattice filter.
Definition: arm_fir_lattice_q15.c:54
uint8_t L
Definition: arm_math.h:3397
q15_t * pCoeffs
Definition: arm_math.h:4352
Instance structure for the floating-point Biquad cascade filter.
Definition: arm_math.h:1195
float32_t * pvCoeffs
Definition: arm_math.h:3781
void arm_sin_cos_q31(q31_t theta, q31_t *pSinVal, q31_t *pCosVal)
Q31 sin_cos function.
Definition: arm_sin_cos_q31.c:264
uint16_t numTaps
Definition: arm_math.h:4107
void arm_cmplx_dot_prod_q31(q31_t *pSrcA, q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult)
Q31 complex dot product.
Definition: arm_cmplx_dot_prod_q31.c:60
void arm_fir_f32(const arm_fir_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR filter.
Definition: arm_fir_f32.c:128
uint16_t numTaps
Definition: arm_math.h:4055
void arm_offset_q31(q31_t *pSrc, q31_t offset, q31_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q31 vector.
Definition: arm_offset_q31.c:58
q31_t * pCoeffs
Definition: arm_math.h:1000
q15_t mu
Definition: arm_math.h:4166
arm_status arm_conv_partial_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_conv_partial_fast_q15.c:56
void arm_correlate_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_correlate_fast_q31.c:70
Instance structure for the high precision Q31 Biquad cascade filter.
Definition: arm_math.h:3539
void arm_scale_q31(q31_t *pSrc, q31_t scaleFract, int8_t shift, q31_t *pDst, uint32_t blockSize)
Multiplies a Q31 vector by a scalar.
Definition: arm_scale_q31.c:59
void arm_cmplx_mult_real_q31(q31_t *pSrcCmplx, q31_t *pSrcReal, q31_t *pCmplxDst, uint32_t numSamples)
Q31 complex-by-real multiplication.
Definition: arm_cmplx_mult_real_q31.c:56
void arm_biquad_cascade_df1_init_q31(arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, q31_t *pCoeffs, q31_t *pState, int8_t postShift)
Initialization function for the Q31 Biquad cascade filter.
Definition: arm_biquad_cascade_df1_init_q31.c:81
arm_status arm_fir_decimate_init_f32(arm_fir_decimate_instance_f32 *S, uint16_t numTaps, uint8_t M, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR decimator.
Definition: arm_fir_decimate_init_f32.c:67
void arm_var_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Variance of the elements of a floating-point vector.
Definition: arm_var_f32.c:69
void arm_lms_norm_q31(arm_lms_norm_instance_q31 *S, q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 normalized LMS filter.
Definition: arm_lms_norm_q31.c:72
void arm_fir_decimate_q15(const arm_fir_decimate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator.
Definition: arm_fir_decimate_q15.c:65
void arm_q7_to_q15(q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q15 vector.
Definition: arm_q7_to_q15.c:62
void arm_dct4_q31(const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer)
Processing function for the Q31 DCT4/IDCT4.
Definition: arm_dct4_q31.c:53
uint8_t L
Definition: arm_math.h:3409
uint8_t ifftFlagR
Definition: arm_math.h:2192
q63_t * pState
Definition: arm_math.h:3542
uint16_t maxDelay
Definition: arm_math.h:4339
arm_cfft_radix4_instance_q31 * pCfft
Definition: arm_math.h:2349
q31_t * pData
Definition: arm_math.h:1364
void arm_fir_init_q31(arm_fir_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR filter.
Definition: arm_fir_init_q31.c:68
uint16_t Nby2
Definition: arm_math.h:2344
void arm_abs_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Q15 vector absolute value.
Definition: arm_abs_q15.c:57
void arm_correlate_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences.
Definition: arm_correlate_q31.c:71
void arm_fill_q31(q31_t value, q31_t *pDst, uint32_t blockSize)
Fills a constant value into a Q31 vector.
Definition: arm_fill_q31.c:53
void arm_copy_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Copies the elements of a Q15 vector.
Definition: arm_copy_q15.c:52
Instance structure for the Q15 RFFT/RIFFT function.
Definition: arm_math.h:2156
void arm_add_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector addition.
Definition: arm_add_q31.c:59
q31_t * pTwiddleBReal
Definition: arm_math.h:2180
Instance structure for the Q7 FIR filter.
Definition: arm_math.h:976
void arm_biquad_cascade_df1_fast_q31(const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-...
Definition: arm_biquad_cascade_df1_fast_q31.c:70
float32_t Ki
Definition: arm_math.h:1704
void arm_cmplx_mult_real_q15(q15_t *pSrcCmplx, q15_t *pSrcReal, q15_t *pCmplxDst, uint32_t numSamples)
Q15 complex-by-real multiplication.
Definition: arm_cmplx_mult_real_q15.c:56
q31_t * pState
Definition: arm_math.h:3645
float32_t * pCoeffs
Definition: arm_math.h:3423
q15_t * recipTable
Definition: arm_math.h:4168
Instance structure for the Q15 LMS filter.
Definition: arm_math.h:3944
void arm_add_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector addition.
Definition: arm_add_q7.c:58
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:1919
float32_t * pCoeffs
Definition: arm_math.h:3898
void arm_cmplx_mult_cmplx_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t numSamples)
Floating-point complex-by-complex multiplication.
Definition: arm_cmplx_mult_cmplx_f32.c:73
arm_status arm_mat_add_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix addition.
Definition: arm_mat_add_q31.c:61
arm_status arm_mat_add_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst)
Q15 matrix addition.
Definition: arm_mat_add_q15.c:61
void arm_float_to_q15(float32_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q15 vector.
Definition: arm_float_to_q15.c:65
arm_status arm_conv_partial_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences.
Definition: arm_conv_partial_q31.c:59
Instance structure for the Q15 FIR lattice filter.
Definition: arm_math.h:3631
uint16_t numTaps
Definition: arm_math.h:3229
float32_t x0
Definition: arm_math.h:4060
void arm_pid_init_q15(arm_pid_instance_q15 *S, int32_t resetStateFlag)
Initialization function for the Q15 PID Control.
Definition: arm_pid_init_q15.c:50
void arm_cmplx_mult_cmplx_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t numSamples)
Q31 complex-by-complex multiplication.
Definition: arm_cmplx_mult_cmplx_q31.c:56
q7_t * pCoeffs
Definition: arm_math.h:980
uint16_t stateIndex
Definition: arm_math.h:4322
void arm_conv_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_conv_fast_q15.c:66
void arm_q7_to_float(q7_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to floating-point vector.
Definition: arm_q7_to_float.c:63
q31_t * pCoeffs
Definition: arm_math.h:4338
void arm_rfft_q31(const arm_rfft_instance_q31 *S, q31_t *pSrc, q31_t *pDst)
Processing function for the Q31 RFFT/RIFFT.
Definition: arm_rfft_q31.c:80
void arm_rms_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Root Mean Square of the elements of a floating-point vector.
Definition: arm_rms_f32.c:65
arm_status arm_mat_mult_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pState)
Q15 matrix multiplication.
Definition: arm_mat_mult_q15.c:74
uint16_t numTaps
Definition: arm_math.h:3217
Instance structure for the Q31 FIR interpolator.
Definition: arm_math.h:3407
float32_t * pCoeffs
Definition: arm_math.h:1010
arm_status arm_mat_add_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix addition.
Definition: arm_mat_add_f32.c:68
q31_t * pState
Definition: arm_math.h:3768
void arm_abs_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Q7 vector absolute value.
Definition: arm_abs_q7.c:57
uint16_t fftLen
Definition: arm_math.h:1921
float32_t * pData
Definition: arm_math.h:1787
void arm_correlate_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_correlate_fast_q15.c:66
uint8_t M
Definition: arm_math.h:3241
uint16_t numTaps
Definition: arm_math.h:4363
q31_t state[3]
Definition: arm_math.h:1687
Instance structure for the floating-point DCT4/IDCT4 function.
Definition: arm_math.h:2294
uint8_t numStages
Definition: arm_math.h:3588
void arm_lms_norm_init_q15(arm_lms_norm_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint8_t postShift)
Initialization function for Q15 normalized LMS filter.
Definition: arm_lms_norm_init_q15.c:64
q15_t Kp
Definition: arm_math.h:1674
void arm_correlate_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Correlation of floating-point sequences.
Definition: arm_correlate_f32.c:95
Instance structure for the Q15 normalized LMS filter.
Definition: arm_math.h:4161
arm_status arm_fir_interpolate_init_f32(arm_fir_interpolate_instance_f32 *S, uint8_t L, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR interpolator.
Definition: arm_fir_interpolate_init_f32.c:68
q15_t * pCoeffs
Definition: arm_math.h:3399
q31_t * pState
Definition: arm_math.h:4002
uint16_t Nby2
Definition: arm_math.h:2391
arm_status arm_cfft_radix4_init_f32(arm_cfft_radix4_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
Initialization function for the floating-point CFFT/CIFFT.
Definition: arm_cfft_radix4_init_f32.c:1463
float32_t * pkCoeffs
Definition: arm_math.h:3780
float32_t * pCoeffs
Definition: arm_math.h:3657
void arm_cmplx_dot_prod_f32(float32_t *pSrcA, float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult)
Floating-point complex dot product.
Definition: arm_cmplx_dot_prod_f32.c:77
int8_t postShift
Definition: arm_math.h:1175
uint16_t stateIndex
Definition: arm_math.h:4350
void arm_lms_init_q15(arm_lms_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint32_t postShift)
Initialization function for the Q15 LMS filter.
Definition: arm_lms_init_q15.c:66
void arm_fir_q31(const arm_fir_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR filter.
Definition: arm_fir_q31.c:67
void arm_biquad_cascade_df1_f32(const arm_biquad_casd_df1_inst_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point Biquad cascade filter.
Definition: arm_biquad_cascade_df1_f32.c:171
q31_t arm_sin_q31(q31_t x)
Fast approximation to the trigonometric sine function for Q31 data.
Definition: arm_sin_q31.c:136
void arm_biquad_cascade_df1_fast_q15(const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-...
Definition: arm_biquad_cascade_df1_fast_q15.c:69
q15_t state[3]
Definition: arm_math.h:1673
Instance structure for the Q15 sparse FIR filter.
Definition: arm_math.h:4347
arm_status arm_fir_decimate_init_q31(arm_fir_decimate_instance_q31 *S, uint16_t numTaps, uint8_t M, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR decimator.
Definition: arm_fir_decimate_init_q31.c:67
void arm_pid_init_q31(arm_pid_instance_q31 *S, int32_t resetStateFlag)
Initialization function for the Q31 PID Control.
Definition: arm_pid_init_q31.c:50
arm_status arm_fir_init_q15(arm_fir_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR filter.
Definition: arm_fir_init_q15.c:85
void arm_lms_q31(const arm_lms_instance_q31 *S, q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 LMS filter.
Definition: arm_lms_q31.c:69
void arm_negate_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Negates the elements of a Q15 vector.
Definition: arm_negate_q15.c:57
uint32_t fftLenBy2
Definition: arm_math.h:2159
void arm_max_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Maximum value of a Q15 vector.
Definition: arm_max_q15.c:51
q31_t * pState
Definition: arm_math.h:3412
void arm_mult_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector multiplication.
Definition: arm_mult_q7.c:64
uint16_t bitRevFactor
Definition: arm_math.h:1912
Instance structure for the floating-point PID Control.
Definition: arm_math.h:1697
uint16_t bitRevFactor
Definition: arm_math.h:1897
Instance structure for the Q31 FIR decimator.
Definition: arm_math.h:3226
void arm_power_q7(q7_t *pSrc, uint32_t blockSize, q31_t *pResult)
Sum of the squares of the elements of a Q7 vector.
Definition: arm_power_q7.c:62
void arm_power_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Sum of the squares of the elements of a floating-point vector.
Definition: arm_power_f32.c:68
arm_status arm_cfft_radix4_init_q31(arm_cfft_radix4_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
Initialization function for the Q31 CFFT/CIFFT.
Definition: arm_cfft_radix4_init_q31.c:1124
void arm_mult_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector multiplication.
Definition: arm_mult_q15.c:62
uint8_t L
Definition: arm_math.h:3421
void arm_sub_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector subtraction.
Definition: arm_sub_f32.c:66
uint16_t numStages
Definition: arm_math.h:3655
uint16_t fftLenBy2
Definition: arm_math.h:2191
uint32_t twidCoefRModifier
Definition: arm_math.h:2178
arm_rfft_instance_q31 * pRfft
Definition: arm_math.h:2348
float32_t * pState
Definition: arm_math.h:1009
void arm_pid_reset_q31(arm_pid_instance_q31 *S)
Reset function for the Q31 PID Control.
Definition: arm_pid_reset_q31.c:44
Instance structure for the Q15 matrix structure.
Definition: arm_math.h:1348
void arm_dot_prod_q15(q15_t *pSrcA, q15_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q15 vectors.
Definition: arm_dot_prod_q15.c:61
void arm_min_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Minimum value of a Q31 vector.
Definition: arm_min_q31.c:53
Instance structure for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_math.h:3586
q31_t * pCoeffs
Definition: arm_math.h:3543
void arm_mat_init_q31(arm_matrix_instance_q31 *S, uint16_t nRows, uint16_t nColumns, q31_t *pData)
Q31 matrix initialization.
Definition: arm_mat_init_q31.c:61
CMSIS Cortex-M3 Core Peripheral Access Layer Header File.
uint16_t numTaps
Definition: arm_math.h:988
void arm_rms_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Root Mean Square of the elements of a Q15 vector.
Definition: arm_rms_q15.c:59
float32_t * pState
Definition: arm_math.h:3897
arm_status arm_rfft_init_q15(arm_rfft_instance_q15 *S, arm_cfft_radix4_instance_q15 *S_CFFT, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
Initialization function for the Q15 RFFT/RIFFT.
Definition: arm_rfft_init_q15.c:620
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1816
void arm_fir_decimate_q31(const arm_fir_decimate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator.
Definition: arm_fir_decimate_q31.c:64
q15_t * pTwiddle
Definition: arm_math.h:2393
void arm_shift_q15(q15_t *pSrc, int8_t shiftBits, q15_t *pDst, uint32_t blockSize)
Shifts the elements of a Q15 vector a specified number of bits.
Definition: arm_shift_q15.c:58
arm_status arm_conv_partial_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q15 sequences.
Definition: arm_conv_partial_q15.c:60
void arm_fir_sparse_init_q7(arm_fir_sparse_instance_q7 *S, uint16_t numTaps, q7_t *pCoeffs, q7_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q7 sparse FIR filter.
Definition: arm_fir_sparse_init_q7.c:65
void arm_iir_lattice_f32(const arm_iir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point IIR lattice filter.
Definition: arm_iir_lattice_f32.c:120
void arm_mult_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector multiplication.
Definition: arm_mult_f32.c:68
Instance structure for the floating-point RFFT/RIFFT function.
Definition: arm_math.h:2188
q31_t * pCoeffs
Definition: arm_math.h:3230
q15_t mu
Definition: arm_math.h:3949
uint8_t ifftFlagR
Definition: arm_math.h:2160
void arm_fir_lattice_init_f32(arm_fir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point FIR lattice filter.
Definition: arm_fir_lattice_init_f32.c:53
q31_t * pState
Definition: arm_math.h:3231
Instance structure for the floating-point LMS filter.
Definition: arm_math.h:3894
q15_t Kd
Definition: arm_math.h:1676
void arm_sub_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector subtraction.
Definition: arm_sub_q31.c:58
q31_t * pData
Definition: arm_math.h:1798
float32_t mu
Definition: arm_math.h:3899
uint16_t numTaps
Definition: arm_math.h:1008
void arm_fir_init_f32(arm_fir_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR filter.
Definition: arm_fir_init_f32.c:68
void arm_std_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Standard deviation of the elements of a floating-point vector.
Definition: arm_std_f32.c:69
arm_status arm_dct4_init_q31(arm_dct4_instance_q31 *S, arm_rfft_instance_q31 *S_RFFT, arm_cfft_radix4_instance_q31 *S_CFFT, uint16_t N, uint16_t Nby2, q31_t normalize)
Initialization function for the Q31 DCT4/IDCT4.
Definition: arm_dct4_init_q31.c:2133
void arm_pid_reset_q15(arm_pid_instance_q15 *S)
Reset function for the Q15 PID Control.
Definition: arm_pid_reset_q15.c:44
q15_t normalize
Definition: arm_math.h:2392
q15_t * pTwiddle
Definition: arm_math.h:1894
Instance structure for the floating-point FIR lattice filter.
Definition: arm_math.h:3653
q15_t * pCoeffs
Definition: arm_math.h:4165
Instance structure for the floating-point bilinear interpolation function.
Definition: arm_math.h:1783
void arm_fill_f32(float32_t value, float32_t *pDst, uint32_t blockSize)
Fills a constant value into a floating-point vector.
Definition: arm_fill_f32.c:66
q31_t * pvCoeffs
Definition: arm_math.h:3770
arm_status arm_fir_interpolate_init_q31(arm_fir_interpolate_instance_q31 *S, uint8_t L, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR interpolator.
Definition: arm_fir_interpolate_init_q31.c:69
void arm_q15_to_q7(q15_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q7 vector.
Definition: arm_q15_to_q7.c:60
void arm_cmplx_mag_squared_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude squared.
Definition: arm_cmplx_mag_squared_q15.c:53
int32_t * pTapDelay
Definition: arm_math.h:4340
q15_t * pkCoeffs
Definition: arm_math.h:3758
Instance structure for the Q15 FIR interpolator.
Definition: arm_math.h:3395
void arm_mean_q7(q7_t *pSrc, uint32_t blockSize, q7_t *pResult)
Mean value of a Q7 vector.
Definition: arm_mean_q7.c:61
q15_t * pState
Definition: arm_math.h:989
q31_t * pCoeffs
Definition: arm_math.h:1187
float32_t A1
Definition: arm_math.h:1700
void arm_cmplx_mag_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude.
Definition: arm_cmplx_mag_q15.c:54
void arm_lms_norm_q15(arm_lms_norm_instance_q15 *S, q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 normalized LMS filter.
Definition: arm_lms_norm_q15.c:71
int8_t numStages
Definition: arm_math.h:1172
float32_t arm_sin_f32(float32_t x)
Fast approximation to the trigonometric sine function for floating-point data.
Definition: arm_sin_f32.c:195
arm_status arm_conv_partial_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q7 sequences.
Definition: arm_conv_partial_q7.c:58
q15_t * pState
Definition: arm_math.h:3757
void arm_power_q15(q15_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q15 vector.
Definition: arm_power_q15.c:62
void arm_lms_q15(const arm_lms_instance_q15 *S, q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 LMS filter.
Definition: arm_lms_q15.c:66
arm_cfft_radix4_instance_q31 * pCfft
Definition: arm_math.h:2181
void arm_offset_f32(float32_t *pSrc, float32_t offset, float32_t *pDst, uint32_t blockSize)
Adds a constant offset to a floating-point vector.
Definition: arm_offset_f32.c:66
void arm_float_to_q7(float32_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q7 vector.
Definition: arm_float_to_q7.c:64
void arm_q15_to_float(q15_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to floating-point vector.
Definition: arm_q15_to_float.c:66
q7_t * pData
Definition: arm_math.h:1820
arm_status arm_mat_inverse_f32(const arm_matrix_instance_f32 *src, arm_matrix_instance_f32 *dst)
Floating-point matrix inverse.
Definition: arm_mat_inverse_f32.c:74
void arm_biquad_cascade_df1_init_f32(arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point Biquad cascade filter.
Definition: arm_biquad_cascade_df1_init_f32.c:83
arm_status arm_conv_partial_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of floating-point sequences.
Definition: arm_conv_partial_f32.c:74
q15_t arm_cos_q15(q15_t x)
Fast approximation to the trigonometric cosine function for Q15 data.
Definition: arm_cos_q15.c:105
q15_t * pCoeffs
Definition: arm_math.h:1174
void arm_fir_lattice_f32(const arm_fir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR lattice filter.
Definition: arm_fir_lattice_f32.c:121
void arm_cfft_radix4_q15(const arm_cfft_radix4_instance_q15 *S, q15_t *pSrc)
Processing function for the Q15 CFFT/CIFFT.
Definition: arm_cfft_radix4_q15.c:66
arm_status arm_mat_mult_fast_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
Definition: arm_mat_mult_fast_q31.c:72
q31_t A2
Definition: arm_math.h:1686
q15_t * pCoeffs
Definition: arm_math.h:990
uint16_t twidCoefModifier
Definition: arm_math.h:1926
void arm_correlate_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences.
Definition: arm_correlate_q15.c:68
uint32_t postShift
Definition: arm_math.h:4005
uint16_t fftLen
Definition: arm_math.h:1891
void arm_biquad_cas_df1_32x64_q31(const arm_biquad_cas_df1_32x64_ins_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Definition: arm_biquad_cascade_df1_32x64_q31.c:176
void arm_max_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Maximum value of a Q31 vector.
Definition: arm_max_q31.c:51
uint16_t maxDelay
Definition: arm_math.h:4353
void arm_conv_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_conv_fast_q31.c:68
q15_t energy
Definition: arm_math.h:4169
float32_t onebyfftLen
Definition: arm_math.h:1928
uint16_t numTaps
Definition: arm_math.h:4163
void arm_min_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Minimum value of a floating-point vector.
Definition: arm_min_f32.c:60
int32_t * pTapDelay
Definition: arm_math.h:4326
uint16_t * pBitRevTable
Definition: arm_math.h:1910
q31_t x0
Definition: arm_math.h:4114
Instance structure for the Q31 matrix structure.
Definition: arm_math.h:1360
float32_t normalize
Definition: arm_math.h:2298
float32_t * pTwiddle
Definition: arm_math.h:1924
Instance structure for the Q31 FIR filter.
Definition: arm_math.h:996
q31_t * pState
Definition: arm_math.h:4108
CMSIS Cortex-M4 Core Peripheral Access Layer Header File.
uint16_t numRows
Definition: arm_math.h:1350
float32_t * pData
Definition: arm_math.h:1341
uint16_t numTaps
Definition: arm_math.h:998
void arm_lms_f32(const arm_lms_instance_f32 *S, float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point LMS filter.
Definition: arm_lms_f32.c:170
void arm_fir_sparse_q7(arm_fir_sparse_instance_q7 *S, q7_t *pSrc, q7_t *pDst, q7_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q7 sparse FIR filter.
Definition: arm_fir_sparse_q7.c:65
q31_t * pkCoeffs
Definition: arm_math.h:3769
void arm_power_q31(q31_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q31 vector.
Definition: arm_power_q31.c:63
uint16_t N
Definition: arm_math.h:2343
arm_cfft_radix4_instance_q15 * pCfft
Definition: arm_math.h:2165
q7_t * pCoeffs
Definition: arm_math.h:4366
void arm_pid_reset_f32(arm_pid_instance_f32 *S)
Reset function for the floating-point PID Control.
Definition: arm_pid_reset_f32.c:44
float32_t mu
Definition: arm_math.h:4058
void arm_mean_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Mean value of a Q31 vector.
Definition: arm_mean_q31.c:61
float32_t * pState
Definition: arm_math.h:3656
void arm_cfft_radix4_f32(const arm_cfft_radix4_instance_f32 *S, float32_t *pSrc)
Processing function for the floating-point CFFT/CIFFT.
Definition: arm_cfft_radix4_f32.c:177
Instance structure for the floating-point matrix structure.
Definition: arm_math.h:1337
q15_t * pState
Definition: arm_math.h:3219
Instance structure for the Q31 Biquad cascade filter.
Definition: arm_math.h:1183
CMSIS Cortex-M0 Core Peripheral Access Layer Header File.
arm_status arm_dct4_init_f32(arm_dct4_instance_f32 *S, arm_rfft_instance_f32 *S_RFFT, arm_cfft_radix4_instance_f32 *S_CFFT, uint16_t N, uint16_t Nby2, float32_t normalize)
Initialization function for the floating-point DCT4/IDCT4.
Definition: arm_dct4_init_f32.c:4142
void arm_float_to_q31(float32_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q31 vector.
Definition: arm_float_to_q31.c:69
int32_t * pTapDelay
Definition: arm_math.h:4354
q31_t * pState
Definition: arm_math.h:4337
void arm_fill_q7(q7_t value, q7_t *pDst, uint32_t blockSize)
Fills a constant value into a Q7 vector.
Definition: arm_fill_q7.c:53
float32_t Kd
Definition: arm_math.h:1705
uint16_t numRows
Definition: arm_math.h:1362
void arm_fir_decimate_f32(const arm_fir_decimate_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR decimator.
Definition: arm_fir_decimate_f32.c:132
uint16_t numTaps
Definition: arm_math.h:978
void arm_negate_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Negates the elements of a Q31 vector.
Definition: arm_negate_q31.c:57
void arm_q15_to_q31(q15_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q31 vector.
Definition: arm_q15_to_q31.c:59
q15_t * pState
Definition: arm_math.h:3400
q31_t A0
Definition: arm_math.h:1684
float32_t A2
Definition: arm_math.h:1701
void arm_iir_lattice_q15(const arm_iir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 IIR lattice filter.
Definition: arm_iir_lattice_q15.c:63
void arm_scale_f32(float32_t *pSrc, float32_t scale, float32_t *pDst, uint32_t blockSize)
Multiplies a floating-point vector by a scalar.
Definition: arm_scale_f32.c:78
uint8_t postShift
Definition: arm_math.h:4167
q15_t * pData
Definition: arm_math.h:1352
arm_rfft_instance_q15 * pRfft
Definition: arm_math.h:2395
uint16_t numTaps
Definition: arm_math.h:3896
q31_t Kd
Definition: arm_math.h:1690
void arm_cmplx_conj_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex conjugate.
Definition: arm_cmplx_conj_q31.c:54
void arm_shift_q31(q31_t *pSrc, int8_t shiftBits, q31_t *pDst, uint32_t blockSize)
Shifts the elements of a Q31 vector a specified number of bits.
Definition: arm_shift_q31.c:73
uint32_t numStages
Definition: arm_math.h:1185
void arm_fir_interpolate_q31(const arm_fir_interpolate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR interpolator.
Definition: arm_fir_interpolate_q31.c:63
uint16_t * pBitRevTable
Definition: arm_math.h:1925
void arm_mat_init_q15(arm_matrix_instance_q15 *S, uint16_t nRows, uint16_t nColumns, q15_t *pData)
Q15 matrix initialization.
Definition: arm_mat_init_q15.c:57
uint16_t numCols
Definition: arm_math.h:1786
int32_t * pTapDelay
Definition: arm_math.h:4368
void arm_lms_norm_init_f32(arm_lms_norm_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize)
Initialization function for floating-point normalized LMS filter.
Definition: arm_lms_norm_init_f32.c:64
void arm_correlate_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Correlation of Q7 sequences.
Definition: arm_correlate_q7.c:65
float32_t * pTwiddle
Definition: arm_math.h:2299
q15_t * pCoeffs
Definition: arm_math.h:3635
arm_status arm_mat_sub_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix subtraction.
Definition: arm_mat_sub_f32.c:67
uint16_t N
Definition: arm_math.h:2390
void arm_conv_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Convolution of floating-point sequences.
Definition: arm_conv_f32.c:103
void arm_dct4_f32(const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer)
Processing function for the floating-point DCT4/IDCT4.
Definition: arm_dct4_f32.c:126
uint16_t numTaps
Definition: arm_math.h:3946
Instance structure for the floating-point normalized LMS filter.
Definition: arm_math.h:4053
q15_t * pCoeffs
Definition: arm_math.h:3218
Instance structure for the Q31 CFFT/CIFFT function.
Definition: arm_math.h:1904
uint8_t ifftFlag
Definition: arm_math.h:1907
q31_t Kp
Definition: arm_math.h:1688
void arm_scale_q15(q15_t *pSrc, q15_t scaleFract, int8_t shift, q15_t *pDst, uint32_t blockSize)
Multiplies a Q15 vector by a scalar.
Definition: arm_scale_q15.c:60
void arm_fir_decimate_fast_q31(arm_fir_decimate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
Definition: arm_fir_decimate_fast_q31.c:65
void arm_offset_q7(q7_t *pSrc, q7_t offset, q7_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q7 vector.
Definition: arm_offset_q7.c:58
void arm_mean_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Mean value of a Q15 vector.
Definition: arm_mean_q15.c:61
void arm_dot_prod_q31(q31_t *pSrcA, q31_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q31 vectors.
Definition: arm_dot_prod_q31.c:62
arm_status arm_mat_scale_q15(const arm_matrix_instance_q15 *pSrc, q15_t scaleFract, int32_t shift, arm_matrix_instance_q15 *pDst)
Q15 matrix scaling.
Definition: arm_mat_scale_q15.c:63
uint8_t bitReverseFlagR
Definition: arm_math.h:2177
void arm_conv_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Convolution of Q7 sequences.
Definition: arm_conv_q7.c:65
Instance structure for the floating-point sparse FIR filter.
Definition: arm_math.h:4319
void arm_max_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Maximum value of a floating-point vector.
Definition: arm_max_f32.c:59
uint16_t stateIndex
Definition: arm_math.h:4336
void arm_cmplx_mult_cmplx_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t numSamples)
Q15 complex-by-complex multiplication.
Definition: arm_cmplx_mult_cmplx_q15.c:54
void arm_rfft_f32(const arm_rfft_instance_f32 *S, float32_t *pSrc, float32_t *pDst)
Processing function for the floating-point RFFT/RIFFT.
Definition: arm_rfft_f32.c:150
void arm_rfft_q15(const arm_rfft_instance_q15 *S, q15_t *pSrc, q15_t *pDst)
Processing function for the Q15 RFFT/RIFFT.
Definition: arm_rfft_q15.c:80
arm_status arm_sqrt_q31(q31_t in, q31_t *pOut)
Q31 square root function.
Definition: arm_sqrt_q31.c:47
uint16_t numTaps
Definition: arm_math.h:4349
void arm_mean_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Mean value of a floating-point vector.
Definition: arm_mean_f32.c:64
Instance structure for the Q15 FIR decimator.
Definition: arm_math.h:3214
arm_status arm_cfft_radix4_init_q15(arm_cfft_radix4_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
Initialization function for the Q15 CFFT/CIFFT.
Definition: arm_cfft_radix4_init_q15.c:1122
void arm_abs_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Q31 vector absolute value.
Definition: arm_abs_q31.c:58
void arm_q31_to_q15(q31_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q15 vector.
Definition: arm_q31_to_q15.c:59
arm_status arm_mat_mult_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix multiplication.
Definition: arm_mat_mult_f32.c:73
uint16_t numTaps
Definition: arm_math.h:3242
q31_t * pState
Definition: arm_math.h:1186
uint16_t numRows
Definition: arm_math.h:1796
q15_t * pTwiddleAReal
Definition: arm_math.h:2163
arm_cfft_radix4_instance_q15 * pCfft
Definition: arm_math.h:2396
void arm_lms_norm_init_q31(arm_lms_norm_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint8_t postShift)
Initialization function for Q31 normalized LMS filter.
Definition: arm_lms_norm_init_q31.c:63
void arm_fir_sparse_init_q15(arm_fir_sparse_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q15 sparse FIR filter.
Definition: arm_fir_sparse_init_q15.c:65
Instance structure for the Q31 DCT4/IDCT4 function.
Definition: arm_math.h:2341
uint8_t postShift
Definition: arm_math.h:1188
void arm_q31_to_float(q31_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to floating-point vector.
Definition: arm_q31_to_float.c:63
float32_t * pState
Definition: arm_math.h:4323
void arm_fir_lattice_q31(const arm_fir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR lattice filter.
Definition: arm_fir_lattice_q31.c:58
uint32_t fftLenReal
Definition: arm_math.h:2190
q31_t arm_cos_q31(q31_t x)
Fast approximation to the trigonometric cosine function for Q31 data.
Definition: arm_cos_q31.c:136
Instance structure for the Q31 bilinear interpolation function.
Definition: arm_math.h:1794
void arm_copy_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Copies the elements of a floating-point vector.
Definition: arm_copy_f32.c:66
uint16_t maxDelay
Definition: arm_math.h:4367
arm_status arm_mat_mult_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix multiplication.
Definition: arm_mat_mult_q31.c:73
uint16_t numStages
Definition: arm_math.h:3756
uint16_t numTaps
Definition: arm_math.h:4335
q15_t * pState
Definition: arm_math.h:4164
Instance structure for the Q7 sparse FIR filter.
Definition: arm_math.h:4361
void arm_lms_init_q31(arm_lms_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint32_t postShift)
Initialization function for Q31 LMS filter.
Definition: arm_lms_init_q31.c:66
void arm_negate_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Negates the elements of a floating-point vector.
Definition: arm_negate_f32.c:62
void arm_fir_decimate_fast_q15(const arm_fir_decimate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
Definition: arm_fir_decimate_fast_q15.c:63
Instance structure for the Q31 PID Control.
Definition: arm_math.h:1682
float32_t * pState
Definition: arm_math.h:3424
q15_t * pvCoeffs
Definition: arm_math.h:3759
Instance structure for the Q15 FIR filter.
Definition: arm_math.h:986
void arm_fir_q7(const arm_fir_instance_q7 *S, q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Processing function for the Q7 FIR filter.
Definition: arm_fir_q7.c:64
uint16_t N
Definition: arm_math.h:2296
void arm_fir_sparse_q31(arm_fir_sparse_instance_q31 *S, q31_t *pSrc, q31_t *pDst, q31_t *pScratchIn, uint32_t blockSize)
Processing function for the Q31 sparse FIR filter.
Definition: arm_fir_sparse_q31.c:58
uint32_t fftLenBy2
Definition: arm_math.h:2175
q31_t Ki
Definition: arm_math.h:1689
void arm_biquad_cascade_df1_q15(const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 Biquad cascade filter.
Definition: arm_biquad_cascade_df1_q15.c:70
void arm_std_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Standard deviation of the elements of a Q15 vector.
Definition: arm_std_q15.c:62
void arm_biquad_cascade_df1_q31(const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 Biquad cascade filter.
Definition: arm_biquad_cascade_df1_q31.c:69
void arm_copy_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Copies the elements of a Q31 vector.
Definition: arm_copy_q31.c:53
Instance structure for the floating-point Linear Interpolate function.
Definition: arm_math.h:1771
void arm_add_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector addition.
Definition: arm_add_f32.c:65
uint16_t numTaps
Definition: arm_math.h:4321
Instance structure for the Q15 Biquad cascade filter.
Definition: arm_math.h:1170
uint16_t numCols
Definition: arm_math.h:1351
q15_t arm_sin_q15(q15_t x)
Fast approximation to the trigonometric sine function for Q15 data.
Definition: arm_sin_q15.c:106
float32_t * pTwiddleBReal
Definition: arm_math.h:2196
void arm_fir_sparse_init_q31(arm_fir_sparse_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q31 sparse FIR filter.
Definition: arm_fir_sparse_init_q31.c:64
arm_status arm_dct4_init_q15(arm_dct4_instance_q15 *S, arm_rfft_instance_q15 *S_RFFT, arm_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize)
Initialization function for the Q15 DCT4/IDCT4.
Definition: arm_dct4_init_q15.c:1125
q15_t * pState
Definition: arm_math.h:3634
q31_t A1
Definition: arm_math.h:1685
uint16_t phaseLength
Definition: arm_math.h:3398
arm_status arm_fir_interpolate_init_q15(arm_fir_interpolate_instance_q15 *S, uint8_t L, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR interpolator.
Definition: arm_fir_interpolate_init_q15.c:68
void arm_biquad_cascade_df2T_init_f32(arm_biquad_cascade_df2T_instance_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_biquad_cascade_df2T_init_f32.c:73
void arm_cfft_radix4_q31(const arm_cfft_radix4_instance_q31 *S, q31_t *pSrc)
Processing function for the Q31 CFFT/CIFFT.
Definition: arm_cfft_radix4_q31.c:66
Instance structure for the Q15 IIR lattice filter.
Definition: arm_math.h:3754
void arm_q31_to_q7(q31_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q7 vector.
Definition: arm_q31_to_q7.c:59
q31_t * pTwiddleAReal
Definition: arm_math.h:2179
uint32_t twidCoefRModifier
Definition: arm_math.h:2162
q15_t x0
Definition: arm_math.h:4170
void arm_fir_lattice_init_q31(arm_fir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pCoeffs, q31_t *pState)
Initialization function for the Q31 FIR lattice filter.
Definition: arm_fir_lattice_init_q31.c:53
void arm_scale_q7(q7_t *pSrc, q7_t scaleFract, int8_t shift, q7_t *pDst, uint32_t blockSize)
Multiplies a Q7 vector by a scalar.
Definition: arm_scale_q7.c:59
uint32_t fftLenReal
Definition: arm_math.h:2174
uint16_t stateIndex
Definition: arm_math.h:4364
uint16_t Nby2
Definition: arm_math.h:2297
q31_t mu
Definition: arm_math.h:4110
uint8_t ifftFlag
Definition: arm_math.h:1892
Instance structure for the floating-point FIR interpolator.
Definition: arm_math.h:3419
q7_t * pState
Definition: arm_math.h:4365
q31_t mu
Definition: arm_math.h:4004
void arm_negate_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Negates the elements of a Q7 vector.
Definition: arm_negate_q7.c:57
q31_t * pCosFactor
Definition: arm_math.h:2347
uint16_t numRows
Definition: arm_math.h:1785
Instance structure for the Q31 RFFT/RIFFT function.
Definition: arm_math.h:2172
float32_t * pCoeffs
Definition: arm_math.h:3243
uint16_t phaseLength
Definition: arm_math.h:3422
uint16_t bitRevFactor
Definition: arm_math.h:1927
uint16_t maxDelay
Definition: arm_math.h:4325
uint16_t numRows
Definition: arm_math.h:1818
void arm_cmplx_mag_squared_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude squared.
Definition: arm_cmplx_mag_squared_f32.c:74
void arm_fir_lattice_init_q15(arm_fir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pCoeffs, q15_t *pState)
Initialization function for the Q15 FIR lattice filter.
Definition: arm_fir_lattice_init_q15.c:53
uint16_t * pBitRevTable
Definition: arm_math.h:1895
void arm_cmplx_conj_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex conjugate.
Definition: arm_cmplx_conj_f32.c:72
q31_t * pCoeffs
Definition: arm_math.h:4003
arm_status arm_mat_scale_q31(const arm_matrix_instance_q31 *pSrc, q31_t scaleFract, int32_t shift, arm_matrix_instance_q31 *pDst)
Q31 matrix scaling.
Definition: arm_mat_scale_q31.c:63
uint8_t ifftFlag
Definition: arm_math.h:1922
q31_t * pCoeffs
Definition: arm_math.h:3411
Instance structure for the Q31 LMS filter.
Definition: arm_math.h:3999
uint16_t numCols
Definition: arm_math.h:1819
float32_t energy
Definition: arm_math.h:4059
void arm_fir_sparse_f32(arm_fir_sparse_instance_f32 *S, float32_t *pSrc, float32_t *pDst, float32_t *pScratchIn, uint32_t blockSize)
Processing function for the floating-point sparse FIR filter.
Definition: arm_fir_sparse_f32.c:113
float32_t * pCoeffs
Definition: arm_math.h:4057
void arm_biquad_cascade_df1_init_q15(arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, q15_t *pCoeffs, q15_t *pState, int8_t postShift)
Initialization function for the Q15 Biquad cascade filter.
Definition: arm_biquad_cascade_df1_init_q15.c:81
arm_cfft_radix4_instance_f32 * pCfft
Definition: arm_math.h:2197
void arm_lms_norm_f32(arm_lms_norm_instance_f32 *S, float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point normalized LMS filter.
Definition: arm_lms_norm_f32.c:160
uint8_t M
Definition: arm_math.h:3228
uint32_t numStages
Definition: arm_math.h:1197
void arm_fill_q15(q15_t value, q15_t *pDst, uint32_t blockSize)
Fills a constant value into a Q15 vector.
Definition: arm_fill_q15.c:53
void arm_shift_q7(q7_t *pSrc, int8_t shiftBits, q7_t *pDst, uint32_t blockSize)
Shifts the elements of a Q7 vector a specified number of bits.
Definition: arm_shift_q7.c:59
arm_status arm_mat_scale_f32(const arm_matrix_instance_f32 *pSrc, float32_t scale, arm_matrix_instance_f32 *pDst)
Floating-point matrix scaling.
Definition: arm_mat_scale_f32.c:75
Instance structure for the Q31 FIR lattice filter.
Definition: arm_math.h:3642
CMSIS Cortex-M4 Core Peripheral Access Layer Header File for CM4 Device Series.
void arm_fir_sparse_init_f32(arm_fir_sparse_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the floating-point sparse FIR filter.
Definition: arm_fir_sparse_init_f32.c:65
void arm_dot_prod_f32(float32_t *pSrcA, float32_t *pSrcB, uint32_t blockSize, float32_t *result)
Dot product of floating-point vectors.
Definition: arm_dot_prod_f32.c:62
arm_status arm_rfft_init_q31(arm_rfft_instance_q31 *S, arm_cfft_radix4_instance_q31 *S_CFFT, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
Initialization function for the Q31 RFFT/RIFFT.
Definition: arm_rfft_init_q31.c:617
q15_t * pTwiddleBReal
Definition: arm_math.h:2164
void arm_iir_lattice_init_f32(arm_iir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pkCoeffs, float32_t *pvCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point IIR lattice filter.
Definition: arm_iir_lattice_init_f32.c:55
uint16_t numRows
Definition: arm_math.h:1807
uint32_t twidCoefRModifier
Definition: arm_math.h:2194
uint8_t bitReverseFlag
Definition: arm_math.h:1908
arm_status arm_conv_partial_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
Definition: arm_conv_partial_fast_q31.c:56
uint32_t fftLenReal
Definition: arm_math.h:2158
q31_t A1
Definition: arm_math.h:1671
Instance structure for the floating-point FIR decimator.
Definition: arm_math.h:3239
arm_cfft_radix4_instance_f32 * pCfft
Definition: arm_math.h:2302
arm_rfft_instance_f32 * pRfft
Definition: arm_math.h:2301
uint16_t numCols
Definition: arm_math.h:1363
void arm_add_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector addition.
Definition: arm_add_q15.c:58
arm_status arm_mat_mult_fast_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pState)
Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
Definition: arm_mat_mult_fast_q15.c:74
q31_t * pCoeffs
Definition: arm_math.h:4109
void arm_var_q31(q31_t *pSrc, uint32_t blockSize, q63_t *pResult)
Variance of the elements of a Q31 vector.
Definition: arm_var_q31.c:66
Instance structure for the Q31 normalized LMS filter.
Definition: arm_math.h:4105
Instance structure for the Q15 DCT4/IDCT4 function.
Definition: arm_math.h:2388
void arm_cmplx_dot_prod_q15(q15_t *pSrcA, q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult)
Q15 complex dot product.
Definition: arm_cmplx_dot_prod_q15.c:59
void arm_conv_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences.
Definition: arm_conv_q31.c:71
void arm_fir_init_q7(arm_fir_instance_q7 *S, uint16_t numTaps, q7_t *pCoeffs, q7_t *pState, uint32_t blockSize)
Initialization function for the Q7 FIR filter.
Definition: arm_fir_init_q7.c:65
float32_t arm_cos_f32(float32_t x)
Fast approximation to the trigonometric cosine function for floating-point data.
Definition: arm_cos_f32.c:192
q15_t * pCosFactor
Definition: arm_math.h:2394
void arm_sub_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector subtraction.
Definition: arm_sub_q15.c:58
q7_t * pState
Definition: arm_math.h:979
uint8_t numStages
Definition: arm_math.h:3541
uint16_t numStages
Definition: arm_math.h:3767
void arm_sin_cos_f32(float32_t theta, float32_t *pSinVal, float32_t *pCcosVal)
Floating-point sin_cos function.
Definition: arm_sin_cos_f32.c:367
float32_t * pTwiddleAReal
Definition: arm_math.h:2195
void arm_iir_lattice_q31(const arm_iir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 IIR lattice filter.
Definition: arm_iir_lattice_q31.c:62
void arm_cmplx_mag_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude.
Definition: arm_cmplx_mag_f32.c:73
void arm_mult_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector multiplication.
Definition: arm_mult_q31.c:61
uint8_t bitReverseFlag
Definition: arm_math.h:1893
float32_t * pState
Definition: arm_math.h:3244
uint16_t phaseLength
Definition: arm_math.h:3410
float32_t * pCosFactor
Definition: arm_math.h:2300
uint8_t postShift
Definition: arm_math.h:3544
void arm_pid_init_f32(arm_pid_instance_f32 *S, int32_t resetStateFlag)
Initialization function for the floating-point PID Control.
Definition: arm_pid_init_f32.c:51
void arm_biquad_cas_df1_32x64_init_q31(arm_biquad_cas_df1_32x64_ins_q31 *S, uint8_t numStages, q31_t *pCoeffs, q63_t *pState, uint8_t postShift)
Definition: arm_biquad_cascade_df1_32x64_init_q31.c:77
void arm_abs_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Floating-point vector absolute value.
Definition: arm_abs_f32.c:66
arm_status arm_mat_trans_f32(const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst)
Floating-point matrix transpose.
Definition: arm_mat_trans_f32.c:64
Instance structure for the Q15 PID Control.
Definition: arm_math.h:1664
uint16_t numRows
Definition: arm_math.h:1339
void arm_iir_lattice_init_q15(arm_iir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pkCoeffs, q15_t *pvCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 IIR lattice filter.
Definition: arm_iir_lattice_init_q15.c:55
uint16_t numStages
Definition: arm_math.h:3633
void arm_fir_interpolate_q15(const arm_fir_interpolate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR interpolator.
Definition: arm_fir_interpolate_q15.c:62
q15_t * pCoeffs
Definition: arm_math.h:3948
uint8_t bitReverseFlagR
Definition: arm_math.h:2193
void arm_min_q7(q7_t *pSrc, uint32_t blockSize, q7_t *result, uint32_t *index)
Minimum value of a Q7 vector.
Definition: arm_min_q7.c:52
q31_t * pTwiddle
Definition: arm_math.h:1909
arm_status arm_mat_trans_q15(const arm_matrix_instance_q15 *pSrc, arm_matrix_instance_q15 *pDst)
Q15 matrix transpose.
Definition: arm_mat_trans_q15.c:55
void arm_iir_lattice_init_q31(arm_iir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pkCoeffs, q31_t *pvCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 IIR lattice filter.
Definition: arm_iir_lattice_init_q31.c:55
uint16_t numCols
Definition: arm_math.h:1797
uint16_t numCols
Definition: arm_math.h:1340
uint16_t numCols
Definition: arm_math.h:1808
void arm_max_q7(q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex)
Maximum value of a Q7 vector.
Definition: arm_max_q7.c:51
uint32_t postShift
Definition: arm_math.h:3950
float32_t state[3]
Definition: arm_math.h:1702
uint16_t twidCoefModifier
Definition: arm_math.h:1896
Instance structure for the Q31 IIR lattice filter.
Definition: arm_math.h:3765
void arm_dct4_q15(const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)
Processing function for the Q15 DCT4/IDCT4.
Definition: arm_dct4_q15.c:52
Instance structure for the Q15 CFFT/CIFFT function.
Definition: arm_math.h:1889
void arm_lms_init_f32(arm_lms_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize)
Initialization function for floating-point LMS filter.
Definition: arm_lms_init_f32.c:61
void arm_min_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Minimum value of a Q15 vector.
Definition: arm_min_q15.c:53
arm_status arm_fir_decimate_init_q15(arm_fir_decimate_instance_q15 *S, uint16_t numTaps, uint8_t M, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR decimator.
Definition: arm_fir_decimate_init_q15.c:68
q31_t * pTwiddle
Definition: arm_math.h:2346
void arm_sub_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector subtraction.
Definition: arm_sub_q7.c:58
uint16_t numTaps
Definition: arm_math.h:4001
void arm_fir_fast_q15(const arm_fir_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
Definition: arm_fir_fast_q15.c:65
float32_t * pYData
Definition: arm_math.h:1776
float32_t * pCoeffs
Definition: arm_math.h:1199
q31_t * pCoeffs
Definition: arm_math.h:3646
Instance structure for the floating-point IIR lattice filter.
Definition: arm_math.h:3776
arm_status arm_mat_sub_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst)
Q15 matrix subtraction.
Definition: arm_mat_sub_q15.c:61
void arm_mat_init_f32(arm_matrix_instance_f32 *S, uint16_t nRows, uint16_t nColumns, float32_t *pData)
Floating-point matrix initialization.
Definition: arm_mat_init_f32.c:65
void arm_var_q15(q15_t *pSrc, uint32_t blockSize, q31_t *pResult)
Variance of the elements of a Q15 vector.
Definition: arm_var_q15.c:64
q15_t * pState
Definition: arm_math.h:4351
uint8_t M
Definition: arm_math.h:3216