
MicroBlaze Debugger and Trace | 10
©
1989-2021
Lauterbach GmbH
Quick-Start of the Real-Time Trace
To use real-time trace, you first have to correctly configure the block design in Vivado. Also note that you
need at least Vivado 2018.3 or Vivado 2018.2 with a special patch from Xilinx answer record AR71422.
1.
In the configuration dialog of the core, select “Advanced” at the top, Navigate to the tab “Debug”
and select “External Trace” and set “Trace Buffer Size” to “8kB”.
2.
In the configuration dialog of the MicroBlaze Debug Module, set “Select External Trace Output
Interface” to “EXTERNAL” and set “External Trace Data Width” to twice the desired trace port
width (number of data pins connected from the FPGA to the off-chip trace connector).
3.
In the “Block Properties” of the MDM, set “CONFIG.C_TRACE_PROTOCOL” to 1. Alternatively,
use the following command in the TCL console, assuming your MDM has the default instance
name “mdm_0”:
4.
Connect an appropriate clock signal to the TRACE.TRACE_CLOCK port and export the
TRACE.TRACE_DATA signal. Also export the that feeds TRACE.TRACE_CLOCK. Leave
TRACE.TRACE_CLK_OUT and TRACE.TRACE_CTL unconnected.
5.
Use ODDR buffers to create DDR (double data rate) signalling on the external trace port. Refer
to
~~/demo/microblaze/etc/hdl/mdm_parallel_trace_adapter.vhd
in your TRACE32 installation
directory for an example module you can instantiate in your block design.
After you have programmed your modified design to the FPGA, connect for debugging as usual. To
configure and enable trace, use the following commands:
set_property CONFIG.C_TRACE_PROTOCOL 1 [get_bd_cells /mdm_0]
Trace.METHOD Analyzer ; Tell TRACE32 that we wish to use off-chip trace.
Trace.PortSize 16. ; Configure the number of connected data pins
Trace.AutoFocus ; Execute a test program to detect the best
; electrical parameters for sampling.