Using shadow registers in the debug logic
circuitry can overcome the disadvantages of
debugging based on monitor program and the
inserting serial scan chain method. Shadow register
group is defined as a group of registers designed in
the microcontroller’s debug module, and the
registers will not intrude normal CPU operation.
They are often used to provide a non–destructive
scan out capability that preserves the existing system
state after the scan dump. Many systems are fully
scannable with non–destructive capability which is
helpful for both test and debug.
OpenSPARC T2 is a chip multi–threaded
processor which has eight SPARC cores, each
supporting concurrent execution of eight threads for
64 threads total. Integer Register File (IRF) is an
important part of the execution unit in SPARC core,
but can only be accessed by serial scan chains,
which makes the debug work ineffective. In this
paper, we will provide a solution to the limitation
mentioned above. In section II, we describe the logic
unit related to debugging work in OpenSPARC T2.
In section III, we illustrate the new on-chip debug
architecture based on shadow scan technique. The
logic architecture is applied in OpenSPARC T2
microprocessor. However, the methodology is
applicable to other processors.
2 OPENSPARC T2 LOGIC UNIT
RELATED
2.1 Shadow Scan Architecture
As stated in section I, scan chains are used to
support manufacturing testing and can be reused for
on–chip debug to increase debug capability. Scan
dumps give high observability of internal signals and
states after the occurrence of a triggering event.
However, they require halting the system to scan out
responses from the circuit–under–debug. This is
time consuming as many scan dumps may be
required. Shadow registers and shadow scan logic
are often used to provide a non–destructive scan out
capability that preserves the existing system state.
In OpenSPARC T2 microprocessor, each
physical SPARC core supports the ability to capture
a subset of each strand’s state for inspection via a
shadow scan facility. The architecture is shown in
Figure 1 (take SPARC core0 as an example). Each
core shadow scan will be contained in a separate
scan chain, with its own clock headers and controls
coming from the TCU (Test Control Unit, the main
test and debug support unit of OpenSPARC T2
Figure1: The Shadow Scan Architecture.
processor, which also controls the JTAG interface
and TAP machine of the processor). If a core is
disabled then its shadow scan contents will be
excluded and the number of TCK clocks should be
reduced to reflect the unavailable core(s).
The shadow scan function is controlled via JTAG
interface and invoked by JTAG commands. Eight
private JTAG instructions are defined to support
shadow scan operation of SPARC cores
(TAP_SPCTHR0_SHSCAN ~
TAP_SPCTHR7_SHSCAN). The high five ordered
bits of each instruction are the same, representing
the shadow scan operation. While the three low
ordered bits are different, and coded as strand ID,
illustrating the state of which thread of that SPARC
core needs to be captured.
The TCU continually specifies a strand ID to
each physical OpenSPARC T2 SPARC core. In
response, the physical core atomically captures the
state as described in Table I in a scan string. The
TCU then accesses the scan string and capture it in a
JTAG–visible register for presentation over the
JTAG interface.
2.2 Integer Register File
An UltraSPARC 2007 architecture specification,
processor should contain an array of general–
purpose registers. One set of 8 global registers is
PECCS 2011 - International Conference on Pervasive and Embedded Computing and Communication Systems
442