From e0bb1407f77efda1410d0792b3c32fd07e236cfb Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Wed, 3 Aug 2022 10:05:19 +0200 Subject: [PATCH] Improved documentation --- README.md | 2 +- Source/FilteringFunctions/arm_conv_f32.c | 16 ++-- Source/FilteringFunctions/arm_correlate_f32.c | 18 +++-- .../FilteringFunctions/arm_fir_lattice_f32.c | 3 + .../FilteringFunctions/arm_fir_sparse_f32.c | 3 + Source/MatrixFunctions/arm_mat_add_f32.c | 22 ++++- .../MatrixFunctions/arm_mat_cmplx_trans_f32.c | 18 ++++- Source/MatrixFunctions/arm_mat_inverse_f32.c | 17 +++- Source/MatrixFunctions/arm_mat_scale_f32.c | 17 +++- Source/MatrixFunctions/arm_mat_sub_f32.c | 23 +++++- Source/MatrixFunctions/arm_mat_trans_f32.c | 18 ++++- .../TransformFunctions/arm_cfft_radix4_q15.c | 17 +++- .../TransformFunctions/arm_cfft_radix4_q31.c | 17 +++- Source/TransformFunctions/arm_dct4_f32.c | 8 +- Source/TransformFunctions/arm_dct4_init_f32.c | 8 +- Source/TransformFunctions/arm_dct4_init_q15.c | 7 +- Source/TransformFunctions/arm_dct4_init_q31.c | 7 +- Source/TransformFunctions/arm_dct4_q15.c | 8 +- Source/TransformFunctions/arm_dct4_q31.c | 7 +- Testing/README.md | 80 +++++++++++++++++++ Testing/cmsis_build/buildsolution.sh | 2 +- .../cmsis_build/test.Release+FVP_A5Neon.cprj | 2 +- .../cmsis_build/test.Release+FVP_A7Neon.cprj | 2 +- .../cmsis_build/test.Release+FVP_A9Neon.cprj | 2 +- Testing/cmsis_build/test.Release+FVP_M55.cprj | 2 +- .../test.Release+VHT-Corstone-300.cprj | 2 +- .../test.Release+VHT-Corstone-310.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M0P.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M23.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M3.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M33.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M4.cprj | 2 +- Testing/cmsis_build/test.Release+VHT_M7.cprj | 2 +- Testing/cmsis_build/test.csolution_ac6.yml | 2 +- Testing/cmsis_build/test.csolution_gcc.yml | 2 +- Testing/cmsis_build/test_packlist.txt | 3 +- 36 files changed, 299 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index e5a7c0bb..e56982b1 100755 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ project (testcmsisdsp VERSION 0.1) add_subdirectory(${CMSISDSP}/Source bin_dsp) ``` -CMSIS-DSP is dependent on the CMSIS Core includes. So, you should define `CMSISCORE` on the cmake command line. The path used will be `${CMSISCORE}/Include`. +CMSIS-DSP is dependent on the CMSIS Core includes. So, you should define `CMSISCORE` on the cmake command line. The path used by CMSIS-DSP will be `${CMSISCORE}/Include`. You should also set the compilation options to use to build the library. diff --git a/Source/FilteringFunctions/arm_conv_f32.c b/Source/FilteringFunctions/arm_conv_f32.c index 4ad864e6..fb82c673 100644 --- a/Source/FilteringFunctions/arm_conv_f32.c +++ b/Source/FilteringFunctions/arm_conv_f32.c @@ -43,12 +43,14 @@ @par Algorithm Let a[n] and b[n] be sequences of length srcALen and srcBLen samples respectively. Then the convolution -
-     c[n] = a[n] * b[n]
-  
+ \f[ + c[n] = a[n] * b[n] + \f] @par is defined as - \image html ConvolutionEquation.gif + \f[ + c[n] = \sum_{k=0}^{srcALen} a[k] b[n-k] + \f] @par Note that c[n] is of length srcALen + srcBLen - 1 and is defined over the interval n=0, 1, 2, ..., srcALen + srcBLen - 2. pSrcA points to the first input vector of length srcALen and @@ -60,9 +62,9 @@ For each offset \c n, the overlapping portions of a[n] and b[n] are multiplied and summed together. @par Note that convolution is a commutative operation: -
-     a[n] * b[n] = b[n] * a[n].
-  
+ \f[ + a[n] * b[n] = b[n] * a[n]. + \f] @par This means that switching the A and B arguments to the convolution functions has no effect. diff --git a/Source/FilteringFunctions/arm_correlate_f32.c b/Source/FilteringFunctions/arm_correlate_f32.c index 940d7ca4..70119d12 100644 --- a/Source/FilteringFunctions/arm_correlate_f32.c +++ b/Source/FilteringFunctions/arm_correlate_f32.c @@ -46,16 +46,20 @@ @par Algorithm Let a[n] and b[n] be sequences of length srcALen and srcBLen samples respectively. The convolution of the two signals is denoted by -
-      c[n] = a[n] * b[n]
-  
+ \f[ + c[n] = a[n] * b[n] + \f] + In correlation, one of the signals is flipped in time -
-       c[n] = a[n] * b[-n]
-  
+ + \f[ + c[n] = a[n] * b[-n] + \f] @par and this is mathematically defined as - \image html CorrelateEquation.gif + \f[ + c[n] = \sum_{k=0}^{srcALen} a[k] b[k-n] + \f] @par The pSrcA points to the first input vector of length srcALen and pSrcB points to the second input vector of length srcBLen. The result c[n] is of length 2 * max(srcALen, srcBLen) - 1 and is defined over the interval n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2). diff --git a/Source/FilteringFunctions/arm_fir_lattice_f32.c b/Source/FilteringFunctions/arm_fir_lattice_f32.c index 77ea75c1..0e3b3771 100644 --- a/Source/FilteringFunctions/arm_fir_lattice_f32.c +++ b/Source/FilteringFunctions/arm_fir_lattice_f32.c @@ -35,6 +35,9 @@ /** @defgroup FIR_Lattice Finite Impulse Response (FIR) Lattice Filters + @deprecated Those functions are no more tested nor maintained and will be removed in + a future version. + This set of functions implements Finite Impulse Response (FIR) lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure is feedforward and diff --git a/Source/FilteringFunctions/arm_fir_sparse_f32.c b/Source/FilteringFunctions/arm_fir_sparse_f32.c index e6f4d78c..fd3d67a5 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_f32.c +++ b/Source/FilteringFunctions/arm_fir_sparse_f32.c @@ -35,6 +35,9 @@ /** @defgroup FIR_Sparse Finite Impulse Response (FIR) Sparse Filters + @deprecated Those functions are no more tested nor maintained and will be removed in + a future version. + This group of functions implements sparse FIR filters. Sparse FIR filters are equivalent to standard FIR filters except that most of the coefficients are equal to zero. Sparse filters are used for simulating reflections in communications and audio applications. diff --git a/Source/MatrixFunctions/arm_mat_add_f32.c b/Source/MatrixFunctions/arm_mat_add_f32.c index 879c8f8f..81a39511 100644 --- a/Source/MatrixFunctions/arm_mat_add_f32.c +++ b/Source/MatrixFunctions/arm_mat_add_f32.c @@ -36,7 +36,27 @@ @defgroup MatrixAdd Matrix Addition Adds two matrices. - \image html MatrixAddition.gif "Addition of two 3 x 3 matrices" + @par Addition of two 3 x 3 matrices + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ + \end{pmatrix} + + + \begin{pmatrix} + b_{1,1} & b_{1,2} & b_{1,3} \\ + b_{2,1} & b_{2,2} & b_{2,3} \\ + b_{3,1} & b_{3,2} & b_{3,3} \\ + \end{pmatrix} + = + \begin{pmatrix} + a_{1,1}+b_{1,1} & a_{1,2}+b_{1,2} & a_{1,3}+b_{1,3} \\ + a_{2,1}+b_{2,1} & a_{2,2}+b_{2,2} & a_{2,3}+b_{2,3} \\ + a_{3,1}+b_{3,1} & a_{3,2}+b_{3,2} & a_{3,3}+b_{3,3} \\ + \end{pmatrix} + \f] The functions check to make sure that pSrcA, pSrcB, and pDst have the same diff --git a/Source/MatrixFunctions/arm_mat_cmplx_trans_f32.c b/Source/MatrixFunctions/arm_mat_cmplx_trans_f32.c index 222f349e..4121e6f8 100755 --- a/Source/MatrixFunctions/arm_mat_cmplx_trans_f32.c +++ b/Source/MatrixFunctions/arm_mat_cmplx_trans_f32.c @@ -38,7 +38,23 @@ Tranposes a complex matrix. Transposing an M x N matrix flips it around the center diagonal and results in an N x M matrix. - \image html MatrixTranspose.gif "Transpose of a 3 x 3 matrix" + + @par Transpose of a 3 x 3 matrix + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ + \end{pmatrix}^T + = + \begin{pmatrix} + a_{1,1} & a_{2,1} & a_{3,1} \\ + a_{1,2} & a_{2,2} & a_{3,2} \\ + a_{1,3} & a_{2,3} & a_{3,3} \\ + \end{pmatrix} + \f] + */ /** diff --git a/Source/MatrixFunctions/arm_mat_inverse_f32.c b/Source/MatrixFunctions/arm_mat_inverse_f32.c index e901f165..0e940419 100644 --- a/Source/MatrixFunctions/arm_mat_inverse_f32.c +++ b/Source/MatrixFunctions/arm_mat_inverse_f32.c @@ -52,7 +52,22 @@ of elementary row-operations to an identity matrix yields the inverse matrix. If the input matrix is singular, then the algorithm terminates and returns error status ARM_MATH_SINGULAR. - \image html MatrixInverse.gif "Matrix Inverse of a 3 x 3 matrix using Gauss-Jordan Method" + + @par Matrix Inverse of a 3 x 3 matrix using Gauss-Jordan Method + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} & | & 1 & 0 & 0\\ + a_{2,1} & a_{2,2} & a_{2,3} & | & 0 & 1 & 0\\ + a_{3,1} & a_{3,2} & a_{3,3} & | & 0 & 0 & 1\\ + \end{pmatrix} + \rightarrow + \begin{pmatrix} + 1 & 0 & 0 & | & x_{1,1} & x_{2,1} & x_{3,1} \\ + 0 & 1 & 0 & | & x_{1,2} & x_{2,2} & x_{3,2} \\ + 0 & 0 & 1 & | & x_{1,3} & x_{2,3} & x_{3,3} \\ + \end{pmatrix} + \f] */ /** diff --git a/Source/MatrixFunctions/arm_mat_scale_f32.c b/Source/MatrixFunctions/arm_mat_scale_f32.c index daebbb34..607dc887 100644 --- a/Source/MatrixFunctions/arm_mat_scale_f32.c +++ b/Source/MatrixFunctions/arm_mat_scale_f32.c @@ -37,7 +37,22 @@ Multiplies a matrix by a scalar. This is accomplished by multiplying each element in the matrix by the scalar. For example: - \image html MatrixScale.gif "Matrix Scaling of a 3 x 3 matrix" + + @par Matrix Scaling of a 3 x 3 matrix + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ + \end{pmatrix} + * K = + \begin{pmatrix} + K a_{1,1} & K a_{1,2} & K a_{1,3} \\ + K a_{2,1} & K a_{2,2} & K a_{2,3} \\ + K a_{3,1} & K a_{3,2} & K a_{3,3} \\ + \end{pmatrix} + \f] The function checks to make sure that the input and output matrices are of the same size. diff --git a/Source/MatrixFunctions/arm_mat_sub_f32.c b/Source/MatrixFunctions/arm_mat_sub_f32.c index e9a17d1b..567959c1 100644 --- a/Source/MatrixFunctions/arm_mat_sub_f32.c +++ b/Source/MatrixFunctions/arm_mat_sub_f32.c @@ -36,8 +36,27 @@ @defgroup MatrixSub Matrix Subtraction Subtract two matrices. - \image html MatrixSubtraction.gif "Subraction of two 3 x 3 matrices" - + @par Subraction of two 3 x 3 matrices + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ + \end{pmatrix} + - + \begin{pmatrix} + b_{1,1} & b_{1,2} & b_{1,3} \\ + b_{2,1} & b_{2,2} & b_{2,3} \\ + b_{3,1} & b_{3,2} & b_{3,3} \\ + \end{pmatrix} + = + \begin{pmatrix} + a_{1,1}-b_{1,1} & a_{1,2}-b_{1,2} & a_{1,3}-b_{1,3} \\ + a_{2,1}-b_{2,1} & a_{2,2}-b_{2,2} & a_{2,3}-b_{2,3} \\ + a_{3,1}-b_{3,1} & a_{3,2}-b_{3,2} & a_{3,3}-b_{3,3} \\ + \end{pmatrix} + \f] The functions check to make sure that pSrcA, pSrcB, and pDst have the same number of rows and columns. diff --git a/Source/MatrixFunctions/arm_mat_trans_f32.c b/Source/MatrixFunctions/arm_mat_trans_f32.c index b4116630..6dd71621 100644 --- a/Source/MatrixFunctions/arm_mat_trans_f32.c +++ b/Source/MatrixFunctions/arm_mat_trans_f32.c @@ -38,7 +38,23 @@ Tranposes a matrix. Transposing an M x N matrix flips it around the center diagonal and results in an N x M matrix. - \image html MatrixTranspose.gif "Transpose of a 3 x 3 matrix" + + @par Transpose of a 3 x 3 matrix + + \f[ + \begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ + \end{pmatrix}^T + = + \begin{pmatrix} + a_{1,1} & a_{2,1} & a_{3,1} \\ + a_{1,2} & a_{2,2} & a_{3,2} \\ + a_{1,3} & a_{2,3} & a_{3,3} \\ + \end{pmatrix} + \f] + */ /** diff --git a/Source/TransformFunctions/arm_cfft_radix4_q15.c b/Source/TransformFunctions/arm_cfft_radix4_q15.c index 280acca1..ce728028 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_q15.c +++ b/Source/TransformFunctions/arm_cfft_radix4_q15.c @@ -70,8 +70,21 @@ void arm_bitreversal_q15( Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT: @par - \image html CFFTQ15.gif "Input and Output Formats for Q15 CFFT" - \image html CIFFTQ15.gif "Input and Output Formats for Q15 CIFFT" + +| CFFT Size | Input format | Output format | Number of bits to upscale | +| --------: | ------------: | ------------: | ------------------------: | +| 16 | 1.15 | 5.11 | 4 | +| 64 | 1.15 | 7.9 | 6 | +| 256 | 1.15 | 9.7 | 8 | +| 1024 | 1.15 | 11.5 | 10 | + +| CIFFT Size | Input format | Output format | Number of bits to upscale | +| ---------: | ------------: | ------------: | ------------------------: | +| 16 | 1.15 | 5.11 | 0 | +| 64 | 1.15 | 7.9 | 0 | +| 256 | 1.15 | 9.7 | 0 | +| 1024 | 1.15 | 11.5 | 0 | + */ void arm_cfft_radix4_q15( diff --git a/Source/TransformFunctions/arm_cfft_radix4_q31.c b/Source/TransformFunctions/arm_cfft_radix4_q31.c index 46c1e478..459e40df 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_q31.c +++ b/Source/TransformFunctions/arm_cfft_radix4_q31.c @@ -68,8 +68,21 @@ void arm_bitreversal_q31( Hence the output format is different for different FFT sizes. The input and output formats for different FFT sizes and number of bits to upscale are mentioned in the tables below for CFFT and CIFFT: @par - \image html CFFTQ31.gif "Input and Output Formats for Q31 CFFT" - \image html CIFFTQ31.gif "Input and Output Formats for Q31 CIFFT" + +| CFFT Size | Input format | Output format | Number of bits to upscale | +| --------: | ------------: | ------------: | ------------------------: | +| 16 | 1.31 | 5.27 | 4 | +| 64 | 1.31 | 7.25 | 6 | +| 256 | 1.31 | 9.23 | 8 | +| 1024 | 1.31 | 11.21 | 10 | + +| CIFFT Size | Input format | Output format | Number of bits to upscale | +| ---------: | ------------: | ------------: | ------------------------: | +| 16 | 1.31 | 5.27 | 0 | +| 64 | 1.31 | 7.25 | 0 | +| 256 | 1.31 | 9.23 | 0 | +| 1024 | 1.31 | 11.21 | 0 | + */ void arm_cfft_radix4_q31( diff --git a/Source/TransformFunctions/arm_dct4_f32.c b/Source/TransformFunctions/arm_dct4_f32.c index b9dff3fb..68b0b43b 100644 --- a/Source/TransformFunctions/arm_dct4_f32.c +++ b/Source/TransformFunctions/arm_dct4_f32.c @@ -60,11 +60,15 @@ @par Algorithm The N-point type-IV DCT is defined as a real, linear transformation by the formula: - \image html DCT4Equation.gif + \f[ + X_c(k) = \sqrt{\frac{2}{N}}\sum_{n=0}^{N-1} x(n)cos\Big[\Big(n+\frac{1}{2}\Big)\Big(k+\frac{1}{2}\Big)\frac{\pi}{N}\Big] + \f] where k = 0, 1, 2, ..., N-1 @par Its inverse is defined as follows: - \image html IDCT4Equation.gif + \f[ + x(n) = \sqrt{\frac{2}{N}}\sum_{k=0}^{N-1} X_c(k)cos\Big[\Big(n+\frac{1}{2}\Big)\Big(k+\frac{1}{2}\Big)\frac{\pi}{N}\Big] + \f] where n = 0, 1, 2, ..., N-1 @par The DCT4 matrices become involutory (i.e. they are self-inverse) by multiplying with an overall scale factor of sqrt(2/N). diff --git a/Source/TransformFunctions/arm_dct4_init_f32.c b/Source/TransformFunctions/arm_dct4_init_f32.c index e1d80c0e..9b65f8ca 100644 --- a/Source/TransformFunctions/arm_dct4_init_f32.c +++ b/Source/TransformFunctions/arm_dct4_init_f32.c @@ -54,7 +54,13 @@ The normalizing factor is sqrt(2/N), which depends on the size of transform N. Floating-point normalizing factors are mentioned in the table below for different DCT sizes: - \image html dct4NormalizingF32Table.gif + +| DCT Size | Normalizing factor value | +| --------: | ------------------------: | +| 2048 | 0.03125 | +| 512 | 0.0625 | +| 128 | 0.125 | + */ arm_status arm_dct4_init_f32( diff --git a/Source/TransformFunctions/arm_dct4_init_q15.c b/Source/TransformFunctions/arm_dct4_init_q15.c index 5390da3c..025ac313 100644 --- a/Source/TransformFunctions/arm_dct4_init_q15.c +++ b/Source/TransformFunctions/arm_dct4_init_q15.c @@ -54,7 +54,12 @@ The normalizing factor is sqrt(2/N), which depends on the size of transform N. Normalizing factors in 1.15 format are mentioned in the table below for different DCT sizes: - \image html dct4NormalizingQ15Table.gif +| DCT Size | Normalizing factor value (hexadecimal) | +| --------: | ---------------------------------------:| +| 2048 | 0x400 | +| 512 | 0x800 | +| 128 | 0x1000 | + */ arm_status arm_dct4_init_q15( diff --git a/Source/TransformFunctions/arm_dct4_init_q31.c b/Source/TransformFunctions/arm_dct4_init_q31.c index 4c7622a1..35f1e326 100644 --- a/Source/TransformFunctions/arm_dct4_init_q31.c +++ b/Source/TransformFunctions/arm_dct4_init_q31.c @@ -53,8 +53,13 @@ @par Normalizing factor: The normalizing factor is sqrt(2/N), which depends on the size of transform N. Normalizing factors in 1.31 format are mentioned in the table below for different DCT sizes: + +| DCT Size | Normalizing factor value (hexadecimal) | +| --------: | ---------------------------------------:| +| 2048 | 0x4000000 | +| 512 | 0x8000000 | +| 128 | 0x10000000 | - \image html dct4NormalizingQ31Table.gif */ arm_status arm_dct4_init_q31( diff --git a/Source/TransformFunctions/arm_dct4_q15.c b/Source/TransformFunctions/arm_dct4_q15.c index a4650da2..203c919f 100644 --- a/Source/TransformFunctions/arm_dct4_q15.c +++ b/Source/TransformFunctions/arm_dct4_q15.c @@ -44,8 +44,14 @@ Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below: + +| DCT Size | Input format | Output format | Number of bits to upscale | +| --------: | ------------: | ------------: | ------------------------: | +| 2048 | 1.15 | 11.5 | 10 | +| 512 | 1.15 | 9.7 | 8 | +| 128 | 1.15 | 7.9 | 6 | + - \image html dct4FormatsQ15Table.gif */ void arm_dct4_q15( diff --git a/Source/TransformFunctions/arm_dct4_q31.c b/Source/TransformFunctions/arm_dct4_q31.c index 6cbccff8..942dd007 100644 --- a/Source/TransformFunctions/arm_dct4_q31.c +++ b/Source/TransformFunctions/arm_dct4_q31.c @@ -48,7 +48,12 @@ The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below: - \image html dct4FormatsQ31Table.gif +| DCT Size | Input format | Output format | Number of bits to upscale | +| --------: | ------------: | ------------: | ------------------------: | +| 2048 | 2.30 | 12.20 | 11 | +| 512 | 2.30 | 10.22 | 9 | +| 128 | 2.30 | 8.24 | 7 | + */ void arm_dct4_q31( diff --git a/Testing/README.md b/Testing/README.md index 71644f55..e4503532 100644 --- a/Testing/README.md +++ b/Testing/README.md @@ -2,8 +2,88 @@ This framework is for our own internal use. We decided to release it but, at least in short term, we won't give any help or support about it. +## Summary + +Here is a quick summary of how to get started with the framework the first time the repository is cloned. + +First, you must use the same tag than the one for your CMSIS Pack. Otherwise, the cloned source may contain tests for functions which are not yet available in the official pack. + +You can also look at the artifact for the commit : it is containing a CMSIS Pack for this commit. + +You need `Python 3` and the following Python packages: + +``` +pip install pyparsing +pip install Colorama +``` + +Once you have cloned the right version and installed the Python packages, you need to generate some files. + +**Generation of all C files needed to build the tests.** + +The commands must be run from Testing folder: + +`createDefaultFolder.sh` + +`python preprocess.py -f desc.txt` + +`python preprocess.py -f desc_f16.txt -o Output_f16.pickle` + +`python processTests.py -e` + +`python processTests.py -e -f Output_f16.pickle` + +**Now the test suite you want to run can be selected:** + +`python processTests.py -e BasicTestsF32` + +Each time you want to change the test suite to run, you need to execute this function. No need to redo all the previous steps to generate all the missing files. + +Note that if the test suite is part of the half float tests, then you'll need to do instead: + +`python processTests.py -f Output_f16.pickle -e BasicTestsF16` + +**Building the test framework:** + +In `Testing\cmsis_build` you can find some scripts: + +* `buildsolution.sh` is converting the solution file, using `csolution`, to generate the `.cprj` files for each target +* `build.sh` is building all the targets using `cbuild` tool + +The CMSIS build tools must be installed and configured. You may need to run the CMSIS build tools setup script before the previous steps: + +`source /cmsistools/etc/setup` + +and you may need to add the path to the `csolution` tool: + +`export PATH=$PATH:/cmsistools/bin/linux64` + +(If you are on Windows, use the `bin/windows64` folder) + +You may need to initialize the pack repository and install the needed packs: + +`cpackget init` + +`cpackget add -f test_packlist.txt` + +The `test_packlist.txt` is in the `Testing\cmsis_build` folder. + +**You can then run the executable on Virtual Hardware.** + +For instance, to run the test on the virtual hardware for Corstone 300, if you have the Arm MDK installed on Windows : + +`C:\Keil_v5\ARM\FVP\MPS2_Cortex-M\FVP_MPS2_Cortex-M55_MDK.exe ^ + -f configs/ARM_VHT_MPS2_M55_config.txt ^ + Objects\test.Release+FVP_M55.axf > results.txt` + +**Parsing the results:** + +`python processResult.py -f Output.pickle -e -r result.txt` + ## REQUIREMENTS +Requirements for the test framework. + ### Test descriptions #### R1 : The tests shall be described in a file diff --git a/Testing/cmsis_build/buildsolution.sh b/Testing/cmsis_build/buildsolution.sh index 8e324a13..cbe9e0e7 100644 --- a/Testing/cmsis_build/buildsolution.sh +++ b/Testing/cmsis_build/buildsolution.sh @@ -1,3 +1,3 @@ csolution convert -s test.csolution_ac6.yml -#csolution convert -s test.csolution_gcc.yml \ No newline at end of file +csolution convert -s test.csolution_gcc.yml \ No newline at end of file diff --git a/Testing/cmsis_build/test.Release+FVP_A5Neon.cprj b/Testing/cmsis_build/test.Release+FVP_A5Neon.cprj index a526a5e0..f0a3514d 100644 --- a/Testing/cmsis_build/test.Release+FVP_A5Neon.cprj +++ b/Testing/cmsis_build/test.Release+FVP_A5Neon.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+FVP_A7Neon.cprj b/Testing/cmsis_build/test.Release+FVP_A7Neon.cprj index e33f5563..fa3cd1e1 100644 --- a/Testing/cmsis_build/test.Release+FVP_A7Neon.cprj +++ b/Testing/cmsis_build/test.Release+FVP_A7Neon.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+FVP_A9Neon.cprj b/Testing/cmsis_build/test.Release+FVP_A9Neon.cprj index fa993286..8421a5bc 100644 --- a/Testing/cmsis_build/test.Release+FVP_A9Neon.cprj +++ b/Testing/cmsis_build/test.Release+FVP_A9Neon.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+FVP_M55.cprj b/Testing/cmsis_build/test.Release+FVP_M55.cprj index c975b969..4f97ecdb 100644 --- a/Testing/cmsis_build/test.Release+FVP_M55.cprj +++ b/Testing/cmsis_build/test.Release+FVP_M55.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT-Corstone-300.cprj b/Testing/cmsis_build/test.Release+VHT-Corstone-300.cprj index f8cc3762..bdb59c49 100644 --- a/Testing/cmsis_build/test.Release+VHT-Corstone-300.cprj +++ b/Testing/cmsis_build/test.Release+VHT-Corstone-300.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT-Corstone-310.cprj b/Testing/cmsis_build/test.Release+VHT-Corstone-310.cprj index 47944f9b..177e38c0 100644 --- a/Testing/cmsis_build/test.Release+VHT-Corstone-310.cprj +++ b/Testing/cmsis_build/test.Release+VHT-Corstone-310.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M0P.cprj b/Testing/cmsis_build/test.Release+VHT_M0P.cprj index 50f6e4c7..03ebd3cd 100644 --- a/Testing/cmsis_build/test.Release+VHT_M0P.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M0P.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M23.cprj b/Testing/cmsis_build/test.Release+VHT_M23.cprj index e3354454..8d6d22fe 100644 --- a/Testing/cmsis_build/test.Release+VHT_M23.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M23.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M3.cprj b/Testing/cmsis_build/test.Release+VHT_M3.cprj index 25178389..7cb6fb50 100644 --- a/Testing/cmsis_build/test.Release+VHT_M3.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M3.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M33.cprj b/Testing/cmsis_build/test.Release+VHT_M33.cprj index d098a6a2..76512cd3 100644 --- a/Testing/cmsis_build/test.Release+VHT_M33.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M33.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M4.cprj b/Testing/cmsis_build/test.Release+VHT_M4.cprj index 9733b2c4..35771c13 100644 --- a/Testing/cmsis_build/test.Release+VHT_M4.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M4.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.Release+VHT_M7.cprj b/Testing/cmsis_build/test.Release+VHT_M7.cprj index e9c17a82..5e310a5c 100644 --- a/Testing/cmsis_build/test.Release+VHT_M7.cprj +++ b/Testing/cmsis_build/test.Release+VHT_M7.cprj @@ -1,6 +1,6 @@ - + Automatically generated project diff --git a/Testing/cmsis_build/test.csolution_ac6.yml b/Testing/cmsis_build/test.csolution_ac6.yml index 5f0b876c..651dc719 100644 --- a/Testing/cmsis_build/test.csolution_ac6.yml +++ b/Testing/cmsis_build/test.csolution_ac6.yml @@ -27,7 +27,7 @@ solution: - NORMALFVP packs: - - pack: ARM::CMSIS-DSP@1.10.1 + - pack: ARM::CMSIS-DSP@1.11.0 - pack: ARM::CMSIS@5.9.0 - pack: ARM::V2M_MPS3_SSE_300_BSP@1.3.0 - pack: ARM::V2M_MPS3_SSE_310_BSP@1.0.0 diff --git a/Testing/cmsis_build/test.csolution_gcc.yml b/Testing/cmsis_build/test.csolution_gcc.yml index 6f24f5a1..936653bc 100644 --- a/Testing/cmsis_build/test.csolution_gcc.yml +++ b/Testing/cmsis_build/test.csolution_gcc.yml @@ -22,7 +22,7 @@ solution: - NORMALFVP packs: - - pack: ARM::CMSIS-DSP@1.10.1 + - pack: ARM::CMSIS-DSP@1.11.0 - pack: ARM::CMSIS@5.9.1 - pack: ARM::V2M_MPS3_SSE_300_BSP@1.3.0 - pack: ARM::V2M_MPS3_SSE_310_BSP@1.0.0 diff --git a/Testing/cmsis_build/test_packlist.txt b/Testing/cmsis_build/test_packlist.txt index f4259e22..b23a6b8d 100644 --- a/Testing/cmsis_build/test_packlist.txt +++ b/Testing/cmsis_build/test_packlist.txt @@ -1,5 +1,4 @@ -https://github.com/ARM-software/CMSIS-DSP/releases/download/v1.10.1/ARM.CMSIS-DSP.1.10.1.pack -ARM::CMSIS-DSP@1.10.1 +https://github.com/ARM-software/CMSIS-DSP/releases/download/v1.11.0/ARM.CMSIS-DSP.1.11.0.pack ARM::CMSIS@5.9.0 ARM::V2M_MPS3_SSE_300_BSP@1.3.0 ARM::V2M_MPS3_SSE_310_BSP@1.0.0