• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision14524 (tree)
Time2021-06-10 16:14:29
Authorgdisirio

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/test/core_benchmarks/configuration.xml (revision 14523)
+++ trunk/test/core_benchmarks/configuration.xml (nonexistent)
@@ -1,139 +0,0 @@
1-
2-<instance locked="false"
3- id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
4- <description>
5- <brief>
6- <value>ChibiOS/NIL Test Suite.</value>
7- </brief>
8- <copyright>
9- <value><![CDATA[/*
10- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
11-
12- Licensed under the Apache License, Version 2.0 (the "License");
13- you may not use this file except in compliance with the License.
14- You may obtain a copy of the License at
15-
16- http://www.apache.org/licenses/LICENSE-2.0
17-
18- Unless required by applicable law or agreed to in writing, software
19- distributed under the License is distributed on an "AS IS" BASIS,
20- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21- See the License for the specific language governing permissions and
22- limitations under the License.
23-*/]]></value>
24- </copyright>
25- <introduction>
26- <value>Test suite for core benchmarks. The purpose of this suite
27- is to perform general benchmarks in order to assess
28- performance of cores and/or compilers.
29- </value>
30- </introduction>
31- </description>
32- <global_data_and_code>
33- <code_prefix>
34- <value>corebmk_</value>
35- </code_prefix>
36- <global_definitions>
37- <value><![CDATA[
38-/**/
39-]]></value>
40- </global_definitions>
41- <global_code>
42- <value><![CDATA[
43-/**/
44-]]></value>
45- </global_code>
46- </global_data_and_code>
47- <sequences>
48- <sequence>
49- <type index="0">
50- <value>Internal Tests</value>
51- </type>
52- <brief>
53- <value>Information.</value>
54- </brief>
55- <description>
56- <value>This sequence reports configuration and version
57- information about execution environment.
58- </value>
59- </description>
60- <condition>
61- <value />
62- </condition>
63- <shared_code>
64- <value><![CDATA[
65-#include "ch.h"
66-]]></value>
67- </shared_code>
68- <cases>
69- <case>
70- <brief>
71- <value>Environment Info.</value>
72- </brief>
73- <description>
74- <value>Environment-related info are reported.</value>
75- </description>
76- <condition>
77- <value />
78- </condition>
79- <various_code>
80- <setup_code>
81- <value />
82- </setup_code>
83- <teardown_code>
84- <value />
85- </teardown_code>
86- <local_variables>
87- <value />
88- </local_variables>
89- </various_code>
90- <steps>
91- <step>
92- <description>
93- <value>Architecture and Compiler information.</value>
94- </description>
95- <tags>
96- <value />
97- </tags>
98- <code>
99- <value><![CDATA[
100-#if defined(PORT_ARCHITECTURE_NAME)
101-test_print("--- Architecture: ");
102-test_println(PORT_ARCHITECTURE_NAME);
103-#endif
104-#if defined(PORT_CORE_VARIANT_NAME)
105-test_print("--- Core Variant: ");
106-test_println(PORT_CORE_VARIANT_NAME);
107-#endif
108-#if defined(PORT_COMPILER_NAME)
109-test_print("--- Compiler: ");
110-test_println(PORT_COMPILER_NAME);
111-#endif
112-#if defined(PORT_INFO)
113-test_print("--- Port Info: ");
114-test_println(PORT_INFO);
115-#endif
116-#if defined(PORT_NATURAL_ALIGN)
117-test_print("--- Natural alignment: ");
118-test_printn(PORT_NATURAL_ALIGN);
119-test_println("");
120-#endif
121-#if defined(PORT_STACK_ALIGN)
122-test_print("--- Stack alignment: ");
123-test_printn(PORT_STACK_ALIGN);
124-test_println("");
125-#endif
126-#if defined(PORT_WORKING_AREA_ALIGN)
127-test_print("--- Working area alignment: ");
128-test_printn(PORT_WORKING_AREA_ALIGN);
129-test_println("");
130-#endif
131-]]></value>
132- </code>
133- </step>
134- </steps>
135- </case>
136- </cases>
137- </sequence>
138- </sequences>
139-</instance>
--- trunk/test/core_benchmarks/source/test/corebmk_test_root.c (revision 14523)
+++ trunk/test/core_benchmarks/source/test/corebmk_test_root.c (nonexistent)
@@ -1,64 +0,0 @@
1-/*
2- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15-*/
16-
17-/**
18- * @mainpage Test Suite Specification
19- * Test suite for core benchmarks. The purpose of this suite is to
20- * perform general benchmarks in order to assess performance of cores
21- * and/or compilers.
22- *
23- * <h2>Test Sequences</h2>
24- * - @subpage corebmk_test_sequence_001
25- * .
26- */
27-
28-/**
29- * @file corebmk_test_root.c
30- * @brief Test Suite root structures code.
31- */
32-
33-#include "hal.h"
34-#include "corebmk_test_root.h"
35-
36-#if !defined(__DOXYGEN__)
37-
38-/*===========================================================================*/
39-/* Module exported variables. */
40-/*===========================================================================*/
41-
42-/**
43- * @brief Array of test sequences.
44- */
45-const testsequence_t * const corebmk_test_suite_array[] = {
46- &corebmk_test_sequence_001,
47- NULL
48-};
49-
50-/**
51- * @brief Test suite root structure.
52- */
53-const testsuite_t corebmk_test_suite = {
54- "ChibiOS/NIL Test Suite",
55- corebmk_test_suite_array
56-};
57-
58-/*===========================================================================*/
59-/* Shared code. */
60-/*===========================================================================*/
61-
62-/**/
63-
64-#endif /* !defined(__DOXYGEN__) */
--- trunk/test/core_benchmarks/source/test/corebmk_test_root.h (revision 14523)
+++ trunk/test/core_benchmarks/source/test/corebmk_test_root.h (nonexistent)
@@ -1,52 +0,0 @@
1-/*
2- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15-*/
16-
17-/**
18- * @file corebmk_test_root.h
19- * @brief Test Suite root structures header.
20- */
21-
22-#ifndef COREBMK_TEST_ROOT_H
23-#define COREBMK_TEST_ROOT_H
24-
25-#include "ch_test.h"
26-
27-#include "corebmk_test_sequence_001.h"
28-
29-#if !defined(__DOXYGEN__)
30-
31-/*===========================================================================*/
32-/* External declarations. */
33-/*===========================================================================*/
34-
35-extern const testsuite_t corebmk_test_suite;
36-
37-#ifdef __cplusplus
38-extern "C" {
39-#endif
40-#ifdef __cplusplus
41-}
42-#endif
43-
44-/*===========================================================================*/
45-/* Shared definitions. */
46-/*===========================================================================*/
47-
48-/**/
49-
50-#endif /* !defined(__DOXYGEN__) */
51-
52-#endif /* COREBMK_TEST_ROOT_H */
--- trunk/test/core_benchmarks/source/test/corebmk_test_sequence_001.c (revision 14523)
+++ trunk/test/core_benchmarks/source/test/corebmk_test_sequence_001.c (nonexistent)
@@ -1,123 +0,0 @@
1-/*
2- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15-*/
16-
17-#include "hal.h"
18-#include "corebmk_test_root.h"
19-
20-/**
21- * @file corebmk_test_sequence_001.c
22- * @brief Test Sequence 001 code.
23- *
24- * @page corebmk_test_sequence_001 [1] Information
25- *
26- * File: @ref corebmk_test_sequence_001.c
27- *
28- * <h2>Description</h2>
29- * This sequence reports configuration and version information about
30- * execution environment.
31- *
32- * <h2>Test Cases</h2>
33- * - @subpage corebmk_test_001_001
34- * .
35- */
36-
37-/****************************************************************************
38- * Shared code.
39- ****************************************************************************/
40-
41-#include "ch.h"
42-
43-/****************************************************************************
44- * Test cases.
45- ****************************************************************************/
46-
47-/**
48- * @page corebmk_test_001_001 [1.1] Environment Info
49- *
50- * <h2>Description</h2>
51- * Environment-related info are reported.
52- *
53- * <h2>Test Steps</h2>
54- * - [1.1.1] Architecture and Compiler information.
55- * .
56- */
57-
58-static void corebmk_test_001_001_execute(void) {
59-
60- /* [1.1.1] Architecture and Compiler information.*/
61- test_set_step(1);
62- {
63-#if defined(PORT_ARCHITECTURE_NAME)
64- test_print("--- Architecture: ");
65- test_println(PORT_ARCHITECTURE_NAME);
66-#endif
67-#if defined(PORT_CORE_VARIANT_NAME)
68- test_print("--- Core Variant: ");
69- test_println(PORT_CORE_VARIANT_NAME);
70-#endif
71-#if defined(PORT_COMPILER_NAME)
72- test_print("--- Compiler: ");
73- test_println(PORT_COMPILER_NAME);
74-#endif
75-#if defined(PORT_INFO)
76- test_print("--- Port Info: ");
77- test_println(PORT_INFO);
78-#endif
79-#if defined(PORT_NATURAL_ALIGN)
80- test_print("--- Natural alignment: ");
81- test_printn(PORT_NATURAL_ALIGN);
82- test_println("");
83-#endif
84-#if defined(PORT_STACK_ALIGN)
85- test_print("--- Stack alignment: ");
86- test_printn(PORT_STACK_ALIGN);
87- test_println("");
88-#endif
89-#if defined(PORT_WORKING_AREA_ALIGN)
90- test_print("--- Working area alignment: ");
91- test_printn(PORT_WORKING_AREA_ALIGN);
92- test_println("");
93-#endif
94- }
95- test_end_step(1);
96-}
97-
98-static const testcase_t corebmk_test_001_001 = {
99- "Environment Info",
100- NULL,
101- NULL,
102- corebmk_test_001_001_execute
103-};
104-
105-/****************************************************************************
106- * Exported data.
107- ****************************************************************************/
108-
109-/**
110- * @brief Array of test cases.
111- */
112-const testcase_t * const corebmk_test_sequence_001_array[] = {
113- &corebmk_test_001_001,
114- NULL
115-};
116-
117-/**
118- * @brief Information.
119- */
120-const testsequence_t corebmk_test_sequence_001 = {
121- "Information",
122- corebmk_test_sequence_001_array
123-};
--- trunk/test/core_benchmarks/source/test/corebmk_test_sequence_001.h (revision 14523)
+++ trunk/test/core_benchmarks/source/test/corebmk_test_sequence_001.h (nonexistent)
@@ -1,27 +0,0 @@
1-/*
2- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3-
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
15-*/
16-
17-/**
18- * @file corebmk_test_sequence_001.h
19- * @brief Test Sequence 001 header.
20- */
21-
22-#ifndef COREBMK_TEST_SEQUENCE_001_H
23-#define COREBMK_TEST_SEQUENCE_001_H
24-
25-extern const testsequence_t corebmk_test_sequence_001;
26-
27-#endif /* COREBMK_TEST_SEQUENCE_001_H */
--- trunk/test/corebmk/source/test/corebmk_test_root.c (nonexistent)
+++ trunk/test/corebmk/source/test/corebmk_test_root.c (revision 14524)
@@ -0,0 +1,64 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+/**
18+ * @mainpage Test Suite Specification
19+ * Test suite for core benchmarks. The purpose of this suite is to
20+ * perform general benchmarks in order to assess performance of cores
21+ * and/or compilers.
22+ *
23+ * <h2>Test Sequences</h2>
24+ * - @subpage corebmk_test_sequence_001
25+ * .
26+ */
27+
28+/**
29+ * @file corebmk_test_root.c
30+ * @brief Test Suite root structures code.
31+ */
32+
33+#include "hal.h"
34+#include "corebmk_test_root.h"
35+
36+#if !defined(__DOXYGEN__)
37+
38+/*===========================================================================*/
39+/* Module exported variables. */
40+/*===========================================================================*/
41+
42+/**
43+ * @brief Array of test sequences.
44+ */
45+const testsequence_t * const corebmk_test_suite_array[] = {
46+ &corebmk_test_sequence_001,
47+ NULL
48+};
49+
50+/**
51+ * @brief Test suite root structure.
52+ */
53+const testsuite_t corebmk_test_suite = {
54+ "ChibiOS/NIL Test Suite",
55+ corebmk_test_suite_array
56+};
57+
58+/*===========================================================================*/
59+/* Shared code. */
60+/*===========================================================================*/
61+
62+/**/
63+
64+#endif /* !defined(__DOXYGEN__) */
--- trunk/test/corebmk/source/test/corebmk_test_root.h (nonexistent)
+++ trunk/test/corebmk/source/test/corebmk_test_root.h (revision 14524)
@@ -0,0 +1,52 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+/**
18+ * @file corebmk_test_root.h
19+ * @brief Test Suite root structures header.
20+ */
21+
22+#ifndef COREBMK_TEST_ROOT_H
23+#define COREBMK_TEST_ROOT_H
24+
25+#include "ch_test.h"
26+
27+#include "corebmk_test_sequence_001.h"
28+
29+#if !defined(__DOXYGEN__)
30+
31+/*===========================================================================*/
32+/* External declarations. */
33+/*===========================================================================*/
34+
35+extern const testsuite_t corebmk_test_suite;
36+
37+#ifdef __cplusplus
38+extern "C" {
39+#endif
40+#ifdef __cplusplus
41+}
42+#endif
43+
44+/*===========================================================================*/
45+/* Shared definitions. */
46+/*===========================================================================*/
47+
48+/**/
49+
50+#endif /* !defined(__DOXYGEN__) */
51+
52+#endif /* COREBMK_TEST_ROOT_H */
--- trunk/test/corebmk/source/test/corebmk_test_sequence_001.c (nonexistent)
+++ trunk/test/corebmk/source/test/corebmk_test_sequence_001.c (revision 14524)
@@ -0,0 +1,123 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+#include "hal.h"
18+#include "corebmk_test_root.h"
19+
20+/**
21+ * @file corebmk_test_sequence_001.c
22+ * @brief Test Sequence 001 code.
23+ *
24+ * @page corebmk_test_sequence_001 [1] Information
25+ *
26+ * File: @ref corebmk_test_sequence_001.c
27+ *
28+ * <h2>Description</h2>
29+ * This sequence reports configuration and version information about
30+ * execution environment.
31+ *
32+ * <h2>Test Cases</h2>
33+ * - @subpage corebmk_test_001_001
34+ * .
35+ */
36+
37+/****************************************************************************
38+ * Shared code.
39+ ****************************************************************************/
40+
41+#include "ch.h"
42+
43+/****************************************************************************
44+ * Test cases.
45+ ****************************************************************************/
46+
47+/**
48+ * @page corebmk_test_001_001 [1.1] Environment Info
49+ *
50+ * <h2>Description</h2>
51+ * Environment-related info are reported.
52+ *
53+ * <h2>Test Steps</h2>
54+ * - [1.1.1] Architecture and Compiler information.
55+ * .
56+ */
57+
58+static void corebmk_test_001_001_execute(void) {
59+
60+ /* [1.1.1] Architecture and Compiler information.*/
61+ test_set_step(1);
62+ {
63+#if defined(PORT_ARCHITECTURE_NAME)
64+ test_print("--- Architecture: ");
65+ test_println(PORT_ARCHITECTURE_NAME);
66+#endif
67+#if defined(PORT_CORE_VARIANT_NAME)
68+ test_print("--- Core Variant: ");
69+ test_println(PORT_CORE_VARIANT_NAME);
70+#endif
71+#if defined(PORT_COMPILER_NAME)
72+ test_print("--- Compiler: ");
73+ test_println(PORT_COMPILER_NAME);
74+#endif
75+#if defined(PORT_INFO)
76+ test_print("--- Port Info: ");
77+ test_println(PORT_INFO);
78+#endif
79+#if defined(PORT_NATURAL_ALIGN)
80+ test_print("--- Natural alignment: ");
81+ test_printn(PORT_NATURAL_ALIGN);
82+ test_println("");
83+#endif
84+#if defined(PORT_STACK_ALIGN)
85+ test_print("--- Stack alignment: ");
86+ test_printn(PORT_STACK_ALIGN);
87+ test_println("");
88+#endif
89+#if defined(PORT_WORKING_AREA_ALIGN)
90+ test_print("--- Working area alignment: ");
91+ test_printn(PORT_WORKING_AREA_ALIGN);
92+ test_println("");
93+#endif
94+ }
95+ test_end_step(1);
96+}
97+
98+static const testcase_t corebmk_test_001_001 = {
99+ "Environment Info",
100+ NULL,
101+ NULL,
102+ corebmk_test_001_001_execute
103+};
104+
105+/****************************************************************************
106+ * Exported data.
107+ ****************************************************************************/
108+
109+/**
110+ * @brief Array of test cases.
111+ */
112+const testcase_t * const corebmk_test_sequence_001_array[] = {
113+ &corebmk_test_001_001,
114+ NULL
115+};
116+
117+/**
118+ * @brief Information.
119+ */
120+const testsequence_t corebmk_test_sequence_001 = {
121+ "Information",
122+ corebmk_test_sequence_001_array
123+};
--- trunk/test/corebmk/source/test/corebmk_test_sequence_001.h (nonexistent)
+++ trunk/test/corebmk/source/test/corebmk_test_sequence_001.h (revision 14524)
@@ -0,0 +1,27 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+/**
18+ * @file corebmk_test_sequence_001.h
19+ * @brief Test Sequence 001 header.
20+ */
21+
22+#ifndef COREBMK_TEST_SEQUENCE_001_H
23+#define COREBMK_TEST_SEQUENCE_001_H
24+
25+extern const testsequence_t corebmk_test_sequence_001;
26+
27+#endif /* COREBMK_TEST_SEQUENCE_001_H */
--- trunk/test/corebmk/source/test/ffbench_mod.c (nonexistent)
+++ trunk/test/corebmk/source/test/ffbench_mod.c (revision 14524)
@@ -0,0 +1,89 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+/*
17+ This module is based on the work of John Walker (April of 1989) and
18+ merely adapted to work in ChibiOS. The author has not specified
19+ additional license terms so this is released using the most permissive
20+ license used in ChibiOS. The license covers the changes only, not the
21+ original work.
22+ */
23+
24+static void corebmk_fourn(Float data[], int nn[], const int ndim, const int isign) {
25+ int i1, i2, i3;
26+ int i2rev, i3rev, ip1, ip2, ip3, ifp1, ifp2;
27+ int ibit, idim, k1, k2, n, nprev, nrem, ntot;
28+ Float tempi, tempr;
29+ double theta, wi, wpi, wpr, wr, wtemp;
30+
31+ ntot = 1;
32+ for (idim = 1; idim <= ndim; idim++) {
33+ ntot *= nn[idim];
34+ }
35+ nprev = 1;
36+ for (idim = ndim; idim >= 1; idim--) {
37+ n = nn[idim];
38+ nrem = ntot / (n * nprev);
39+ ip1 = nprev << 1;
40+ ip2 = ip1 * n;
41+ ip3 = ip2 * nrem;
42+ i2rev = 1;
43+ for (i2 = 1; i2 <= ip2; i2 += ip1) {
44+ if (i2 < i2rev) {
45+ for (i1 = i2; i1 <= i2 + ip1 - 2; i1 += 2) {
46+ for (i3 = i1; i3 <= ip3; i3 += ip2) {
47+ i3rev = i2rev + i3 - i2;
48+ SWAP(data[i3], data[i3rev]);
49+ SWAP(data[i3 + 1], data[i3rev + 1]);
50+ }
51+ }
52+ }
53+ ibit = ip2 >> 1;
54+ while (ibit >= ip1 && i2rev > ibit) {
55+ i2rev -= ibit;
56+ ibit >>= 1;
57+ }
58+ i2rev += ibit;
59+ }
60+ ifp1 = ip1;
61+ while (ifp1 < ip2) {
62+ ifp2 = ifp1 << 1;
63+ theta = isign * 6.28318530717959 / (ifp2 / ip1);
64+ wtemp = sin(0.5 * theta);
65+ wpr = -2.0 * wtemp * wtemp;
66+ wpi = sin(theta);
67+ wr = 1.0;
68+ wi = 0.0;
69+ for (i3 = 1; i3 <= ifp1; i3 += ip1) {
70+ for (i1 = i3; i1 <= i3 + ip1 - 2; i1 += 2) {
71+ for (i2 = i1; i2 <= ip3; i2 += ifp2) {
72+ k1 = i2;
73+ k2 = k1 + ifp1;
74+ tempr = wr * data[k2] - wi * data[k2 + 1];
75+ tempi = wr * data[k2 + 1] + wi * data[k2];
76+ data[k2] = data[k1] - tempr;
77+ data[k2 + 1] = data[k1 + 1] - tempi;
78+ data[k1] += tempr;
79+ data[k1 + 1] += tempi;
80+ }
81+ }
82+ wr = (wtemp = wr) * wpr - wi * wpi + wr;
83+ wi = wi * wpr + wtemp * wpi + wi;
84+ }
85+ ifp1 = ifp2;
86+ }
87+ nprev *= n;
88+ }
89+}
--- trunk/test/corebmk/configuration.xml (nonexistent)
+++ trunk/test/corebmk/configuration.xml (revision 14524)
@@ -0,0 +1,139 @@
1+
2+<instance locked="false"
3+ id="org.chibios.spc5.components.portable.chibios_unitary_tests_engine">
4+ <description>
5+ <brief>
6+ <value>ChibiOS/NIL Test Suite.</value>
7+ </brief>
8+ <copyright>
9+ <value><![CDATA[/*
10+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
11+
12+ Licensed under the Apache License, Version 2.0 (the "License");
13+ you may not use this file except in compliance with the License.
14+ You may obtain a copy of the License at
15+
16+ http://www.apache.org/licenses/LICENSE-2.0
17+
18+ Unless required by applicable law or agreed to in writing, software
19+ distributed under the License is distributed on an "AS IS" BASIS,
20+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+ See the License for the specific language governing permissions and
22+ limitations under the License.
23+*/]]></value>
24+ </copyright>
25+ <introduction>
26+ <value>Test suite for core benchmarks. The purpose of this suite
27+ is to perform general benchmarks in order to assess
28+ performance of cores and/or compilers.
29+ </value>
30+ </introduction>
31+ </description>
32+ <global_data_and_code>
33+ <code_prefix>
34+ <value>corebmk_</value>
35+ </code_prefix>
36+ <global_definitions>
37+ <value><![CDATA[
38+/**/
39+]]></value>
40+ </global_definitions>
41+ <global_code>
42+ <value><![CDATA[
43+/**/
44+]]></value>
45+ </global_code>
46+ </global_data_and_code>
47+ <sequences>
48+ <sequence>
49+ <type index="0">
50+ <value>Internal Tests</value>
51+ </type>
52+ <brief>
53+ <value>Information.</value>
54+ </brief>
55+ <description>
56+ <value>This sequence reports configuration and version
57+ information about execution environment.
58+ </value>
59+ </description>
60+ <condition>
61+ <value />
62+ </condition>
63+ <shared_code>
64+ <value><![CDATA[
65+#include "ch.h"
66+]]></value>
67+ </shared_code>
68+ <cases>
69+ <case>
70+ <brief>
71+ <value>Environment Info.</value>
72+ </brief>
73+ <description>
74+ <value>Environment-related info are reported.</value>
75+ </description>
76+ <condition>
77+ <value />
78+ </condition>
79+ <various_code>
80+ <setup_code>
81+ <value />
82+ </setup_code>
83+ <teardown_code>
84+ <value />
85+ </teardown_code>
86+ <local_variables>
87+ <value />
88+ </local_variables>
89+ </various_code>
90+ <steps>
91+ <step>
92+ <description>
93+ <value>Architecture and Compiler information.</value>
94+ </description>
95+ <tags>
96+ <value />
97+ </tags>
98+ <code>
99+ <value><![CDATA[
100+#if defined(PORT_ARCHITECTURE_NAME)
101+test_print("--- Architecture: ");
102+test_println(PORT_ARCHITECTURE_NAME);
103+#endif
104+#if defined(PORT_CORE_VARIANT_NAME)
105+test_print("--- Core Variant: ");
106+test_println(PORT_CORE_VARIANT_NAME);
107+#endif
108+#if defined(PORT_COMPILER_NAME)
109+test_print("--- Compiler: ");
110+test_println(PORT_COMPILER_NAME);
111+#endif
112+#if defined(PORT_INFO)
113+test_print("--- Port Info: ");
114+test_println(PORT_INFO);
115+#endif
116+#if defined(PORT_NATURAL_ALIGN)
117+test_print("--- Natural alignment: ");
118+test_printn(PORT_NATURAL_ALIGN);
119+test_println("");
120+#endif
121+#if defined(PORT_STACK_ALIGN)
122+test_print("--- Stack alignment: ");
123+test_printn(PORT_STACK_ALIGN);
124+test_println("");
125+#endif
126+#if defined(PORT_WORKING_AREA_ALIGN)
127+test_print("--- Working area alignment: ");
128+test_printn(PORT_WORKING_AREA_ALIGN);
129+test_println("");
130+#endif
131+]]></value>
132+ </code>
133+ </step>
134+ </steps>
135+ </case>
136+ </cases>
137+ </sequence>
138+ </sequences>
139+</instance>
Show on old repository browser