forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math: Introduce a DSP basicmath subsystem with a cmsis backend
Introduce an API mirroring the CMSIS-DSP's basicmath. If CMSIS_DSP is enabled, then it will by default be used as a backend. Developers may opt into a custom backend by setting CONFIG_DSP_BACKEND_CMSIS=n. If done, the application must provide `zdsp_backend/dsp.h` and optionally implement the functions in its own .c files. Signed-off-by: Yuval Peress <[email protected]>
- Loading branch information
1 parent
0433965
commit b38445e
Showing
20 changed files
with
1,637 additions
and
3 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.. _zdsp_api: | ||
|
||
Digital Signal Processing (DSP) | ||
############################### | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 2 | ||
|
||
The DSP API provides an architecture agnostic way for signal processing. | ||
Currently, the API will work on any architecture but will likely not be | ||
optimized. The status of the various architectures can be found below: | ||
|
||
+--------------+-------------+ | ||
| Architecture | Status | | ||
+--------------+-------------+ | ||
| ARC | Unoptimized | | ||
| ARM | Optimized | | ||
| ARM64 | Optimized | | ||
| MIPS | Unoptimized | | ||
| NIOS2 | Unoptimized | | ||
| POSIX | Unoptimized | | ||
| RISCV | Unoptimized | | ||
| RISCV64 | Unoptimized | | ||
| SPARC | Unoptimized | | ||
| X86 | Unoptimized | | ||
| XTENSA | Unoptimized | | ||
+--------------+-------------+ | ||
|
||
Using zDSP | ||
********** | ||
|
||
zDSP provides various backend options which are selected automatically for the | ||
application. By default, including the CMSIS module will enable all | ||
architectures to use the zDSP APIs. This can be done by setting:: | ||
|
||
CONFIG_CMSIS_DSP=y | ||
|
||
If your application requires some additional customization, it's possible to | ||
enable :kconfig:option:`CONFIG_DSP_BACKEND_CUSTOM` which means that the | ||
application is responsible for providing the implementation of the zDSP | ||
library. | ||
|
||
Optimizing for your architecture | ||
******************************** | ||
|
||
If your architecture is showing as ``Unoptimized``, it's possible to add a new | ||
zDSP backend to better support it. To do that, a new Kconfig option should be | ||
added to `subsys/dsp/Kconfig`_ along with the required dependencies and the | ||
``default`` set for ``DSP_BACKEND`` Kconfig choice. | ||
|
||
Next, the implementation should be added at ``subsys/dsp/<backend>/`` and | ||
linked in at `subsys/dsp/CMakeLists.txt`_. | ||
|
||
API Reference | ||
************* | ||
|
||
.. doxygengroup:: math_dsp | ||
|
||
.. _subsys/dsp/Kconfig: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/Kconfig | ||
.. _subsys/dsp/CMakeLists.txt: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/CMakeLists.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.