|
| 1 | +.. _zdsp_api: |
| 2 | + |
| 3 | +Digital Signal Processing (DSP) |
| 4 | +############################### |
| 5 | + |
| 6 | +.. contents:: |
| 7 | + :local: |
| 8 | + :depth: 2 |
| 9 | + |
| 10 | +The DSP API provides an architecture agnostic way for signal processing. |
| 11 | +Currently, the API will work on any architecture but will likely not be |
| 12 | +optimized. The status of the various architectures can be found below: |
| 13 | + |
| 14 | ++--------------+-------------+ |
| 15 | +| Architecture | Status | |
| 16 | ++--------------+-------------+ |
| 17 | +| ARC | Unoptimized | |
| 18 | +| ARM | Optimized | |
| 19 | +| ARM64 | Optimized | |
| 20 | +| MIPS | Unoptimized | |
| 21 | +| NIOS2 | Unoptimized | |
| 22 | +| POSIX | Unoptimized | |
| 23 | +| RISCV | Unoptimized | |
| 24 | +| RISCV64 | Unoptimized | |
| 25 | +| SPARC | Unoptimized | |
| 26 | +| X86 | Unoptimized | |
| 27 | +| XTENSA | Unoptimized | |
| 28 | ++--------------+-------------+ |
| 29 | + |
| 30 | +Using zDSP |
| 31 | +********** |
| 32 | + |
| 33 | +zDSP provides various backend options which are selected automatically for the |
| 34 | +application. By default, including the CMSIS module will enable all |
| 35 | +architectures to use the zDSP APIs. This can be done by setting:: |
| 36 | + |
| 37 | + CONFIG_CMSIS_DSP=y |
| 38 | + |
| 39 | +If your application requires some additional customization, it's possible to |
| 40 | +enable :kconfig:option:`CONFIG_DSP_BACKEND_CUSTOM` which means that the |
| 41 | +application is responsible for providing the implementation of the zDSP |
| 42 | +library. |
| 43 | + |
| 44 | +Optimizing for your architecture |
| 45 | +******************************** |
| 46 | + |
| 47 | +If your architecture is showing as ``Unoptimized``, it's possible to add a new |
| 48 | +zDSP backend to better support it. To do that, a new Kconfig option should be |
| 49 | +added to `subsys/dsp/Kconfig`_ along with the required dependencies and the |
| 50 | +``default`` set for ``DSP_BACKEND`` Kconfig choice. |
| 51 | + |
| 52 | +Next, the implementation should be added at ``subsys/dsp/<backend>/`` and |
| 53 | +linked in at `subsys/dsp/CMakeLists.txt`_. |
| 54 | + |
| 55 | +API Reference |
| 56 | +************* |
| 57 | + |
| 58 | +.. doxygengroup:: math_dsp |
| 59 | + |
| 60 | +.. _subsys/dsp/Kconfig: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/Kconfig |
| 61 | +.. _subsys/dsp/CMakeLists.txt: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/CMakeLists.txt |
0 commit comments