This page contains a Flash digital edition of a book.
Feature Test & Measurement


When crossing the line is a good thing


Reg Waller at Asset InterTech Inc. explores the changing world of test and how ultimately, T&M tools that offer the flexibility to transition across software into hardware, and back again, will be crucial to engineers


he lines between software and hard- ware have become increasingly vague over the last several years. Another indication of this is the fact, hardware-assisted software debug- gers are playing a larger role in system debug, validation and test every day. Maybe you’re scratching your head and wondering: what’s a hardware- assisted software debugger? Maybe you’re thinking software debug tools are usually comprised mostly of software. Hardware test tools like the oscilloscopes that designers use and the in-circuit test (ICT) systems found in manufacturing usually involve lots of hardware, includ- ing intrusive test probes. Unfortunately, problems arise from intrusive probes. For example, access for probes is becoming hard to find and often the strain exerted by an ICT tester on a circuit board can actually cause the structural failures it is trying to detect. (Figure 1).


T


Of course, every debug, validation and test method involves some trade- offs. Minimising the tradeoffs is one good reason for the recent rise in hard- ware-assisted software debuggers. Unlike software debug tools that operate only in the software domain, hardware-assisted debug tools take advantage of capabilities embedded in chips to provide the software engineer greater visibility into the whys-and- wherefores of code execution. As a case in point, let’s take a closer look at Intel processors and some of their embedded trace capabilities. Depending on the trace debug capabil- ities embedded in a particular processor, the software engineer is able to debug and trace code execution problems.


10


In addition, some tools platforms can extend this process a step further. They can continue the investigation into the possible root causes of a problem beyond the code itself by applying non- intrusive validation and test tools to rule out problems with the underlying hardware or related software modules.


Tapping In in to the source Most, if not all, processors these days have a debug port. Continuing with our example of Intel processors, the debug port on these chips is referred to as the eXtended Debug Port (XDP). Other processor suppliers have other names for their debug ports, but they all serve the same purpose, which is to facilitate system debug.


In the case of Intel chips, a hard- ware-assisted debugging tool gains access to the processor through XDP and is able to run and stop the processor, single-step through software code, and peek-and-poke at data stored in memory or hardware registers as part of a software/hardware debug process. Hardware-assisted debuggers have certain advantages insofar as they are non-intrusive (You don’t have to place a probe on anything! Just connect to the debug port) and they do not depend on other software resources like a functioning operating system. Hardware-assisted debug tools pro- vide real-time visibility into the code as it is executing. If the code ‘hangs’ or stops executing, a hardware-assisted debug tool can maintain control over the processor and provide visibility into what’s going on in the system. Hardware-assisted debuggers use Intel’s embedded trace capabilities to


Reg Waller is European Director at ASSET InterTech Inc.


Figure 1:


Flexure, or the strain placed on a circuit board by the probe of an in- circuit tester, can create defects in solder joints


look back in time to determine exactly why the system behaved as it did and what happened to cause the behav- iour. This ability to capture past events and code sequences provides keen insight into system behaviours, aber- rant and otherwise. Additionally, some of the embedded trace facilities in processors can cap- ture software bugs and store them so that the debug engineer can come back later to analyse the problem. These kinds of time-shifting capa- bilities are important because it’s those tricky bugs that cause the major headaches. The 80/20 rule applies here - 20 percent of the bugs take up 80 percent of an engineer’s time to fix. Typically, those hard-to-diagnose bugs are in the code in one context, but the effects of the bug aren’t detected until a lot more code has exe- cuted and the software context has changed dramatically. There’s usually an indeterminate amount of time between the bug itself and the effects it has on system opera- tion or performance. For example, an interrupt routine might corrupt a memory location in the stack area of an unrelated firmware thread. When that thread encounters the corrupted memory, the bug is mani- fested, but that’s not where the bug is. Determining why and where the cor- ruption occurred with a traditional debugger would be nearly impossible because the corruption has nothing to do with the current context of the code. The actual cause of the bug could have happened millions of instruc- tions earlier in some totally unrelated piece of code. These are the types of situations where hardware-assisted debugging tools that take advantage of embedded trace capabilities are worth their weight in gold.


Figure 2: Increasingly, software and


hardware engineers are forgoing legacy probe-based tools in favour of software debug, validation and test platforms


I suppose that when we come right down to it, it’s not really a matter of the lines between hardware and software blurring or disappearing. What’s really happening is hardware is crossing over into the software domain and vise versa. There was a time when circuit board designers spoke of ‘glue logic.’ Now, with the explosion in the number of processors, processing cores, multi- threaded software, apps and all the other advancements in technology that we’ve come to expect and take for granted. It is becoming more and more appar- ent that firmware is the real glue that binds together all of the hardware and software in today’s complex systems. And those T&M tools which are able to reach over from software into hard- ware, and from hardware into soft- ware, are going to be crucial to engineers from now on. Asset InterTech Inc. www.asset-intertech.com Enter 201


OCTOBER 2013 Electronics


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36