GR740-UM-DS, Nov 2017, Version 1.7
389
www.cobham.com/gaisler
GR740
33
LEON4 Hardware Debug Support Unit
33.1
Overview
To simplify debugging on target hardware, the LEON4 processor implements a debug mode during
which the pipeline is idle and the processor is controlled through a special debug interface. The
LEON4 Debug Support Unit (DSU4) is used to control the processor during debug mode. The DSU
acts as an AHB slave and can be accessed by all AHB masters on the Debug AHB bus. An external
debug host can therefore access the DSU through several different interfaces.
33.2
Operation
Through the DSU AHB slave interface, any AHB master on the Debug AHB bus can access the pro-
cessor registers and the contents of the instruction trace buffer. The DSU control registers can be
accessed at any time, while the processor registers, caches and trace buffer can only be accessed when
the processor has entered debug mode. In debug mode, the processor pipeline is held and the proces-
sor state can be accessed by the DSU. Entering the debug mode can occur on the following events:
•
executing a breakpoint instruction (ta 1)
•
integer unit hardware breakpoint/watchpoint hit (trap 0xb)
•
rising edge of the external break signal (BREAK)
•
setting the break-now (BN) bit in the DSU control register
•
a trap that would cause the processor to enter error mode
•
occurrence of any, or a selection of traps as defined in the DSU control register
•
after a single-step operation
•
one of the processors in a multiprocessor system has entered the debug mode
•
DSU AHB breakpoint or watchpoint hit
Unit
Debug AHB Bus
Debug Support
AHB Slave I/F
Debug I/F
Figure 44.
LEON4/DSU Connection
Ethernet
DEBUG HOST
Processor(s)
LEON4
JTAG
SpaceWire
Connection to
system via bridge