Commands sent are single bytes with a variable number of parameters following.
In the following descriptions these definitions apply: Byte: 8 bits, Halfword: 16 bits, Word: 32 bits, Double word 64 bits, Pointer: 32 bits (ARM).
Commands are divided into sets on the most significant two bits as follows:
Command | Use |
00xx xxxx | General operations |
01xx xxxx | Memory transfers |
10xx xxxx | Programme execution |
11xx xxxx | Auxiliary functions |
General operations are functions which establish and maintain communications with the target unit, setting breakpoints et al. They are also used for downloading configuration files to board features such as FPGAs.
Memory transfers are used for up- and down-loading the states in the address spaces of the target unit. All accessible state (memories, registers, etc.) is mapped into one of these addressable spaces.
Programme execution is used to start execution and set various options such as single stepping or breakpoints.
Auxiliary functions are reserved for future expansion.
Command | Meaning |
0000 xxxx | Board level communications |
0001 xxxx | Board `feature' communications |
0010 xxxx | Programme execution control extras |
0011 xxxx | Breakpoint/watchpoint manipulation |
Command | Function | Parameters | Return values |
0000 0000 | No operation | None | None |
0000 0001 | "Ping" - resynchronise | None | W: OK?? ?? is the software version - initially 00 |
0000 0010 | Board definition | None | H: message length B: processor type H: processor subtype B: feature count B: feature ID H: feature sub-ID B: memory segment count W: memory segment address W: memory segment length |
0000 0011 | Reserved | ||
0000 0100 | Reset | None | None |
0000 0101+ | Reserved |
Feature number | Feature | Subfeature number | Subfeature |
00 | Terminal | --- | --- |
01-10 | Not defined | --- | --- |
11 | Xilinx Spartan XL |
05xx 0Axx 14xx 1Exx 28xx xx00 xx01 xx02 xx03 xx04 xx05 xx06 xx07 xx08 xx09 |
XCS05- XCS10- XCS20- XCS30- XCS40- -PC84 -VQ100 -CS144 -TQ144 -PQ208 -PQ240 -BG256 -CS280 |
12 | Xilinx Virtex |
05xx 0Axx 0Fxx 14xx 1Exx 28xx 3Cxx 50xx 64xx xx02 xx03 xx04 xx05 xx06 xx07 xx08 xx09 xx0A xx0B xx0C xx0D xx0E xx0F |
XCV50- XCV100- XCV150- XCV200- XCV300- XCV400- XCV600- XCV800- XCV1000- -CS144 -TQ144 -PQ240 -HQ240 -BG256 -FG256 -BG352 -BG432 -FG456 -BG560 -FG676 -FG680 |
13 | Xilinx Virtex E | as Virtex (#12) | as Virtex (#12) |
14-FF | Not defined | --- | --- |
Command | Function | Parameters | Return values |
0001 0000 | Get Status | B: Feature number | W: Status (Currently always 0) |
0001 0001 | Set Status | B: Feature number W: Status (Currently ignored) | None |
0001 0010 | Send message | B: Feature number B: Length Specified number of bytes | B: Number of bytes accepted |
0001 0011 | Get message | B: Feature number B: Max. length | B: Actual length Specified number of bytes. |
0001 0100 | Download Header | B: Feature number W: Length of file | B: 'A' if successful/'N if feature unrecognised |
0001 0101 | Download Packet | B: Feature number B: Packet length (1-256) Specified number of bytes. | B: 'A' if successful/'N if unsuccessful |
0001 0110+ | Reserved | B: Feature number | --- |
Device download is instigated by sending a header to the appropriate feature. In the case of an FPGA this initialises the device and readies it to receive a new programme. Subsequently a number of packets should be sent with a total length equal to the specified file length. (Packets beyond this length will be ignored.)
Command | Function | Parameters | Return values |
0010 0000 | What is executing? | None | B: Execution status W: Number of steps `remaining' W: Number of steps since reset |
0010 0001 | Stop execution | None | None |
0010 0010 | Pause execution | None | None |
0010 0011 | Continue execution | None | None |
0010 0100 | Set runtime flags | B: xxxx xxIF | None |
0010 0101 | Get runtime flags | None | B: xxxx xxIF |
0010 0110+ | Reserved | --- | --- |
Execution status | Meaning |
00 | Reset |
01 | Busy - go away! |
40 | Stopped |
41 | Stopped due to breakpoint |
42 | Stopped due to watchpoint |
43 | Stopped due to memory fault |
44 | Stopped by programme request |
80 | Running normally |
81 | Servicing a SWI |
8? | Servicing ??? |
C0-FF | Error codes |
Command | Function | Parameters | Return values |
0011 bb00 | Define trap | B: trap number B: trap conditions B: trap sizes W: trap address A W: trap address B D: trap data A D: trap data B | None |
0011 bb01 | Read trap definition | B: trap number | B: trap conditions B: trap sizes W: trap address A W: trap address B D: trap data A D: trap data B |
0011 bb10 | Set trap status | W: bitmask1 W: bitmask0 | None |
0011 bb11 | Read trap status | None | W: bitmask1 W: bitmask0 |
The actual class of trap is defined by the two bits "bb":
bb | Meaning |
00 | Breakpoint (instruction fetch) |
01 | Watchpoint (data transfer) |
01 | Register |
01 | Reserved |
The trap conditions are set up as follows:
Trap condition | Meaning |
Uxxx xxxx | 0: do not trap if in user mode 1: may trap if in user mode |
xPxx xxxx | 0: do not trap if in privileged mode 1: may trap if in privileged mode |
xxRW xxxx | 00: do not trap 01: trap only on write accesses 10: trap only on read accesses 11: may trap on any transfer |
xxxx AAxx | 0x: reserved 10: may trap if addrA <= addr <= addrB 11: may trap if addr AND addrB = addrA |
xxxx xxDD | 0x: reserved 10: may trap if dataA <= data <= dataB 11: may trap if data AND dataB = dataA |
These allow a flexible range of conditions to be set up. Note that not all conditions may be supported in all cases.
Transfer size mask | Meaning |
xxxx Sxxx | Trap on 64-bit accesses |
xxxx xSxx | Trap on 32-bit accesses |
xxxx xxSx | Trap on 16-bit accesses |
xxxx xxxS | Trap on 8-bit accesses |
When activating of deactivating traps all the traps (of a given type) can be manipulated with a single command. The trap is defined by the two bits with the appropriate bit numbers.
bitmask1:bitmask0 | Meaning when written | Meaning when read |
0:0 | No operation | Not implemented |
0:1 | Delete definition | Implemented but not defined |
1:0 | Inactivate | Inactive |
1:1 | Activate | Active |
Thus the parameters 00000005:00000003 would inactivate trap #2, delete trap #1 and activate trap #0; an undefined trap will not be activated.
|
|
|