Professional Documents
Culture Documents
At a glance ..........................23
A niques continue to develop from their original pc-board test en-
For more information ......24 vironment to meet evolving needs, such as in-system configuration
and system-on-chip testing (Reference 1). Yet another area in which
boundary-scan debugging enjoys wide- ple cores and deep on-chip memories are
spread application is the automotive in- becoming more difficult to emulate and
dustry. Today’s deeply embedded in-ve- debug, compromising the automotive in-
hicle systems frequently comprise dustry’s notoriously short design cy-
networked components, such as engine- cles—especially among the interdiscipli-
management units and active safety con- nary development teams that tackle
trols, that require increasingly capable today’s vehicle development projects. In-
processors to provide power-train su- system programmability is also critical to
pervision. Complex devices with multi- automotive development because as
22 edn europe | August 2001 www.ednmag.com
much as 70% of a vehicle’s final system- nals to serially load or unload data, to
calibration data relies on iterative in-ve- AT A GLANCE provide clock and breakpoint control,
hicle tests. and to freeze and reset the processor. A
e System-on-chip processors and today’s
Debugging embedded processors in comparable BDM implementation ap-
packages mandate on-chip debug systems.
real time traditionally requires a logic pears in later Motorola microcontrollers,
analyser with a chip-specific preproces- such as the growing 68HC12 family that
e Automotive applications demand nonin-
sor, an in-circuit emulator, or both. Such powers many automotive control units
trusive access to calibration constants.
equipment can provide a programmer’s (Figure 1). Sampling now, the latest fam-
view of chip resources and typically ily member is the MC9S12DP256; it aug-
e Motorola’s pioneering background-
comprises a general-purpose base unit ments typical microcontroller peripher-
debug-mode serves low-to-midrange
with dedicated pods that emulate the als with features such as 256 kbytes of
applications.
target processor in FPGA-based hard- flash memory and as many as five CAN
ware. But more and more, today’s (controller-area-network) interfaces.
e Today’s complex processors require
processor-clock speeds and inaccessible In the 68HC12, the BDM interface re-
parallel debugging access to track on-chip
packaging techniques limit or preclude duces to just two active pins in a six-pin
events.
external techniques. It’s also very diffi- header: the BKGD (background) serial-
cult to trace on-chip memory accesses communications line and hardware-reset
e IEEE-ISTO 5001-99 harmonises propri-
because these cycles don’t appear at the signal. The BKGD line uses a clocking
etary on-chip-debug mechanisms.
processor’s pins—although some semi- scheme that resolves bidirectional com-
conductor vendors produce special munications that are—from the proces-
bond-out versions of the target micro- 5001-99 specification for free at www. sor’s view—asynchronous from host to
controller that provide access to other- ieee-isto.org. processor and synchronous from proces-
wise hidden core nodes. Instruction sor to host. The remaining header pins
pipelines, concurrent execution, and OCD STARTS WITH A ROM MONITOR carry the supply voltages and the flash-
predictive branching provide further de- Providing further impetus for 5001-99, memory programming voltage to permit
bugging challenges. To address such proprietary OCD implementations vary in-system programming. The 68HC12’s
concerns, Motorola started adding on- enormously in their capabilities and debugging mechanisms divide into hard-
chip monitoring to its CPU32-series rarely feature common physical inter- ware and microcoded functions that lie
cores to pioneer BDM (background-de- faces. Written into the CPU32’s microc- outside of the processor core to minimise
bug mode) some 10 years ago. Other ode in chips such as the 68331, Motoro- intrusiveness. The hardware functions
semiconductor vendors have since fol- la’s original BDM emulates a traditional don’t require the processor to be running
lowed suit with proprietary on-chip ROM monitor and includes a similar BDM to allow nonintrusive access to on-
hardware, often employing the proces- command set. Debugging commands in- chip memory during normal program
sor’s IEEE 1149.1 test interface. Generi- clude read and write data, address, and operation, but the debug hardware may
cally, such OCD (on-chip-debugging) system-control registers; read and write steal processor clock cycles if the memo-
techniques link the chip’s internal re- memory or blocks of memory; flush and ry address is off-chip. The microcoded
sources with a host PC’s development refill the pipeline before resuming execu- functions require BDM to be active and
environment to make chip activity visi- tion; reset the processor’s peripherals; typically use the processor’s dead cycles to
ble and to furnish debugging controls. and call user patch-code. The original execute debugging commands, stealing
These similar proprietary OCD imple- hardware-debugging interface is via a 10- clock cycles only if no dead cycles appear
mentations are an obvious candidate for pin header that carries seven control sig- within 128 cycles of receiving a command.
a standardisation effort to rationalise the
debugging interface and promote tool- HOST (BKGD PIN) ON CHIP
16-BIT SHIFT REGISTER
chain development. Recognising this SYSTEM BACKGROUND
need, semiconductor developers Hitachi, SERIAL LINK
Microcoded functions include read and queue, the processor suspends execution bination of JTAG pins and device-pin
write the processor’s register set, execute and activates BDM. You can then execute mapping to accelerate I/O performance
a user instruction and return to BDM the instruction and observe the results. during debugging. Accordingly, the
(trace mode), enable instruction “tag- Together, the 68HC12’s debugging mech- TC1775’s debugging system illustrates
ging,”and resume normal processing.You anisms provide tools such as P&E Mi- some of the techniques that you can ex-
activate BDM by sending a debugging crosystems’ less-than-$500 development pect from 5001-99-standard-compliant
command that enables the debugging mi- environment with powerful but low-cost chips. The TC1775’s debug system com-
crocode. The processor can then enter access to the processor’s resources. Run- prises support for the main TriCore
BDM via a debug-hardware command, ning on a PC host, the P&E tool uses a processor and its peripheral-control
by encountering breakpoints, or via the parallel-port based “wiggler” to provide processor, a trace module for the TriCore
enter-background-mode instruction. the BDM interface. P&E’s tools also sup- processor, and an extended JTAG-based
When BDM mode is active, the 68HC12 port BDM-enabled Motorola targets, in- debugger interface that Infineon calls
maps its debugging-control and microc- cluding the 68HC16, 68HC3xx, Cold- Cerberus (Figure 2). The main TriCore
ode registers to the top of its 64-kbyte Fire, MCore, and PowerPC families. processor partitions debugging into
memory space. These registers reflect the event-generation mechanisms and sub-
status and type of BDM instruction that’s DEBUG-PORT REMAPPING SPEEDS I/O sequent debugging actions. The idea is to
executing and provide temporary storage As is the case for traditional RS-232 integrate a simple but powerful debug-
for data and commands. based ROM monitors, the main restric- ging system and rely upon external sup-
As for operation with a traditional em- tions on serial-debugging performance port for more complex actions. Ewald
ulator, the 68HC12’s debugging system are due to I/O bandwidth between the Liess, Infineon’s applications manager for
includes hardware-breakpoint capabili- chip and the host PC. Accelerator cards, microcontroller products, explains,“The
ties to halt instruction execution on ad- such as P&E’s Lightning adapter or Eth- driving philosophy behind the OCDS
dress or address-and-data combinations. ernet-based interfaces, such as Abatron’s support is that the complete architectur-
You can typically set breakpoints to halt debuggers, can communicate 10 times al state of the system is visible from the
the processor before or after an instruc- faster than a parallel-port-based “wig- TriCore’s FPI (flexible-peripheral-inter-
tion executes and have the breakpoint gler.”Abatron quotes maximum host-to- connect) bus.” In other words, he notes,
trigger a software interrupt or force target speeds of 2 Mbps and debug-code you can access every piece of architec-
BDM. Like most contemporary proces- loading at as fast as 320 Kbytes/sec for its tural state in the TC1775 through a map-
sors, the CPU12 core uses queued in- BDI2000 interface. This accelerated se- ping into the FPI’s address space.
struction pipelining that accelerates ex- rial throughput suits midrange debug- The TC1775’s hardware-breakpoint-
ecution speed but obscures program- ging tasks with complex processors such generation logic responds to on-chip
flow analysis. You can reconstruct pro- as Infineon Technologies’ TC1775 mi- events or to an external break command
gram flow from debugging events or, if crocontroller, but faster throughput re- from an emulator. You can set the hard-
you’re using an external logic analyser, quires additional parallel access to on- ware-breakpoint logic to trigger upon in-
monitor two dedicated device pins that chip resources. struction execution or data read/writes at
provide time-multiplexed information Currently in its first generation and an address or within an address range.
about instruction execution and data with features such as a DSP-like multi- Trigger-event-specifier registers provide
movements. But because instruction ex- plier-accumulator, a separate peripheral- combinational trigger capabilities to gen-
ecution begins before becoming visible control processor, twin-CAN communi- erate a single trigger from multiple events,
to a logic analyser or debugging envi- cation links, and direct calibration such as code- and data-space-protection
ronment, the CPU12’s designers includ- support, Infineon’s TC1775 targets auto- violations. Specifier registers within the
ed a separate tagging mechanism that motive use. The 329-pin BGA package chip’s OCDS control-register set control
tracks instruction status. When a tagged mandates the OCDS (on-chip-debug- debug actions when external and software
instruction reaches the head of the ging-support) system, which uses a com- breaks occur and, upon instruction, move
control. TDO
IEEE 1149.1
The TC1775 augments the five 1149.1- CERBERUS AND
TMS CONTROL
JTAG
standard device pins with emulator hard- INTERFACE
SIGNALS
TCK (JTAG INTERFACE)
ware-control signals that comprise
OCDS enable, break input, and break TRST