services/debugging/mipi_stp_decoder.html · services/debugging/mipi_stp_decoder.rst 공식 원문 ↗

Zephyr 3.7.0 · Debugging

MIPI STP Decoder

여러 trace source의 stream을 opcode, data와 timestamp 단위로 chip 내부에서 decode합니다.

Official pathservices/debugging/mipi_stp_decoder.html
Source fileservices/debugging/mipi_stp_decoder.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Synchronization state, ASYNC 탐색, callback 처리와 endian·unaligned-access 제한을 설명합니다.

Version

STP v2

Sync

ASYNC opcode

Endian

Little only

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 6AA6ED5312DED67FFA8775AF5240025A8FC3D483D0E000EAB8E7DCF76FE60FC2
.. _mipi_stp_decoder:

MIPI STP Decoder
################

The MIPI System Trace Protocol (MIPI STP) was developed as a generic base protocol that can
be shared by multiple application-specific trace protocols. It serves as a wrapper protocol
that merges disparate streams that typically contain different trace protocols from different
trace sources. Stream consists of opcode (shortest is 4 bit long) followed by optional data and
optional timestamp. There are opcodes for data (8, 16, 32, 64 bit data marked/not marked, with or
without timestamp), stream recognition (master and channel), synchronization (ASYNC opcode) and
others.

One example where protocol is used is ARM Coresight STM (System Trace Macrocell) where data
written to Stimulus Port registers maps directly to STP stream.

This module can be used to perform on-chip decoding of the data stream. STP v2 is used.

Usage
*****

Decoder is initialized with a callback. A callback is called on each decoded opcode.
Decoder has internal state since there are dependency between opcodes (e.g. timestamp can be
relative). Decoder can be in synchronization or not. Initial state is configurable.
If decoder is not synchronized to the stream then it decodes each nibble in search for ASYNC opcode.
Loss of synchronization can be indicated to the decoder by calling
:c:func:`mipi_stp_decoder_sync_loss`. :c:func:`mipi_stp_decoder_decode` is used to decode the data.

Limitations
***********

There are following limitations:

* Decoder supports only little endian architectures.
* When decoding nibbles, it is more efficient when core supports unaligned memory access.
  Implementation supports optimized version with unaligned memory access and generic one.
  Optimized version is used for ARM Cortex-M (expect for M0).
* Limited set of the most common opcodes is implemented.

API documentation
*****************

.. doxygengroup:: mipi_stp_decoder_apis

Part 3

한국어 전문 번역

MIPI System Trace Protocol(MIPI STP)은 여러 application-specific trace protocol이 공유할 수 있는 범용 base protocol입니다. 서로 다른 trace source에서 나온 여러 trace protocol stream을 하나로 합치는 wrapper protocol 역할을 합니다. Stream은 최소 4-bit opcode와 optional data, optional timestamp로 구성됩니다. Data opcode는 8·16·32·64-bit의 marked/unmarked data와 timestamp 유무를 표현하고, stream recognition은 master와 channel을, synchronization은 ASYNC opcode를 사용합니다.

ARM CoreSight STM(System Trace Macrocell)이 사용 예입니다. Stimulus Port register에 쓴 data가 STP stream으로 직접 mapping됩니다.

이 module은 data stream을 chip 내부에서 decode하며 STP v2를 사용합니다.

사용법

Decoder는 callback과 함께 initialize되며 opcode를 하나 decode할 때마다 callback을 호출합니다. Relative timestamp처럼 opcode 사이에 dependency가 있으므로 decoder는 internal state를 유지합니다. Synchronization 상태인지 여부와 initial state를 설정할 수 있습니다.

Stream과 synchronize되지 않은 decoder는 ASYNC opcode를 찾으며 nibble을 하나씩 decode합니다. Synchronization loss는 mipi_stp_decoder_sync_loss를 호출해 알리고, data decode에는 mipi_stp_decoder_decode를 사용합니다.

제한 사항

  • Little-endian architecture만 지원합니다.
  • Nibble decode는 core가 unaligned memory access를 지원할 때 더 효율적입니다. 구현은 unaligned access 최적화 version과 generic version을 모두 제공하며 ARM Cortex-M에서는 M0를 제외하고 최적화 version을 사용합니다.
  • 가장 흔히 쓰는 opcode 일부만 구현되어 있습니다.

API 문서

원문의 Doxygen group mipi_stp_decoder_apis에 decoder API가 수록됩니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.