state analysis data in mnemonic form.
This makes it easier to debug software
problems in the SUT. Armed with this
knowledge, you can go to a lower-level
state display (such as a hexadecimal
display) or to a timing diagram display
to track down the error’s origin.
State analysis applications include:
FIGURE 11. A real-time
instruction trace display.
• Parametric and margin analysis (e.g.,
setup and hold values).
• Detect setup and hold timing
• Hardware/software integration and
• State machine system optimization:
line 31 in Figure 12 is correlated with
sample 158 in the instruction trace
display of Figure 9.
significantly more powerful than the CPU of
the system being emulated) and an interface to
the target processor’s
socket. The interface
consists of logic and a
cable which plugs into
the socket intended for
the target processor. The
hardware and software
work together to allow
the target system to
debug it under your
control. The cable takes
the place of the
microprocessor IC, or
connects to the μP IC and disables the
μP IC to allow host system control.
Newer systems allow the same
sort of debug capability with a simpler
hardware interface. Debug and test
hardware is built into a microcontroller, which is a microprocessor-based system on a chip. The system
includes many standard peripherals
such as serial interfaces, parallel
interfaces, timers, priority interrupt
controllers, clock management
circuits, a simple high-speed serial
interface, possibly USB port hardware,
and — most importantly — a four-wire
test interface that IEEE 1149 specifies
and Joint Test Architecture Group
(also known as JTAG) manages.
This JTAG interface came into
existence to support the boundary
scan test of ICs, but is so versatile you
can use it to populate nonvolatile
system memory and program logic
devices such as CPLDs in place. The
JTAG is a serial bus which you can
daisy chain that allows you to test
and/or program many devices.
System designers program PALs,
PLAs, and more recently CPLDs. The
configuration is unknown until you
decide the programming, so the
manufacturer cannot completely test
the parts. Unless you select pins for
test points, making them generally
unavailable for functional use.
There is no internal circuit access
for use with a logic analyzer. Therefore,
programmable logic support software
• Capture and analyze real-time system
operation in order to debug, verify,
optimize, and validate the design.
This trend — the virtual substitution of the logic analyzer for the
traditional microprocessor emulation
tool (in-circuit emulator or ICE) —
continues today. The result, therefore,
is that those who need the principal
function of a logic analyzer — the
selective acquisition of digital data
and its display as a pattern of
waveforms — have a tool that has a
different emphasis and high cost.
Monitoring microprocessor CPUs
is easier with states translated into
assembly code, so this type of capability was available as a logic analyzer
option for each common μP IC family.
However, integrated hardware and software control was not generally possible
with logic analyzers. This labor-intensive process usually involved writing the software, then compiling/
assembling it, translating it into a down-loadable format, and then downloading
it into the system. The logic analyzer then
monitored the new software version.
FIGURE 12. Source code display.
Note that line 31 correlates to sample
158 in the instruction trace display
in Figure 9.
must include a simulator to allow
you to conceptually test the simpler
designs and ultimately generate test
vectors to verify the correct programming of these parts. The device
programmer uses the test vectors for
simpler devices, such as PALs and PLAs.
Use of the JTAG port on newer,
more complex devices allows testing
of the devices you have programmed
and placed in the circuit. JTAG-equipped devices require only a four-pin penalty to support this flexibility.
You can use simpler logic
analyzers to test the remaining circuits
on a system with microcontrollers and
dense programmable parts like
CPLDs. Cards which you can
implement as a PC peripheral board
need to only have simple state
measurement and trigger capabilities
which you can control and expand by
the PC. Logic analyzers are therefore
useful for tracing down glitches in the
“glue” logic. NV
An In-Circuit Emulator
This is a collection of hardware
and software. The hardware consists
of a host computer system (typically
I wish to thank Matt Litfin of
Tektronix for both supplying artwork,
as well as reading the finished
manuscript, ensuring its technical
accuracy, and John Stabler, my
boss, for information related to
in-circuit emulators and the JTAG.
October 2007 71