Corrected issue #72

arm_sqrt_f32 optimizations for clang and gcc.
pull/75/head
Christophe Favergeon 3 years ago
parent f91c1f3c24
commit 258f31c5e6

@ -35,6 +35,7 @@
#include "dsp/basic_math_functions.h"
#include <math.h>
#ifdef __cplusplus
extern "C"
@ -251,6 +252,16 @@ __STATIC_FORCEINLINE arm_status arm_sqrt_f32(
*pOut = sqrtf(in);
#endif
#elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
*pOut = _sqrtf(in);
#elif defined(__GNUC_PYTHON__)
*pOut = sqrtf(in);
#elif defined ( __GNUC__ )
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
__ASM("VSQRT.F32 %0,%1" : "=t"(*pOut) : "t"(in));
#else
*pOut = sqrtf(in);
#endif
#else
*pOut = sqrtf(in);
#endif

@ -47,7 +47,7 @@
#define TOTAL_S_DDR4_SIZE (0x10000000) /* 256 MB */
/* Heap and Stack sizes for secure and nonsecure applications */
#define HEAP_SIZE (0x00100000) /* 1 KiB */
#define HEAP_SIZE (0x00020000) /* 1 KiB */
#define STACK_SIZE (0x00002000) /* 1 KiB */
#endif /* __REGION_LIMITS_H__ */

@ -5,6 +5,9 @@ layer:
components:
- component: DMA350
for-type:
- +VHT-Corstone-310
- component: Device:Startup&C Startup
not-for-type:
- +VHT-Corstone-300
@ -35,6 +38,9 @@ layer:
for-type:
- +VHT-Corstone-300
- +VHT-Corstone-310
- component: ARM::Native Driver:DMA350 Remap
for-type:
- +VHT-Corstone-310
- component: ARM::Native Driver:Timeout
for-type:
- +VHT-Corstone-300

@ -7,9 +7,14 @@ import colorama
from colorama import init,Fore, Back, Style
parser = argparse.ArgumentParser(description='Parse test description')
parser.add_argument('-avh', nargs='?',type = str, default="C:/Keil_v5/ARM/VHT_11.18.29", help="AVH folder")
parser.add_argument('-avh', nargs='?',type = str, default="C:/Keil_v5/ARM/VHT", help="AVH folder")
parser.add_argument('-d', action='store_true', help="Debug log")
args = parser.parse_args()
DEBUG=False
if args.d:
DEBUG=True
init()
@ -66,7 +71,10 @@ class Result:
# disable the dump of stderr
def run(*args,mustPrint=False,dumpStdErr=True):
global ERROR_OCCURED
global DEBUG
try:
if DEBUG:
print(" ".join(args))
result=subprocess.run(args,text=True,capture_output=True,timeout=600)
if result.returncode !=0 :
ERROR_OCCURED = True
@ -79,6 +87,7 @@ def run(*args,mustPrint=False,dumpStdErr=True):
print(result.stdout)
return(Result(result.stdout))
except Exception as e:
printError("Exception occured")
ERROR_OCCURED = True
return(Result(str(e),error=True))
@ -148,6 +157,13 @@ for t in tests:
# Test suite and output pickle needed to decode the result
#print(allSuites)
allSuites=[("ComplexTestsF32","../Output.pickle"),
("DistanceTestsF32","../Output.pickle"),
("UnaryTestsF32","../Output.pickle"),
("QuaternionTestsF32","../Output.pickle"),
("StatsTestsF32","../Output.pickle")
]
#allSuites=[("BasicTestsF32","../Output.pickle"),
#("BasicTestsQ31","../Output.pickle")]
@ -160,24 +176,25 @@ for t in tests:
# and the configuration file
solutions={
'testac6.csolution.yml':[
("VHT-Corstone-310","CS310"),
# ("VHT-Corstone-310","CS310"),
("VHT-Corstone-300","CS300"),
#("VHT_M33","M33_DSP_FP"),
# #("VHT_M33","M33_DSP_FP"),
("VHT_M7","M7DP"),
("VHT_M7_UNROLLED","M7DP"),
#("VHT_M4","M4FP"),
#("VHT_M3","M3"),
#("VHT_M23","M23"),
# #("VHT_M4","M4FP"),
# #("VHT_M3","M3"),
# #("VHT_M23","M23"),
("VHT_M0P","M0plus")
],
'testgcc.csolution.yml':[
#("VHT-Corstone-310","CS310"),
("VHT_M55","M55"),
#("VHT_M33","M33_DSP_FP"),
##("VHT_M33","M33_DSP_FP"),
("VHT_M7","M7DP"),
("VHT_M7_UNROLLED","M7DP"),
#("VHT_M4","M4FP"),
#("VHT_M3","M3"),
#("VHT_M23","M23"),
##("VHT_M4","M4FP"),
##("VHT_M3","M3"),
##("VHT_M23","M23"),
("VHT_M0P","M0plus")
]
}
@ -199,7 +216,13 @@ with open("summary.html","w") as f:
print(HTMLHEADER,file=f)
for s in solutions:
printTitle("Process solution %s" % s)
run("csolution","convert","-s",s)
res=run("csolution","convert","-s",s)
if res.error:
printError("Error csolution")
print("<p><font color=\"red\">Error converting csolution %s</font></p><PRE>" % s,file=f)
print(res.msg,file=f)
print("</PRE>",file=f)
continue
print("<h1>Solution %s</h1>" % s,file=f)
maxNbBuilds=len(solutions[s])
buildNb=0

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:12" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T14:54:04" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:12" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -8,39 +8,42 @@
<packages>
<package name="CMSIS" vendor="ARM" version="5.9.0:5.9.0"/>
<package name="V2M_MPS3_SSE_310_BSP" vendor="ARM" version="1.0.0:1.0.0"/>
<package name="DMA350" vendor="ARM" version="1.0.0:1.0.0"/>
<package name="V2M_MPS3_SSE_310_BSP" vendor="ARM" version="1.1.0:1.1.0"/>
</packages>
<compilers>
<compiler name="AC6" version="6.18.0"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Ddsp="DSP" Dfpu="DP_FPU" Dmve="FP_MVE" Dname="SSE-310-MPS3" Dsecure="Non-secure" Dtz="TZ" Dvendor="ARM:82">
<output intdir="tmp/test/VHT-Corstone-310/Release" name="test.Release+VHT-Corstone-310" outdir="out/test/VHT-Corstone-310/Release" rtedir="RTE" type="exe"/>
<asflags add="-masm=auto" compiler="AC6"/>
<cflags add="-Wsign-compare -Wdouble-promotion -DNDEBUG -Wall -Wextra -Werror -std=c11 -Ofast -ffast-math" compiler="AC6"/>
<cxxflags add="-fno-rtti -DNDEBUG -Wall -Wextra -std=c++11 -Ofast -ffast-math" compiler="AC6"/>
<ldflags add="--entry=Reset_Handler --info=summarysizes --info=sizes --info=totals --info=unused --info=veneers" compiler="AC6" file="RTE/Device/SSE-310-MPS3/corstone310_mps3_s.sct"/>
<asflags add="-masm=auto" compiler="GCC"/>
<cflags add="-ffunction-sections -mfp16-format=ieee -fdata-sections -std=c11 -Ofast -ffast-math -flax-vector-conversions" compiler="GCC"/>
<cxxflags add="-ffunction-sections -mfp16-format=ieee -fdata-sections -std=c++11 -Ofast -ffast-math -flax-vector-conversions -Wno-unused-parameter" compiler="GCC"/>
<ldflags add="--specs=nano.specs --specs=rdimon.specs --entry=Reset_Handler -Wl,--gc-sections" compiler="GCC" file="RTE/Device/SSE-310-MPS3/corstone310_mps3_s.ld"/>
<defines>EMBEDDED;NORMALFVP;CORTEXM</defines>
<includes>../../Include;../../PrivateInclude;../FrameworkInclude;../GeneratedInclude;../Include/Tests</includes>
</target>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.6.0"/>
<component Cclass="Device" Cgroup="Definition" Cvendor="ARM" Cversion="1.0.0">
<component Cclass="Device" Cgroup="Definition" Cvendor="ARM" Cversion="1.1.0">
<file attr="config" category="header" name="Board/Platform/platform_base_address.h" version="1.0.0"/>
</component>
<component Cclass="Device" Cgroup="Startup" Cvariant="Baremetal" Cvendor="ARM" Cversion="1.0.0">
<component Cclass="Device" Cgroup="Startup" Cvariant="Baremetal" Cvendor="ARM" Cversion="1.0.1">
<file attr="config" category="header" name="CMSIS_Driver/Config/Baremetal/cmsis_driver_config.h" version="1.0.0"/>
<file attr="config" category="header" name="CMSIS_Driver/Config/RTE_Device.h" version="1.0.0"/>
<file attr="config" category="header" name="Device/Config/Baremetal/device_cfg.h" version="1.0.0"/>
<file attr="config" category="header" name="Device/Include/region_defs.h" version="1.0.0"/>
<file attr="config" category="header" name="Device/Include/region_limits.h" version="1.0.0"/>
<file attr="config" category="header" name="Device/Include/system_SSE310MPS3.h" version="1.0.0"/>
<file attr="config" category="linkerScript" name="Device/Source/armclang/corstone310_mps3_s.sct" version="1.0.0"/>
<file attr="config" category="linkerScript" name="Device/Source/gcc/corstone310_mps3_s.ld" version="1.0.0"/>
<file attr="config" category="source" name="Device/Source/startup_SSE310MPS3.c" version="1.0.0"/>
<file attr="config" category="source" name="Device/Source/system_SSE310MPS3.c" version="1.0.0"/>
</component>
<component Cclass="Native Driver" Cgroup="DMA350 Remap" Csub="Custom" Cvendor="ARM" Cversion="1.0.0"/>
<component Cclass="Native Driver" Cgroup="DMA350" Cvendor="ARM" Cversion="1.1.0"/>
<component Cclass="Native Driver" Cgroup="SysCounter" Cvendor="ARM" Cversion="1.0.0"/>
<component Cclass="Native Driver" Cgroup="SysTimer" Cvendor="ARM" Cversion="1.0.0"/>
<component Cclass="Native Driver" Cgroup="Timeout" Cvendor="ARM" Cversion="1.0.0"/>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Dfpu="NO_FPU" Dname="ARMCM0P" Dsecure="Non-secure" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Dfpu="NO_FPU" Dname="ARMCM23" Dsecure="Non-secure" Dtz="NO_TZ" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Dfpu="NO_FPU" Dname="ARMCM3" Dsecure="Non-secure" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Ddsp="DSP" Dfpu="SP_FPU" Dname="ARMCM33_DSP_FP" Dsecure="Non-secure" Dtz="NO_TZ" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Dfpu="SP_FPU" Dname="ARMCM4_FP" Dsecure="Non-secure" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Ddsp="DSP" Dfpu="DP_FPU" Dmve="FP_MVE" Dname="ARMCM55" Dsecure="Non-secure" Dtz="TZ" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:13" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T15:02:12" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>
@ -11,7 +11,7 @@
</packages>
<compilers>
<compiler name="GCC" version="11.2.1"/>
<compiler name="GCC" version="12.2.0"/>
</compilers>
<target Dfpu="DP_FPU" Dname="ARMCM7_DP" Dsecure="Non-secure" Dvendor="ARM:82">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2022-11-09T08:17:12" tool="csolution 1.1.0"/>
<created timestamp="2022-11-29T14:54:05" tool="csolution 1.1.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,5 +1,6 @@
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
Keil::ARM_Compiler@1.7.2
ARM::V2M_MPS3_SSE_310_BSP@1.1.0
Keil::ARM_Compiler@1.7.2
ARM.DMA350

@ -1,5 +1,5 @@
solution:
compiler: AC6
compiler: AC6@6.18.0
misc:
- C:
- -Wsign-compare
@ -39,8 +39,9 @@ solution:
packs:
- 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
- pack: ARM::V2M_MPS3_SSE_310_BSP@1.1.0
- pack: Keil::ARM_Compiler@1.7.2
- pack: ARM::DMA350@1.0.0
target-types:
- type: VHT-Corstone-310
@ -53,11 +54,6 @@ solution:
defines:
- CORTEXM
- type: VHT_M55
device: ARMCM55
defines:
- CORTEXM
- type: VHT_M33
device: ARMCM33_DSP_FP
defines:

@ -1,5 +1,5 @@
solution:
compiler: GCC
compiler: GCC@12.2.0
misc:
- C:
- -ffunction-sections
@ -37,16 +37,18 @@ solution:
packs:
- 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
- pack: ARM::V2M_MPS3_SSE_310_BSP@1.1.0
- pack: Keil::ARM_Compiler@1.7.2
- pack: ARM::DMA350@1.0.0
target-types:
# There is not yet any gcc support in the pack
# for Corstone.
# V2M_MPS3_SSE_300_BSP@1.3.0
# ARM::V2M_MPS3_SSE_310_BSP@1.0.0
#- type: VHT-Corstone-310
# device: ARM::SSE-310-MPS3
# There is no gcc support in the pack
# for Corstone CS300.
- type: VHT-Corstone-310
device: ARM::SSE-310-MPS3
defines:
- CORTEXM
- type: VHT_M55
device: ARMCM55

Loading…
Cancel
Save