Specifications

Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 205
UG111 (v1.4) January 30, 2004 1-800-255-7778
MicroBlaze MDM Target
R
r6: 00000000 r14: 00000000 r22: 00000000 r30: 00000000
r7: 00000000 r15: 00000130 r23: 00000000 r31: 00000000
pc: 00000188 msr: 00000000
XMD% targets 0
Setting current target to target id 0
List of connected targets
Target ID Target Type
------------------------------
0 MicroBlaze MDM-based (hw) Target *
1 MicroBlaze MDM-based (hw) Target
XMD% rrd
r0: 00000000 r8: 00000000 r16: 00000000 r24: 00000000
r1: 00000548 r9: 0000006c r17: 00000000 r25: 00000000
r2: 00000190 r10: 0000006c r18: 00000000 r26: 00000000
r3: 0000014c r11: 00000000 r19: 00000000 r27: 00000000
r4: 00000500 r12: 00000000 r20: 00000000 r28: 00000000
r5: 02020202 r13: 00000190 r21: 00000000 r29: 00000000
r6: 0000c200 r14: 00000000 r22: 00000000 r30: 00000000
r7: 0000006f r15: 0000005c r23: 00000000 r31: 00000000
pc: 000000f8 msr: 00000000
XMD% mrd 0xC000 4 <--- Reading the MDM UART’s registers from
MicroBlaze’s point of view
C000: 00000000
C004: 00000000
C008: 00000004 <--- Note: Status reg is 4, i.e UART is empty
C00C: 00000000
XMD% xuart w 0x42 <--- Write a character onto the MDM UART from the host
XMD% mrd 0xC008 <--- Read the MDM UART status reg using MicroBlaze
C008: 00000005 <--- Status is “valid data present”
XMD% mrd 0xC000 <--- Read the UART data i.e consume the char
C000: 00000042
XMD% mrd 0xC008
C008: 00000004 <--- Status is again “empty”
XMD% scan "Hello" "%c%c%c%c%c" ch1 ch2 ch3 ch4 ch5
5
XMD% xuart w $ch1
XMD% xuart w $ch2
XMD% xuart w $ch3
XMD% xuart w $ch4
XMD% xuart w $ch5
XMD% dow uart_test.elf
XMD% con
Processor started. Type "stop" to stop processor
RUNNING> Hello
Example debug session with Read Address breakpoints
In this debug session, there is a program running on the board that is polling and waiting
on MDM UART input - UART is at Baseaddress 0xC000. The program loops around
waiting for the data valid bit to be set in the status register 0xC008. Using a read address
breakpoint, MicroBlaze is stopped as soon as there is load from address 0xC000. The main
commands to note are “xbreakpoint <target id> <addr> <hw bp id>”. As can be seen in
the MicroBlaze configuration below, there are 4 PC hw breakpoints, 1 Read Addr/Data
breakpoint (catchpoint) and 1 Write Addr/Data breakpoint (catchpoint).