Growing a Standardized Debug and Trace Environment

By Enrico Carrieri, Chair of the MIPI Debug Working Group

The MIPI Alliance has released a layered system of debug and trace specifications for mobile development in the Internet of Things (IoT), automotive, 5G and other application areas, but that’s really only the start of the story.

Ultimately, the standard framework and protocol specifications to debug, troubleshoot or fine-tune devices are just pipes. It is what comes through the pipes that is the crucial, moneymaking opportunity from which original equipment manufacturers (OEMs) and silicon providers can derive real value.

MIPI recently made its debug specifications publicly available, with the goal of encouraging the creation of software tools and a robust ecosystem around a standardized debug and trace environment for mobile devices and beyond. Developers may take advantage of flexible tools that they can utilize across whatever kind of components use and do not incur the costs and complexity of retooling and retraining across a disjointed development environment. And they are freed to focus their energies and investment on developing tools that interpret data, help their throughput and drive bottom-line benefits.

Across the Full Stack

In today’s mobile environment, the use of the legacy, familiar methods of probing buses and signals with dedicated, proprietary debug and test equipment across layers is impractical. There are so many different components working together that the system of debugging quickly becomes disjointed, complex and costly. In addition, non-standard, proprietary debug solutions lead to vendor lock-in, which limits developer flexibility and also hinders cost effectiveness.

While supporting legacy interfaces and protocols as fully as possible, the MIPI Debug Working Group seeks to define and unify debug solutions for mating connections, pin assignment and electrical characteristics; reuse debug functional interfaces and protocols, and develop debug/trace protocols and associated software layers for highly integrated systems. MIPI offers debug and trace specifications that work together across the full stack, and developers who have adopted them as alternatives to using dedicated equipment have successfully cut costs and streamlined the development of high-quality products. The entire portfolio is publicly available for download:

  • MIPI High-Speed Trace Interface (MIPI HTI) v1.0, a serial implementation of the data port, taking advantage of available high-speed serial interface technology to provide higher transmit bandwidth for a single stream of trace information with fewer I/O pins than would be required in a parallel implementation;
  • MIPI Narrow Interface for Debug and Test (MIPI NIDnT) v1.2, a specification for utilizing a device’s functional ports for debug and test procedures, making it easier for developers to identify problems in complex designs and ensure product quality;
  • MIPI Parallel Trace Interface (MIPI PTI) v2.0, a parallel interface with multiple data signals, as well as a clock, for exporting system-functionality and behavior data to a host system for analysis and display;
  • MIPI SneakPeek Protocol (MIPI SPP) v2.0, a newly updated standard communications protocol for debug and test applications between a debug test system (DTS) and a mobile terminal target system (TS);
  • MIPI System Trace Protocol (MIPI STP) v2.2, a generic base protocol for trace functions, which multiple, application-specific trace protocols may share, and which co-exists with those highly optimized protocols;
  • MIPI System Software-Trace (MIPI SyS-T), v1.0, a universal data format for sharing software debug and trace information between test systems and devices such as systems-on-chip (SoC) or platforms;
  • MIPI Trace Wrapper Protocol (MIPI TWP) v1.1, a protocol for wrapping multiple source trace streams on to one trace stream by assigning system-unique identifications to all of the source byte streams in a system and encapsulating them;
  • MIPI Gigabit Debug for IP Sockets (MIPI GbD IPS) v1.0, an adapter for utilizing MIPI SPP and MIPI TWP over Internet Protocol (IP) sockets, for remote debugging of any type of device that is smart or connected, and
  • MIPI Gigabit Debug for USB (MIPI GbD USB) v1.1, an adapter for using MIPI SPP and MIPI TWP across USB connections, minimizing the impact of debug on system functions and enabling engineers to use the connection to debug a device even while that connection is carrying other traffic.

In addition, MIPI Debug for I3C, a specification for transporting debug controls and data between a DTS and TS, is in development and scheduled to be publicly available in 2020.

Driving an Ecosystem

Developers find that the specifications—especially those focused on trace, such as MIPI HTI, MIPI PTI, MIPI STP, MIPI SyS-T and MIPI TWP—simplify integration of embedded software and underlying hardware, thereby facilitating hardware vendors’ heavier reliance on software solutions from multiple organizations. Similarly, MIPI specifications help independent debug and test tooling vendors offer generic testing products to developers and manufacturers.

This is emblematic of how the MIPI Debug Working Group is encouraging the growth of a whole ecosystem of “adoption aids” around its debug and trace specifications. The working group, of course, seeks input on use cases to feed incremental improvement of the specifications themselves (and plans to focus on use cases such as automotive and the IoT to better understand their unique debug needs). But the working group’s greater emphasis today is on enabling OEMs, silicon providers and everyone who actually uses the MIPI specifications to take them further via tooling. Users are encouraged to work with tooling vendors on possibilities for leveraging the data yielded—such as the instruction execution sequences for embedded processors, data bus transactions made by embedded processor cores, snapshots of transactions on system interconnects or streaming output from instrumented application code.

Nurturing the development of a flourishing ecosystem around the debug and trace specifications was a large part of MIPI’s motivation in making them publicly available. As Joel Huloux, chair of the MIPI Alliance, said in a Sept. 11, 2019, press release announcing the debug and trace specs, “Opening up access to MIPI debug and trace specifications will foster a more standardized debug environment, improving development processes and quality in and beyond the mobile device industry. In addition to allowing more developers to use the specifications, this step will strengthen the ecosystem, leading to broader interoperability and a richer development environment.”