1# Copyright (c) 2023 Meta Platforms 2# SPDX-License-Identifier: Apache-2.0 3 4config ZEPHYR_CMSIS_DSP_MODULE 5 bool 6 7menuconfig CMSIS_DSP 8 bool "CMSIS-DSP Library Support" 9 help 10 This option enables the CMSIS-DSP library. 11 12if CMSIS_DSP 13 14comment "Components" 15config CMSIS_DSP_BASICMATH 16 bool "Basic Math Functions" 17 help 18 This option enables the Basic Math Functions, which support the 19 following operations: 20 21 * Elementwise Clipping 22 * Vector Absolute Value 23 * Vector Addition 24 * Vector Subtraction 25 * Vector Multiplication 26 * Vector Dot Product 27 * Vector Absolute Value 28 * Vector Negate 29 * Vector Offset 30 * Vector Scale 31 * Vector Shift 32 * Vector Bitwise AND 33 * Vector Bitwise OR 34 * Vector Bitwise Exclusive OR 35 * Vector Bitwise NOT 36 37config CMSIS_DSP_COMPLEXMATH 38 bool "Complex Math Functions" 39 imply CMSIS_DSP_FASTMATH 40 help 41 This option enables the Complex Math Functions, which support the 42 following operations: 43 44 * Complex-by-Complex Multiplication 45 * Complex-by-Real Multiplication 46 * Complex Dot Product 47 * Complex Magnitude 48 * Complex Magnitude Squared 49 * Complex Conjugate 50 51config CMSIS_DSP_CONTROLLER 52 bool "Controller Functions" 53 help 54 This option enables the Controller Functions, which support the 55 following operations: 56 57 * PID Control 58 * Vector Clarke Transform 59 * Vector Inverse Clarke Transform 60 * Vector Park Transform 61 * Vector Inverse Park Transform 62 * Sine-Cosine 63 64 These functions can be used to implement a generic PID controller, as 65 well as field oriented motor control using Space Vector Modulation 66 algorithm. 67 68config CMSIS_DSP_FASTMATH 69 bool "Fast Math Functions" 70 imply CMSIS_DSP_BASICMATH 71 help 72 This option enables the Fast Math Functions, which support the 73 following operations: 74 75 * Fixed-Point Division 76 * Sine 77 * Cosine 78 * Square Root 79 80config CMSIS_DSP_FILTERING 81 bool "Filtering Functions" 82 imply CMSIS_DSP_BASICMATH 83 imply CMSIS_DSP_FASTMATH 84 imply CMSIS_DSP_SUPPORT 85 help 86 This option enables the Filtering Functions, which support the 87 following operations: 88 89 * Convolution 90 * Partial Convolution 91 * Correlation 92 * Levinson-Durbin Algorithm 93 94 The following filter types are supported: 95 96 * FIR (finite impulse response) Filter 97 * FIR Lattice Filter 98 * FIR Sparse Filter 99 * FIR Filter with Decimator 100 * FIR Filter with Interpolator 101 * IIR (infinite impulse response) Lattice Filter 102 * Biquad Cascade IIR Filter, Direct Form I Structure 103 * Biquad Cascade IIR Filter, Direct Form II Transposed Structure 104 * High Precision Q31 Biquad Cascade Filter 105 * LMS (least mean square) Filter 106 * Normalized LMS Filter 107 108config CMSIS_DSP_INTERPOLATION 109 bool "Interpolation Functions" 110 help 111 This option enables the Interpolation Functions, which support the 112 following operations: 113 114 * Bilinear Interpolation 115 * Linear Interpolation 116 * Cubic Spline Interpolation 117 118config CMSIS_DSP_MATRIX 119 bool "Matrix Functions" 120 help 121 This option enables the Matrix Functions, which support the following 122 operations: 123 124 * Matrix Initialization 125 * Matrix Addition 126 * Matrix Subtraction 127 * Matrix Multiplication 128 * Complex Matrix Multiplication 129 * Matrix Vector Multiplication 130 * Matrix Inverse 131 * Matrix Scale 132 * Matrix Transpose 133 * Complex Matrix Transpose 134 * Cholesky and LDLT Decompositions 135 136config CMSIS_DSP_QUATERNIONMATH 137 bool "Quaternion Math Functions" 138 help 139 This option enables the Quaternion Math Functions, which support the 140 following operations: 141 142 * Quaternion Conversions 143 * Quaternion Conjugate 144 * Quaternion Inverse 145 * Quaternion Norm 146 * Quaternion Normalization 147 * Quaternion Product 148 149config CMSIS_DSP_STATISTICS 150 bool "Statistics Functions" 151 imply CMSIS_DSP_BASICMATH 152 imply CMSIS_DSP_FASTMATH 153 help 154 This option enables the Statistics Functions, which support the 155 following operations: 156 157 * Minimum 158 * Absolute Minimum 159 * Maximum 160 * Absolute Maximum 161 * Mean 162 * Root Mean Square (RMS) 163 * Variance 164 * Standard Deviation 165 * Power 166 * Entropy 167 * Kullback-Leibler Divergence 168 * LogSumExp (LSE) 169 170config CMSIS_DSP_SUPPORT 171 bool "Support Functions" 172 help 173 This option enables the Support Functions, which support the 174 following operations: 175 176 * Vector 8-bit Integer Value Conversion 177 * Vector 16-bit Integer Value Conversion 178 * Vector 32-bit Integer Value Conversion 179 * Vector 16-bit Floating-Point Value Conversion 180 * Vector 32-bit Floating-Point Value Conversion 181 * Vector Copy 182 * Vector Fill 183 * Vector Sorting 184 * Weighted Sum 185 * Barycenter 186 187config CMSIS_DSP_TRANSFORM 188 bool "Transform Functions" 189 imply CMSIS_DSP_BASICMATH 190 help 191 This option enables the Transform Functions, which support the 192 following transformations: 193 194 * Real Fast Fourier Transform (RFFT) 195 * Complex Fast Fourier Transform (CFFT) 196 * Type IV Discrete Cosine Transform (DCT4) 197 198config CMSIS_DSP_SVM 199 bool "Support Vector Machine Functions" 200 help 201 This option enables the Support Vector Machine Functions, which 202 support the following algorithms: 203 204 * Linear 205 * Polynomial 206 * Sigmoid 207 * Radial Basis Function (RBF) 208 209config CMSIS_DSP_BAYES 210 bool "Bayesian Estimators" 211 imply CMSIS_DSP_STATISTICS 212 help 213 This option enables the Bayesian Estimator Functions, which 214 implements the naive gaussian Bayes estimator. 215 216config CMSIS_DSP_DISTANCE 217 bool "Distance Functions" 218 imply CMSIS_DSP_STATISTICS 219 help 220 This option enables the Distance Functions, which support the 221 following distance computation algorithms: 222 223 * Boolean Vectors 224 * Hamming 225 * Jaccard 226 * Kulsinski 227 * Rogers-Tanimoto 228 * Russell-Rao 229 * Sokal-Michener 230 * Sokal-Sneath 231 * Yule 232 * Dice 233 234 * Floating-Point Vectors 235 * Canberra 236 * Chebyshev 237 * Cityblock 238 * Correlation 239 * Cosine 240 * Euclidean 241 * Jensen-Shannon 242 * Minkowski 243 * Bray-Curtis 244 245config CMSIS_DSP_WINDOW 246 bool "Windowing Functions" 247 help 248 This option enabled the Window Functions, which support the 249 following windowing functions: 250 251 * Bartlett 252 * Hamming 253 * Hanning 254 * Nuttall 255 * Blackman Harris 256 * HFT 257 258comment "Instruction Set" 259# NOTE: These configurations should eventually be derived from the arch ISA and 260# FP support configurations. 261 262config CMSIS_DSP_NEON 263 bool "Neon Instruction Set" 264 default y 265 depends on CPU_CORTEX_A 266 help 267 This option enables the NEON Advanced SIMD instruction set, which is 268 available on most Cortex-A and some Cortex-R processors. 269 270config CMSIS_DSP_NEON_EXPERIMENTAL 271 bool "Neon Instruction Set" 272 depends on CPU_CORTEX_A 273 help 274 This option enables the NEON Advanced SIMD instruction set, which is 275 available on most Cortex-A and some Cortex-R processors. 276 277config CMSIS_DSP_HELIUM_EXPERIMENTAL 278 bool "Helium Instruction Set" 279 depends on FP_HARDABI && (ARMV8_1_M_MVEI || ARMV8_1_M_MVEF) 280 help 281 This option enables the Helium Advanced SIMD instruction set, which is 282 available on some Cortex-M processors. 283 284comment "Features" 285 286config CMSIS_DSP_LOOPUNROLL 287 bool "Loop Unrolling" 288 help 289 This option enables manual loop unrolling in the DSP functions. 290 291config CMSIS_DSP_ROUNDING 292 bool "Rounding" 293 help 294 This option enables rounding on the support functions. 295 296config CMSIS_DSP_MATRIXCHECK 297 bool "Matrix Check" 298 help 299 This option enables validation of the input and output sizes of 300 matrices. 301 302config CMSIS_DSP_AUTOVECTORIZE 303 bool "Auto Vectorize" 304 help 305 This option prefers autovectorizable code to one using C intrinsics 306 in the DSP functions. 307 308config CMSIS_DSP_FLOAT16 309 bool "Half-Precision (16-bit Float) Support" 310 default y 311 depends on FP16 312 help 313 This option enables the half-precision (16-bit) floating-point 314 operations support. 315 316config CMSIS_DSP_LAX_VECTOR_CONVERSIONS 317 bool "Lax Vector Conversions" 318 default y 319 depends on FP_HARDABI && (ARMV8_1_M_MVEI || ARMV8_1_M_MVEF) 320 help 321 This option enables lax vector conversions 322 323endif #CMSIS_DSP 324