Skip to content

Commit

Permalink
CMSIS-DSP: Improvements to the float16 support for building.
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Apr 21, 2020
1 parent dbe9193 commit c46f152
Show file tree
Hide file tree
Showing 63 changed files with 15,104 additions and 14,445 deletions.
14 changes: 13 additions & 1 deletion ARM.CMSIS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -3208,16 +3208,23 @@ and 8-bit Java bytecodes in Jazelle state.

</files>
</component>
<component Cclass="CMSIS" Cgroup="DSP" Cvariant="Source" Cversion="1.8.0" isDefaultVariant="true" condition="CMSIS DSP">
<component Cclass="CMSIS" Cgroup="DSP" Cvariant="Source" Cversion="1.8.1" isDefaultVariant="true" condition="CMSIS DSP">
<description>CMSIS-DSP Library for Cortex-M, SC000, and SC300</description>
<files>
<!-- CPU independent -->
<file category="doc" name="CMSIS/Documentation/DSP/html/index.html"/>
<file category="header" name="CMSIS/DSP/Include/arm_math.h"/>
<file category="header" name="CMSIS/DSP/Include/arm_math_f16.h"/>
<file category="header" name="CMSIS/DSP/Include/arm_common_tables.h"/>
<file category="header" name="CMSIS/DSP/Include/arm_common_tables_f16.h"/>
<file category="header" name="CMSIS/DSP/Include/arm_const_structs.h"/>
<file category="header" name="CMSIS/DSP/Include/arm_const_structs_f16.h"/>

<file category="include" name="CMSIS/DSP/PrivateInclude/"/>

<!-- DSP sources (core) -->
<file category="source" name="CMSIS/DSP/Source/BasicMathFunctions/BasicMathFunctions.c"/>

<file category="source" name="CMSIS/DSP/Source/BayesFunctions/BayesFunctions.c"/>
<file category="source" name="CMSIS/DSP/Source/CommonTables/CommonTables.c"/>
<file category="source" name="CMSIS/DSP/Source/ComplexMathFunctions/ComplexMathFunctions.c"/>
Expand All @@ -3231,6 +3238,11 @@ and 8-bit Java bytecodes in Jazelle state.
<file category="source" name="CMSIS/DSP/Source/SVMFunctions/SVMFunctions.c"/>
<file category="source" name="CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c"/>

<!-- DSP sources F16 versions -->
<file category="source" name="CMSIS/DSP/Source/BasicMathFunctions/BasicMathFunctionsF16.c"/>
<file category="source" name="CMSIS/DSP/Source/CommonTables/CommonTablesF16.c"/>
<file category="source" name="CMSIS/DSP/Source/TransformFunctions/TransformFunctionsF16.c"/>

<!-- Compute Library for Cortex-A -->
<file category="header" name="CMSIS/DSP/ComputeLibrary/Include/NEMath.h" condition="ARMv7-A Device"/>
<file category="source" name="CMSIS/DSP/ComputeLibrary/Source/arm_cl_tables.c" condition="ARMv7-A Device"/>
Expand Down
47 changes: 9 additions & 38 deletions CMSIS/DSP/Include/arm_common_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@

#include "arm_math.h"

#ifdef __cplusplus
extern "C"
{
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
/* Double Precision Float CFFT twiddles */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREV_1024)
Expand Down Expand Up @@ -110,44 +115,6 @@
#define twiddleCoef twiddleCoef_4096
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

/* F16 */
#if !defined(__CC_ARM)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_16)
extern const float16_t twiddleCoefF16_16[32];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_32)
extern const float16_t twiddleCoefF16_32[64];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_64)
extern const float16_t twiddleCoefF16_64[128];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_128)
extern const float16_t twiddleCoefF16_128[256];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_256)
extern const float16_t twiddleCoefF16_256[512];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_512)
extern const float16_t twiddleCoefF16_512[1024];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_1024)
extern const float16_t twiddleCoefF16_1024[2048];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_2048)
extern const float16_t twiddleCoefF16_2048[4096];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#endif /* ARMAC5 */
/* Q31 */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_16)
Expand Down Expand Up @@ -553,5 +520,9 @@
extern const unsigned char hwLUT[256];
#endif /* (defined(ARM_MATH_MVEI) || defined(ARM_MATH_HELIUM)) */

#ifdef __cplusplus
}
#endif

#endif /* ARM_COMMON_TABLES_H */

90 changes: 90 additions & 0 deletions CMSIS/DSP/Include/arm_common_tables_f16.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/* ----------------------------------------------------------------------
* Project: CMSIS DSP Library
* Title: arm_common_tables_f16.h
* Description: Extern declaration for common tables
*
* $Date: 27. January 2017
* $Revision: V.1.5.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
* Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _ARM_COMMON_TABLES_F16_H
#define _ARM_COMMON_TABLES_F16_H

#include "arm_math_f16.h"
#include "arm_common_tables.h"

#ifdef __cplusplus
extern "C"
{
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)

/* F16 */
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_16)
extern const float16_t twiddleCoefF16_16[32];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_32)
extern const float16_t twiddleCoefF16_32[64];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_64)
extern const float16_t twiddleCoefF16_64[128];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_128)
extern const float16_t twiddleCoefF16_128[256];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_256)
extern const float16_t twiddleCoefF16_256[512];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_512)
extern const float16_t twiddleCoefF16_512[1024];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_1024)
extern const float16_t twiddleCoefF16_1024[2048];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_2048)
extern const float16_t twiddleCoefF16_2048[4096];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#endif /* ARMAC5 */

#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES) */


#ifdef __cplusplus
}
#endif

#endif /* _ARM_COMMON_TABLES_F16_H */


21 changes: 9 additions & 12 deletions CMSIS/DSP/Include/arm_const_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#include "arm_math.h"
#include "arm_common_tables.h"

#ifdef __cplusplus
extern "C"
{
#endif
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len16;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len32;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len64;
Expand All @@ -53,18 +57,6 @@
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;

#if !defined(__CC_ARM)
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len16;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len32;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len64;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len128;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len256;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len512;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096;
#endif

extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
Expand All @@ -85,4 +77,9 @@
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;

#ifdef __cplusplus
}
#endif

#endif

57 changes: 57 additions & 0 deletions CMSIS/DSP/Include/arm_const_structs_f16.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* ----------------------------------------------------------------------
* Project: CMSIS DSP Library
* Title: arm_const_structs_f16.h
* Description: Constant structs that are initialized for user convenience.
* For example, some can be given as arguments to the arm_cfft_f16() function.
*
* $Date: 20. April 2020
* $Revision: V.1.5.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
* Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _ARM_CONST_STRUCTS_F16_H
#define _ARM_CONST_STRUCTS_F16_H

#include "arm_math_f16.h"
#include "arm_common_tables_f16.h"

#ifdef __cplusplus
extern "C"
{
#endif

#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len16;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len32;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len64;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len128;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len256;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len512;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048;
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096;
#endif

#ifdef __cplusplus
}
#endif

#endif
9 changes: 9 additions & 0 deletions CMSIS/DSP/Include/arm_helium_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#ifndef _ARM_UTILS_HELIUM_H_
#define _ARM_UTILS_HELIUM_H_


#ifdef __cplusplus
extern "C"
{
#endif
/***************************************
Definitions available for MVEF and MVEI
Expand Down Expand Up @@ -360,4 +365,8 @@ __STATIC_INLINE q15x8_t FAST_VSQRT_Q15(q15x8_t vecIn)

#endif /* defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEI) */

#ifdef __cplusplus
}
#endif

#endif
Loading

0 comments on commit c46f152

Please sign in to comment.