Part 1
요약·해설
ARC·ARM·ARM64 optimized 상태와 CMSIS 기본 backend, Kconfig·CMake·DSP_DATA 확장 지점을 설명합니다.
zDSP
CMSIS-DSP
Built-in · custom
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
CED6B635F4D02E0E5641CC31D7A5A0023ECC80DC28A6E028EB0D98FF6E2AFDBC
.. _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 Optimized
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 :file:`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 :file:`subsys/dsp/CMakeLists.txt`. To add architecture-specific attributes,
its corresponding Kconfig option should be added to :file:`subsys/dsp/Kconfig` and use
them to update ``DSP_DATA`` and ``DSP_STATIC_DATA`` in :file:`include/zephyr/dsp/dsp.h`.
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
.. _include/zephyr/dsp/dsp.h: https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/dsp/dsp.h
Part 3
한국어 전문 번역
DSP API는 architecture에 종속되지 않는 signal processing 인터페이스를 제공합니다. 현재 어느 architecture에서도 동작하지만, architecture별 backend 상태에 따라 최적화 여부가 다릅니다.
| Architecture | Status |
|---|---|
| ARC | Optimized |
| ARM | Optimized |
| ARM64 | Optimized |
| MIPS | Unoptimized |
| NIOS2 | Unoptimized |
| POSIX | Unoptimized |
| RISCV | Unoptimized |
| RISCV64 | Unoptimized |
| SPARC | Unoptimized |
| X86 | Unoptimized |
| XTENSA | Unoptimized |
zDSP 사용
zDSP는 여러 backend option을 제공하며 application에 맞는 backend를 자동 선택합니다. 기본적으로 CMSIS module을 포함하면 모든 architecture에서 zDSP API를 사용할 수 있습니다. 다음 option을 설정합니다.
CONFIG_CMSIS_DSP=y
Application에 추가 customization이 필요하면 CONFIG_DSP_BACKEND_CUSTOM을 활성화할 수 있습니다. 이 경우 zDSP library 구현을 제공할 책임은 application에 있습니다.
Architecture 최적화
위 표에서 Unoptimized로 표시된 architecture는 새 zDSP backend를 추가해 더 효율적으로 지원할 수 있습니다. 먼저 subsys/dsp/Kconfig에 필요한 dependency와 함께 새 Kconfig option을 추가하고, DSP_BACKEND Kconfig choice의 default를 지정합니다.
그다음 구현을 subsys/dsp/<backend>/에 추가하고 subsys/dsp/CMakeLists.txt에서 link합니다. Architecture-specific attribute가 필요하면 대응하는 Kconfig option을 subsys/dsp/Kconfig에 추가하고, 그 option으로 include/zephyr/dsp/dsp.h의 DSP_DATA와 DSP_STATIC_DATA를 갱신합니다.
API Reference
관련 API는 math_dsp Doxygen group에 정의돼 있습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.