Mipi Architecture Overview For Debug v1-0
Mipi Architecture Overview For Debug v1-0
Debug
Version 1.0
14 February 2014
MIPI Board Approved for Public Distribution 12-Mar-2014
NOTICE OF DISCLAIMER
The material contained herein is not a license, either expressly or impliedly, to any IPR owned or controlled
by any of the authors or developers of this material or MIPI. The material contained herein is provided on
an AS IS basis and to the maximum extent permitted by applicable law, this material is provided AS IS
AND WITH ALL FAULTS, and the authors and developers of this material and MIPI hereby disclaim all
other warranties and conditions, either express, implied or statutory, including, but not limited to, any (if
any) implied warranties, duties or conditions of merchantability, of fitness for a particular purpose, of
accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses, and of lack of
negligence.
All materials contained herein are protected by copyright laws, and may not be reproduced, republished,
distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express
prior written permission of MIPI Alliance. MIPI, MIPI Alliance and the dotted rainbow arch and all related
trademarks, tradenames, and other intellectual property are the exclusive property of MIPI Alliance and
cannot be used without its express prior written permission.
ALSO, THERE IS NO WARRANTY OF CONDITION OF TITLE, QUIET ENJOYMENT, QUIET
POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD
TO THIS MATERIAL OR THE CONTENTS OF THIS DOCUMENT. IN NO EVENT WILL ANY
AUTHOR OR DEVELOPER OF THIS MATERIAL OR THE CONTENTS OF THIS DOCUMENT OR
MIPI BE LIABLE TO ANY OTHER PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS
OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER
CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY
OTHER AGREEMENT, SPECIFICATION OR DOCUMENT RELATING TO THIS MATERIAL,
WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH
DAMAGES.
Without limiting the generality of this Disclaimer stated above, the user of the contents of this Document is
further notified that MIPI: (a) does not evaluate, test or verify the accuracy, soundness or credibility of the
contents of this Document; (b) does not monitor or enforce compliance with the contents of this Document;
and (c) does not certify, test, or in any manner investigate products or services or any claims of compliance
with the contents of this Document. The use or implementation of the contents of this Document may
involve or require the use of intellectual property rights (IPR) including (but not limited to) patents,
patent applications, or copyrights owned by one or more parties, whether or not Members of MIPI. MIPI
does not make any search or investigation for IPR, nor does MIPI require or request the disclosure of any
IPR or claims of IPR as respects the contents of this Document or otherwise.
Questions pertaining to this document, or the terms or conditions of its provision, should be addressed to:
MIPI Alliance, Inc.
c/o IEEE-ISTO
445 Hoes Lane
Piscataway, NJ 08854
Attn: Board Secretary
Contents
Contents ............................................................................................................................ iii
Figures.................................................................................................................................v
Release History ................................................................................................................ vii
1 Overview ......................................................................................................................1
1.1 Scope ............................................................................................................................. 1
2 Terminology .................................................................................................................2
2.1 Definitions ..................................................................................................................... 2
2.2 Abbreviations ................................................................................................................. 5
2.3 Acronyms....................................................................................................................... 5
3 References ....................................................................................................................8
4 Debug System ..............................................................................................................9
4.1 System Framework ........................................................................................................ 9
4.2 The MIPI Debug and Test System ............................................................................... 10
5 Debug Physical Interfaces (DPI) ..............................................................................12
5.1 Parallel Trace Interface (PTI) Specification Overview................................................. 12
5.1.1 Trace and Debug ....................................................................................................... 12
5.1.2 Trace Scenarios ......................................................................................................... 13
5.1.3 Detailed Specification ............................................................................................... 18
5.2 Connector Recommendation Overview ....................................................................... 19
5.2.1 Dedicated Debug Connector Overview..................................................................... 19
5.2.2 Basic Debug Connectors ........................................................................................... 19
5.2.3 High-Speed Parallel Trace Connectors ..................................................................... 20
5.2.4 Detailed Documentation ........................................................................................... 20
5.3 Narrow Interface for Debug and Test (NIDnT) Specification Overview ...................... 21
5.3.1 NIDnT overview ....................................................................................................... 21
5.3.2 NIDnT Details .......................................................................................................... 21
5.3.3 Debug and Test Capabilities Supported by NIDnT Overlay Modes .......................... 23
5.3.4 Functional Interfaces that are NIDnT Candidates ..................................................... 24
5.3.5 Detailed Specification ............................................................................................... 24
6 Debug Access and Control Subsystem (DACS) ......................................................25
6.1 IEEE 1149.7 Debug and Test Interface Specification Overview .................................. 25
6.1.1 Relationship to MIPI Debug Architecture ................................................................. 26
6.1.2 Detailed Specification ............................................................................................... 27
6.2 SneakPeekSM (ongoing)................................................................................................ 27
6.2.1 Relationship to MIPI Debug Architecture ................................................................. 27
6.2.2 SneakPeek Overview ................................................................................................ 28
6.2.3 Detailed Specifications ............................................................................................. 31
7 Debug Instrumentation and Visibility Subsystem (DIVS) ....................................32
7.1 Instrumentation and Visibility Subsystem Overview ................................................... 32
7.2 System Trace Protocol Specification Overview ........................................................... 32
7.2.1 Relationship to MIPI Debug Architecture ................................................................. 32
7.2.2 Protocol Overview .................................................................................................... 33
Figures
Figure 1 MIPI Debug Generic System Framework ...................................................................... 10
Figure 2 MIPI Debug Documentation and the Debug Architecture .............................................. 11
Figure 3 Example MIPI System Overview ................................................................................... 11
Figure 4 PTI in the MIPI Debug Architecture .............................................................................. 13
Figure 5 Example System with PTI .............................................................................................. 14
Figure 6 PTI Layers within a System ........................................................................................... 15
Figure 7 Multi-Point PTI with 4-Pin Trace and Four Devices Sharing the Connector .................. 17
Figure 8 Multi-Point PTI with 4-Pin Trace and Two Devices Sharing the Connector .................. 18
Figure 9 Connectors in the MIPI Debug Architecture .................................................................. 19
Figure 10 Basic Debug PCB (left) and Cable End Connector (34-pin Samtec FTSH) ................. 20
Figure 11 Recommended Samtec QSH/QTH Connector .............................................................. 20
Figure 12 NIDnT in the MIPI Debug Architecture ....................................................................... 21
Figure 13 Example of System with a Dedicated Debug Interface ................................................ 22
Figure 14 Example of System with NIDnT Capability ................................................................. 23
Figure 15 DTS to TS Connectivity ............................................................................................... 26
Figure 16 IEEE 1149.7 in the MIPI Debug Architecture .............................................................. 27
Figure 17 SneakPeek in the MIPI Debug Architecture ................................................................. 28
Figure 18 Overview of SneakPeek System ................................................................................... 29
Figure 19 SneakPeek Protocol and Network Stacks in DTS and TS............................................. 30
Figure 20 STP in the MIPI Debug Architecture ............................................................................ 33
Figure 21 Conceptual Hierarchy of STP Masters and Channels ................................................... 34
Figure 22 STM in a Target System ............................................................................................... 34
Figure 23 Example STP Packet Sequence .................................................................................... 35
Figure 24 TWP in the MIPI Debug Architecture .......................................................................... 36
Figure 25 Example Use-cases for Layers T1, T2 and T3 .............................................................. 37
Figure 26 Gigabit Trace and the MIPI Debug Architecture .......................................................... 38
Figure 27 Typical GbT Configuration and Data Flow (TS) .......................................................... 39
Figure 28 Typical GbT Configuration and Data Flow (DTC and DTS) ........................................ 40
Figure 29 Example Trace Architecture ......................................................................................... 42
Figure 30 Gigabit Debug Functional Block Diagram ................................................................... 44
Figure 31 GbD in a Multiple-node Network ................................................................................. 45
Release History
Date Version Description
1 Overview
1.1 Scope
1 Recent technological developments have resulted in a quantum leap in the complexity of SoCs. Systems
2 that were formerly deployed on one or more PCBs are now being instantiated as single discrete devices.
3 While this trend is in general a boon to manufacturers and consumers of mobile systems, it has greatly
4 increased the complexity of system debug and optimization. Signals and interfaces that used to be visible
5 at test points on a PCB are now deeply embedded inside an SoC. The use of tried and true methods of
6 probing buses and signals with dedicated Debug and Test equipment is now virtually impossible.
7 This increase in debug complexity is being addressed by IP vendors, SoC developers, OEMs and tools
8 vendors. New technologies are being deployed that provide the visibility required in these complex and
9 deeply embedded designs. In order to maximize the utility and efficiency of debug, converging on
10 common interfaces and protocols used by these new technologies is essential. There are efforts to
11 standardize debug effort across certain industry spaces, but there was not such an effort addressing the
12 particular debug needs of the mobile space.
13 To meet this need, the MIPI Debug Working Group (Debug WG) are developing a portfolio of standards
14 and other documents that address the particular needs of debug in the mobile and mobile-influenced space.
15 Some of the areas of focus are listed below.
16 Minimizing the pin cost and increasing the performance of the basic debug interface
17 Increasing the bandwidth, capability and reliability of the high performance interfaces used to
18 export high bandwidth, unidirectional debug data (e.g. processor trace data) to the debug tools
19 Deploying debug connectors that are physically robust and have the performance required for the
20 high bandwidth demands of modern debug technologies
21 Developing generic trace protocols that allow many different on chip trace sources to share a
22 single trace data flow to the debug tools
23 Maximizing debug visibility in fielded systems by reusing some of the functional
24 interfaces/connectors for debug
25 Utilizing the new high bandwidth functional interfaces being deployed on mobile systems as a
26 transport for debug
27 This document provides an overview of the efforts to address these goals and provides summaries of the
28 documents that address them in detail.
2 Terminology
2.1 Definitions
29 1149.1: Short for IEEE 1149.1. See [IEEE01].
30 1149.7: Short for IEEE 1149.7. See [IEEE02].
31 Application Function: All functions of the TS other than Debug and Test Functions.
32 Application Processor: A programmable CPU (or CPU-based system on a chip (SoC) which may include
33 other programmable processors such as DSPs), primarily, but not necessarily exclusively, programmed to
34 coordinate the application processing and user interface processing in a mobile terminal.
35 Application Software: Used here to mean the target resident code that runs on the target processor. This
36 includes the operating system as well as the program(s) running with the OS.
37 Basic Debug Communication: Debug communication needed through an 1149.1 (or equivalent) port only
38 to manage basic debug communication functions such as run control, hardware breakpoints and
39 watchpoints, and examining system state.
40 Boundary Scan: A production test mechanism where interconnects between chips or logic blocks in an
41 SoC are verified by forcing known test patterns into the system via a serial scan interface, activating a test
42 mode, and then scanning out the resultant values to test against expected results.
43 Built-in Self-Test (BIST): On-chip logic function that verifies all or a portion of the internal functionality
44 of an SoC during production tests. BIST logic requires minimal interaction with external test
45 infrastructures and speeds up verification of complex SoCs.
46 Debug: To detect, trace, and eliminate SW mistakes. Also used to get an insight into an embedded
47 processor system for performance measurements and debug of system level hardware. Used in this
48 document in an inclusive way that encompasses stop/start/break/step debugging as well as non-halting
49 methods such as trace.
50 Debug Access and Control Subsystem (DACS): The subsystem that provides a path for the DTS to obtain
51 direct access to application visible system resources (registers and memory).
52 Debug and Test Controller (DTC): The hardware system that is responsible for managing
53 communications with a system being debugged (the Target System).
54 Debug and Test Function: A block of on-chip logic that carries out a debug function such as run control,
55 providing debug access to system resources, Processor Trace, or test capability.
56 Debug and Test Interface (DTI): The interface between the Debug and Test System (DTS) and the Target
57 System (TS). The interface enables access to basic debug communication, the trace port, streaming data
58 (input and output), and other debug or test capabilities.
59 Debug and Test System (DTS): The combined HW and SW system that provides a system developer
60 debug visibility and control when connected to a Target System. The system incorporates:
61 A host PC, workstation or other processing system, running the debug or test software, controlling
62 the Debug and Test Controller. See also: Debug and Test Controller (DTC).
63 Debugger: The debugger software, part of the Debug and Test System. It interacts with the Debug
64 and Test Controller and provides the (graphical) user interface for operating the Debug and Test
65 Controller (like commanding single step, setting breakpoints, memory display/modify, trace
66 reconstruction, etc.)
67 Debug and Test Target (DTT): A component in the Target System that implements one or more Debug
68 and Test Functions. The interfaces to Debug and Test Targets, where different from the DTI, are not within
69 the scope of this specification. Examples include the debug control module on a CPU, debug interface to
70 system memory, or the configuration interface to an on-chip trace module.
71 Debug Instrumentation and Visibility Subsystem (DIVS): The subsystem that provides communication
72 and storage of data generated by debug instrumentation modules (like processor and system trace) in the
73 target system.
74 Debug Physical Interfaces (DPI): The chip and board level interfaces used to connect the DTC to the on-
75 chip debug functions.
76 Double Data Rate (DDR): A parallel data interface that provides valid data on both the rising and falling
77 edge of the interface clock.
78 Electrical: The definition of:
79 Signal voltage levels, current drain and drive strength on inputs, outputs, and bi-directional pins
80 Rise and fall times and expected loads for device pins.
81 Function Assignment: The mapping of functions to signals (and thus to pins as per the current Pin
82 Assignment, e.g. Debug port pin [5] = CLK = TRACECLK.)
83 Function Select: The method by which the Basic Debug Communication channel can be switched between
84 use for Debug Functions and use for operations needed to configure the debug system.
85 Gigabit Trace (GbT): A system architecture that supports transporting trace data over high-speed
86 networks and transports. See [MIPI04a].
87 Gigabit Debug (GbD): A set of network-specific adaptor specifications for mapping SneakPeek and
88 Gigabit Trace to various functional networks.
89 Hardware Protocol: The signal protocol required for a Debug and Test Controller to correctly move
90 control or data information between the DTC and Target System.
91 High Bandwidth Connection: A Mating Connection, Pin Assignment and Electrical specification for full
92 functionality, high frequency, higher pin count connection between the Target System and the Debug and
93 Test Controller / TPA.
94 IEEE 1149.7 (basic debug communication): Enhanced IEEE1149.1 Debug and Test communication
95 standard, configurable from 4 to 2 pins. The IEEE 1149.7 interface can be viewed as providing
96 functionality enhanced compared to 1149.1 for Basic Debug Communication and test and with fewer pins.
97 A two-way communication channel for exclusive Debug and Test uses. See [IEEE02].
98 Intellectual Property (IP): any patents, patent rights, trademarks, service marks, registered designs,
99 topography or semiconductor mask work rights, applications for any of the foregoing, copyrights,
100 unregistered design rights, trade secrets and know-how and any other similar protected rights in any
101 country. Any IP definition by MIPI By-Laws will supersede this local one.
102 Low Pin Count Connection: A Mating Connection, Pin Assignment and Electrical specification for Basic
103 Debug Communication and limited Trace Port functionality, lower frequency, low pin count connection
104 between the Target System and the Debug and Test Controller / TPA.
105 Mating Connection: The connector to be used, defined by specific manufacturer and part number. The
106 required keep out area for board design to enable unobstructed connector mating. The definition of cable
107 characteristics and terminations may include the characteristics of a connection from the point it leaves an
108 output buffer in a chip on the target or host side, routing on a printed circuit board on the DTC or Target
109 System side, cabling between the signal source and destination, and any connections (via connectors) in the
110 signal path.
111 Min-Pin: An interface for Basic Debug Communication with a minimal number of pins (2), using either
112 IEEE 1149.7 or SWD.
113 Mode Select: A method for selecting a different Mating Connection, a different operating mode, a different
114 electrical mode or a combination of these, for example switching between 1149.1 and 1149.7.
115 Narrow Interface for Debug and Test (NIDnT): A signal-mapping specification that defines how to
116 reuse the functional interfaces commonly available on fielded mobile systems for debug. See [MIPI05].
117 Nexus: An IEEE-ISTO 5001 standard interface for embedded processor debug. The Nexus standard
118 includes support for Basic Debug Communication as well as instruction and data tracing. See [ISTO01].
119 Other Debug: Debug functions not covered by 1149.1, 1149.7 or the Trace Port for example off-chip
120 memory emulation.
121 Parallel Trace Interface (PTI): The interface specification that defines the electrical and timing
122 characteristics of trace export interfaces that consist of a single clock and multiple data signals. See
123 [MIPI02].
124 Pin Assignment: The mapping of signals to pins, e.g., SIGNAL_NAME on pin number N. This may
125 include restrictions on allowable pin assignments.
126 Processor Trace: The non-intrusive capture and logging of the activity of an embedded processor and the
127 subsystem in which the processor resides. Processor trace generally consists of one or more of the
128 following trace types, but it is not limited to these:
129 Instruction (PC) Trace Application execution flow can be reconstructed by processing the logged
130 information
131 Data Trace Data access activity is captured at the processor boundary
132 The captured data is encoded for efficiency and this data is stored on-chip for later upload or immediately
133 transmitted through a chip interface to an off-chip receiver.
134 Return Test Clock (RTCK): A non-standard extension to 1149.1 that provides a feedback path for pacing
135 transaction on the interface.
136 Serial Wire Debug (SWD): An interface used for Basic Debug Communication. See [ARM01].
137 Series Scan Topology: A connection scheme where the control signals on the debug interfaces are
138 connected in parallel, but the data signals are daisy chained.
139 Silicon Test Subsystem (STS): This subsystem supports communication between the DTS and the on-chip
140 logic used for production test (boundary scan, BIST, etc.).
141 Star Scan Topology: A connection scheme where both the control and data signals on the debug interfaces
142 are connected in parallel.
143 System Trace Module (STM): A system trace interface with capabilities to export SW (printf type) and
144 HW generated traces (e.g., PC trace and memory dumps). Typical implementation is 4-bit parallel double
145 data rate. The STM uses a nibble-oriented protocol called STP. See [MIPI03].
146 System Trace Protocol (STP): The protocol used with STM. See [MIPI03].
147 System on a Chip (SoC): An electronic system in which all (or most of) the functional modules are
148 integrated on a single silicon die and packaged as a single chip.
149 System Trace: In the context of this document, system trace refers to SW Instrumentation Trace and HW
150 Instrumentation Trace.
151 SW Instrumentation Trace - Message output from instrumented application code.
152 HW Instrumentation Trace - Messages triggered by transactions/events on the SoC
153 infrastructure(s) and other HW modules in the system.
154 Target System (TS): The system being debugged, up to the Debug and Test Interface (DTI). The TS might
155 be a discrete device (a chip) or a collection of 1 to N discrete devices grouped on a board or collection of
156 boards. The TS might also contain 0 to N individual Debug and Test Targets.
157 Test Access Port (TAP): The on-chip interface to Debug and Test resources. Both 1149.1 and 1149.7
158 support the concept of a Test Access Port.
159 Timing: The AC characteristics of debug signals at the pins of the target device. Includes skew, jitter, rise
160 and fall times, data/clock alignment, set-up and hold times. While this is shown to be common between all
161 connectors, there will likely be some variation, for example the Gigabit connector might not have separate
162 clock and data pins.
163 Trace: A form of debugging where processor or system activity is made externally visible in real-time or
164 stored and later retrieved for viewing by an applications developer, applications program, or, external
165 equipment specializing observing system activity.
166 Trace Channel: A group of one or more signals and a clock that move trace information from the TS to the
167 DTS. There may be more than one Trace Channel between the TS and DTS.
168 Trace Data Protocol: The implementation-specific encoding of a particular type of trace by a particular
169 module.
170 Trace Port: An output port for the transmission of real-time data indicating the operation of the target (e.g.,
171 program execution and/or data bus transactions). Data transmitted across the Trace Port may be generated
172 by hardware, software instrumentation, or by a mixture of the two. This does not include trace collected on-
173 chip for later upload.
174 Trace Port Analyzer (TPA): An external hardware unit for collecting data transmitted from the Trace Port.
175 The data might be stored locally in real time before uploading to the host debug tools for later analysis by
176 the user, e.g., a logic analyzer or a unit customized to record trace information would both qualify.
177 Trace Wrapper Protocol (TWP): A protocol that wraps trace from different sources in to a single stream
178 for simultaneous capture by a single TPA. See [MIPI04] and [MIPI04a].
179 Trigger: An indication that a specific system event has occurred. A trigger may be an input to the TS, a
180 signal within the TS, or an output from the TS. The response to the trigger is determined by the entity to
181 which the trigger is sent.
2.2 Abbreviations
182 e.g. For example (Latin: exempli gratia)
183 i.e. That is (Latin: id est)
2.3 Acronyms
184 AC Alternating Current
185 BIST Built-in Self-Test
186 CPU Central Processing Unit
187 DACS Debug Access and Control Subsystem
188 DDR Double Data Rate
189 DFT Design for Test
190 DIVS Debug Instrumentation and Visibility Subsystem
191 DNI Debug Network Interfaces
192 DPI Debug Physical Interfaces
193 DSP Digital Signal Processor
194 DTC Debug and Test Controller
195 DTI Debug and Test Interface
196 DTS Debug and Test System
197 DTT Debug and Test Target
198 GbD Gigabit Debug
3 References
246 [MIPI01] MIPI Alliance Recommendation for Debug and Trace Connectors, version 1.10.00 and
247 higher, MIPI Alliance, Inc., 16 March 2011.
248 [MIPI02] MIPI Alliance Specification for Parallel Trace Interface, version 2.0 and higher, MIPI
249 Alliance, Inc., 3 May 2011.
250 [MIPI03] MIPI Alliance Specification for System Trace Protocol, version 2.1 and higher, MIPI
251 Alliance, Inc., 8 Mar 2013.
252 [MIPI04] MIPI Alliance Specification for Trace Wrapper Protocol, version 1.00.00, MIPI Alliance,
253 Inc., 23 Feb 2010.
254 [MIPI04a] MIPI Alliance Specification for Trace Wrapper Protocol, version 1.1 and higher, MIPI
255 Alliance, Inc., In Press.
256 [MIPI05] MIPI Alliance Specification for Narrow Interface for Debug and Test (NIDnT), version
257 1.0 and higher, MIPI Alliance, Inc., 7 August 2013.
258 [MIPI06] MIPI Alliance Specification for SneakPeekSM Protocol, version 1.0 and higher, MIPI
259 Alliance, Inc., In Press.
260 [MIPI07] MIPI Alliance Specification for Gigabit Debug for USB, version 1.0 and higher, MIPI
261 Alliance, Inc., In Press.
262 [IEEE01] IEEE Std 1149.1-2001, Standard for Test Access Port and Boundary-Scan
263 Architecture, Institute of Electrical and Electronic Engineers, 2001.
264 [IEEE02] IEEE Std 1149.7-2009, Standard for Reduced-pin and Enhanced-functionality Test
265 Access Port and Boundary Scan Architecture, Institute of Electrical and Electronic
266 Engineers, 2009.
267 [ISTO01] IEEE-ISTO 5001-2012, The Nexus 5001 Forum Standard for a Global Embedded
268 Processor Debug Interface, version 3.0.1, IEEE- Industry Standards and Technology
269 Organization, 2012.
270 [ARM01] ARM CoreSight Architecture Specification, version 2.0, ARM Limited, 2013.
4 Debug System
300
Figure 1 MIPI Debug Generic System Framework
307
Figure 2 MIPI Debug Documentation and the Debug Architecture
308 Figure 3 shows a more detailed block diagram showing how the generic debug framework can be realized
309 across an entire multiple-chip system. The devices share the basic debug, trace and functional interfaces.
310 Basic run control can be provided via the shared debug connection. Trace transport can utilize a shared link
311 dedicated to trace or a standard application visible network. In all cases, the footprint of the debug
312 interface to the tools is greatly reduced.
313
Figure 3 Example MIPI System Overview
335
Figure 4 PTI in the MIPI Debug Architecture
P
Trace Trace Trace
T Debugger
Collect Format Export
I
Debug & Test
Controller (DTC)
Trace Module Serial, parallel,
Etherrnet, USB
PC or
connection Workstation
DTT Debug
Comm.
Link
349
Figure 5 Example System with PTI
350 Note that only HW modules directly responsible for producing the data and clock of a PTI are required to
351 implement a PTI. Figure 6 shows how the PTI implementation is dependent upon system configuration.
Embedded System
Trace Trace Trace Trace Trace Trace
Module Module Module Module Module Module
1 2 3 4 5 6
Pin Manager/
Mux
Trace
Trace
Interleaving and
Module 0 Export Module
PTI PTI PTI
Module Implementing an
Module Implementing PTI PTI Location of PTI
Internal PTI
PTI Interconnect
Module Implementing
Proprietary Interconnect
Proprietary Interface
352
Figure 6 PTI Layers within a System
353 The scenario for Trace Module 0 is reasonably straightforward. The module itself is directly connected to a
354 dedicated PTI on the device boundary and the module is responsible for implementing the PTI.
355 The scenario for Trace Modules 13 is slightly more complex. Here multiple modules export trace through
356 a device level pin manager or mux. This management logic is only responsible for controlling which pins
357 on the device PTI are assigned to the device internal trace clients. It does not produce the data and clock
358 signals for the PTI but only routes them from the various trace modules. Thus the individual trace modules
359 are required to implement the PTI. Since the pin manager routes the internal PTI signals to the device
360 boundary, there is also a PTI at the device pins.
361 The scenario for Trace Modules 46 shows a system where multiple trace modules provide data over a
362 proprietary trace interconnect. This system allows data to be combined or interleaved in some fashion
363 before export. The interleaving and export module implements the PTI and the individual trace modules
364 communicate using implementation specific protocols that are beyond the scope of this document.
Device
Pin
Trace
Mgr
Device
TRC_CLK
Connector
DATA0
Trace
Pin DATA1 DTC
Mgr
DATA2
DATA3
Device
Pin
Trace
Mgr
Device
Pin
Trace
Mgr
384
Figure 7 Multi-Point PTI with 4-Pin Trace and Four Devices Sharing the Connector
Device
Pin
Trace
Mgr
Device
TRC_CLK
Connector
DATA0
Trace
Pin DATA1 DTC
Mgr
DATA2
DATA3
Device
Pin
Trace
Mgr
Device
Pin
Trace
Mgr
385
Figure 8 Multi-Point PTI with 4-Pin Trace and Two Devices Sharing the Connector
393
Figure 9 Connectors in the MIPI Debug Architecture
401
Figure 10 Basic Debug PCB (left) and Cable End Connector (34-pin Samtec FTSH)
415
Figure 11 Recommended Samtec QSH/QTH Connector
5.3 Narrow Interface for Debug and Test (NIDnT) Specification Overview
431
Figure 12 NIDnT in the MIPI Debug Architecture
436 physical enclosure in the products final form factor. This change in the product development paradigm is
437 described in the following paragraphs.
438 During the early stages of product development, IEEE 1149.1/1149.7/SWD based basic debug, trace of
439 application activity, and software messages sent over simple streaming interfaces like serial ports are
440 typically used for debug. Historically, much of this product development is performed using test or
441 development boards. These boards provide dedicated and readily-accessible Debug and Test interfaces for
442 connecting the tools. A system with a dedicated debug interface is shown in Figure 13.
TS
SoC
Connector
Debug Interface I/O Driver Pin DTS
Connector
Application Interface Function Driver I/O Driver Pin Application
443
Figure 13 Example of System with a Dedicated Debug Interface
444 In most cases, a mobile terminal products final form factor does not have dedicated Debug and Test
445 interfaces as these interfaces are not propagated to the boundary of the products physical enclosure. This
446 hampers the identification of bugs present at this point in the product development.
447 A mobile terminal might include a proprietary JTAG connector that requires some disassembly (e.g.
448 removing the battery cover and battery) and the use of a test fixture. The physically invasive process of
449 accessing this connector could itself cause bugs or RF performance issues to disappear, or new ones to
450 appear.
451 Figure 14 shows how NIDnT technology extends the use of functional interfaces for Debug and Test
452 purposes. It creates a dual use functional interface by multiplexing the debug signals with the normal
453 function signals within the SoC in a manner that is similar to a switch. Connecting either the normal
454 function or the debug function to the interface connects that functions inputs and outputs to the interface.
455 Disconnecting either the normal function or debug function from the interface connects its inputs to
456 inactive default values that create the functions inert operation while leaving its outputs unused. For
457 example, a SoC could multiplex an IEEE 1149.7 Test Access Port (TAP) and a Parallel Trace Interface
458 (PTI) over the functional I/Os that normally provide a microSD interface. In this case, the IEEE 1149.7
459 TAP could be used for both basic debugging and as a control channel for the trace function that utilizes the
460 PTI interface.
461
Figure 14 Example of System with NIDnT Capability
462 It is expected that adapters will be used to connect a products NIDnT Interface (e.g. microSD interface, or
463 USB) to the MIPI Debug Connectors (as defined in [MIPI01]). The use of an adapter provides for
464 debugging the product in its final form factor with standard debug tools, as the adapter remaps the signals
465 presented by the tools on these standard debug connectors to the appropriate positions on the functional
466 connectors.
487 The trace function can either run with a clock shared with the Min-Pin debug interface or run with an
488 independent clock. If the focus is on maximum trace bandwidth, a shared clock provides the largest number
489 of trace data pins, but ties the data rate of each data pin to the clock rate of the Min-Pin debug interface.
490 Non-OFM Overlay Modes that support debug, i.e., that switch some of the NIDnT Interface pins to being
491 used for Basic Debug signals, are called Debug Overlay Modes (see table in the NIDnT Specification,
492 [MIPI05]).
nTRST nTRST
TCK(C) TCK(C)
536 All capability classes begin operation using the Standard Protocol. IEEE 1149.7 operation is compatible
537 with IEEE 1149.1 from power-up, with the function of TCK(C) and TMS(C) signals providing the
538 functionality (or a superset thereof) of the TCK and TMS signals that is specified by the IEEE 1149.1
539 standard.
540 All IEEE 1149.7 based devices may be implemented in a manner that allows their use in system
541 configurations where there is:
542 A mix of components implementing different capability classes
543 A mix of connection topologies
544 The DTS can use facilities defined by the standard to determine the following:
545 The types of connection topologies deployed within the TS
546 The component mix with the TS:
547 1149.1 components
548 1149.7 components + class of each component
551
Figure 16 IEEE 1149.7 in the MIPI Debug Architecture
564
Figure 17 SneakPeek in the MIPI Debug Architecture
MemCReg
Memory
System
Access
Config
Debug
Debug
Trace
Other
Core
Debug Interconnect
System Interconnect
SneakPeek SneakPeek
OtOer Clients OtOer Clients
Memory Agent Memory Agent
Network Stack
PHY TS
Network connection
PHY
DTS
Network Stack
SneakPeek Manager
579 The basic communication units used by SneakPeek are SneakPeek Command Packets sent from the DTS to
580 the TS, and SneakPeek Response Packets sent from the TS to the DTS. To provide more efficient
581 interactions with the communication network, the DTS packs typically many Command Packets into a
582 single SneakPeek Transfer Block (SPTB) before handing this over to the network driver for transmission to
583 the TS. Similarly, the TS packs typically many Response Packets into a single SPTB for transmission to
584 the DTS.
585 Figure 19 shows how the SneakPeek Protocol is built on top of existing network infrastructure.
System
Debug Debug Debug & Debug
Application Application Application Memory Maps
Transaction Transaction Transaction
Mapping Mapping Mapping Address-mapped
reads & writes
Debug Debug
Requests Requests Memory
Agents
SneakPeek
SneakPeek
Command
Manager
Engine
SneakPeek SneakPeek
SneakPeek SneakPeek
Command Response
Response Command
Packets Packets
Packets Packets
in SPTBs in SPTBs
in SPTBs in SPTBs
SneakPeek
Network
Network
Adaptor
Adaptor
Network Data Network Data
Transport Units Transport Units
Network Network
Stack Stack
PHY PHY
586
DTS TS
Figure 19 SneakPeek Protocol and Network Stacks in DTS and TS
587 In summary:
588 The DTS sends SneakPeek Command Packets grouped into SPTBs to the TS over a data
589 communication network.
590 These Command Packets cause an action or effect in the TS, typically an address-mapped read or
591 write transaction. The Command Engine generates a Response Packet corresponding to each
592 Command Packet (with some special case exceptions).
593 The TS sends SneakPeek Response Packets grouped into SPTBs to the DTS over the data
594 communication network.
595 The SneakPeek Packets in a stream have a defined order at their source and are interpreted in this
596 order at their destination. The SneakPeek Protocol is not concerned with actual transmission order
597 over the physical or other layers of the network stack, but assumes that the network reconstructs
598 the original order before handing off the SneakPeek Packets at their destination.
631
Figure 20 STP in the MIPI Debug Architecture
Data
Marker Flag
User
Master Master
Trigger
STP stream
Error Time sync
660
Figure 21 Conceptual Hierarchy of STP Masters and Channels
661 Figure 22 shows an example of a target system that utilizes a module implementing the System Trace
662 Protocol. In this example, the STP data is transferred to the DTC across a PTI.
Target System (TS) with Debug & Test
Single DTT Trace System (DTS)
Parallel Trace Interface (PTI) Cable
P
Trace Trace Trace
T Debugger
Collect Format Export
I
Debug & Test
Controller (DTC)
System Trace Module Serial, parallel,
Etherrnet, USB
PC or
connection Workstation
664 The timing diagram in Figure 23 shows an example of the STP packets that might be transferred to the
665 DTC in such a system. This example shows the end of a synchronization sequence followed by a series of
666 16-bit data packets on Channel 4 of Trace Source (Master) 3.
1111 1111 1111 0000 1111 0000 0000 0100 0001 0000 0011
667 Time
Figure 23 Example STP Packet Sequence
692
Figure 24 TWP in the MIPI Debug Architecture
711 If the source trace stream cannot be naturally represented using a stream of bytes, then an additional
712 protocol specific to the source trace stream has to be implemented in order to convert the source trace
713 stream into a stream of bytes.
7.3.3.1 Layers
714 TWP is split into the following layers:
715 Layer T1: Flow Control. This layer enables TWP to be used over a connection which requires
716 continuous communication, for example PTI in situations where the clock cannot be stopped.
717 Layer T2: Alignment Synchronization. This layer enables the alignment of frames in Layer T3 to
718 be determined.
719 Layer T3: Data. This layer conveys trace data using 128-bit frames.
Interleaved
trace streams
T3
T2
T1
Trace sink
Trace sink Trace sink
without flow
with flow control with alignment
control
e.g. storage in
e.g. PTI continuously e.g. PTI where clock
memory on 16-byte
supplied with data can be stopped.
720 boundaries.
729 difficult or impossible. Gigabit Trace (GbT) focuses on the sharing of standard communication channels
730 for debug.
731 The GbT architecture is a layered system. The GbT System facilitates packaging trace data as a stream of
732 GbT Network messages suitable for transport over a shared network and/or interconnect. It defines a
733 network independent set of data packets that are shared (but not required) by all network transports.
734 A Gigabit Trace system also requires a Network Adaptor that consumes GbT Network Messages and
735 produces a message stream compatible with the targeted transport. The network adaptor layers are
736 generally called Gigabit Debug Adaptors since they often support other network capable debug protocols
737 like SneakPeek. The goal is to define MIPI Gigabit Debug network adaptor specifications for all the
738 common transports found in mobile systems.
741
Figure 26 Gigabit Trace and the MIPI Debug Architecture
751 only define functions that likely exist in the system, not HW or SW modules with defined interfaces and
752 behaviors.
Multiple
Trace
Streams Arbitration
GbT
Network
Messages Operating System
Network
753
Figure 27 Typical GbT Configuration and Data Flow (TS)
Multiple
Trace
Streams
GbT
Network
Messages Operating System
Network
754
Figure 28 Typical GbT Configuration and Data Flow (DTC and DTS)
755 Note that in the TS, the GbT data path may optionally use the low-level OS to merge trace data with other
756 (functional) network streams. This is obviously more intrusive to the system function than a direct data path
757 to the lower levels of the network stack (also shown). A more SW-intensive system might ease the
758 complexity of the HW required to support GbT and it is anticipated that both approaches will be utilized.
759 The MIPI GbT solution builds on the MIPI TWP data primitives. The MIPI GbT solution uses a GbT
760 Network Adaptor (in the TS and DTS) to isolate generic GbT from the properties of a specific Network
761 Stack. A typical GbT system might adapt trace for export over a USB interface (USB 2.0 or 3.0 depending
762 on bandwidth requirements).
763 The MIPI Debug Working Group will produce independent specifications defining how a GbT system can
764 be realized on various transport networks. These Adaptor specifications will provide the details on how to
765 map the GbT framework outlined in this Annex to specific constraints and capabilities of a particular
766 transport network.
System Interconnect
HW SW
Instrumentation CPU Core Instrumentation CPU Core
Module Module
Trace Wrapper
Module
TWP TWP
Network
Pin Adaptor
Export
Module Network Protocol
Network Transport
PTI Module
Network
Packet
Network
Debug and
Test Controller
810
Figure 29 Example Trace Architecture
Memory
Agents
GbT SneakPeek Trace
Griver SneakPeek
Griver Infrastructure
Command
Engine
Gigabit
GbT Network SPP Network SPP Network GbT Network
Debug
Adaptor Adaptor Adaptor Adaptor
Specifications
Network Network
Stack Stack
PHY PHY
828
GTS TS
Figure 30 Gigabit Debug Functional Block Diagram
829 One of the fundamental features of GbD functionality is that it co-exists with non-debug network clients
830 and can operate quite effectively in multi-node networks that are commonplace today. Figure 31 illustrates
831 how GbD and non-debug network traffic are integrated in such networks.
DTS #1
Trace GbT
TS #1
Network Network
Application Network Other
Driver Controller
(GbT #1) Adaptor Network
Client(s)
SPP SneakPeek
Network Network
DTS #2 Network Command
Controller Driver
Adaptor Engine #1
Other
Network GbT
Client(s) Gigabit
Network
Trace #1
Adaptor
SPP
Network
Debug Adaptor
Application(s) SPP SneakPeek
SPP Network Network
Network Network Network Network Command
Network Controller Driver
Driver Controller Adaptor Engine #2
Adaptor
Trace GbT TS #2
Application Network
(GbT #2) Adaptor GbT
Network Gigabit
Network
Controller Trace #2
Adaptor
832 DTS TS
Figure 31 GbD in a Multiple-node Network
835
Figure 32 Gigabit Debug and the MIPI Architecture
Participants
The following list includes those persons who participated in the Working Group that developed this
document and who consented to appear on this list.
Miguel Barasch, Qualcomm Incorporated Rolf Khnis, Intel Corporation
Gary Cooper, Texas Instruments Incorporated Stephan Lauterbach, Lauterbach
Jean-Francis Duret, STMicroelectronics Andrea Martin, Lauterbach
Lance Flake, Broadcom Corporation Jason Peck, Texas Instruments Incorporated
John Horley, ARM Limited Gary Swoboda, Texas Instruments Incorporated
Tomi Junnila, STMicroelectronics John Zurawski, Intel Corporation