Revision 1.0
Microcode Debugging Tips
145
Microcode Debugging Tips
There are two different environments for debugging microcode: (1) the RSP
simulator (
rsp
or
rspg
) and (2) the coprocessor view of Gameshop (
gvd
).
Each tool has its advantages; Gameshop is discussed in separate
documentation. This section explains the first technique and provides some
other tips.
The first tip is to develop as much of the RSP microcode as possible using the
RSP simulator. The tools are more friendly, more powerful, and the
turn-around time is much shorter. In order to facilitate this, you may wish to
also develop driver or stub tools that can create the data necessary to debug
the program.
Once everything is mostly working, and you progress to integrating the new
microcode with an application running on the CPU, using the RSP simulator
becomes a little trickier. In order to use the RSP simulator you must create a
DRAM image containing all the necessary pieces for the RSP task, and an
OSTask
structure. Briefly, the technique is:
•
Run the RSP simulator.
•
Copy the DRAM image into memory at
0x0
.
•
Copy the
OSTask
structure into the bottom of DMEM at
(0x04001000 - sizeof(OSTask))
.
•
Copy the
rspboot
microcode into IMEM at
0x04001000
. Note
that this is not the ELF image of
rspboot
, but the RSP executable.
•
Set the PC to
0x04001000
.
•
Run (or step) the RSP program.
At this point, everything is in place to execute a task on the RSP simulator.
The hardest step is creating the DRAM image that contains all the necessary
elements in their proper places. Fortunately, there are some tools to help
here:
Summary of Contents for Ultra64
Page 2: ...2 ...
Page 10: ...10 ...
Page 12: ...12 Figure 6 2 buildtask Operation 137 ...
Page 14: ...14 ...
Page 80: ...80 Vector Unit Instructions vmadm dres_int dres_int vconst 3 vmadn dres_frac vconst vconst 0 ...
Page 104: ...104 RSP Coprocessor 0 ...
Page 150: ...150 Advanced Information ...
Page 155: ...Revision 1 0 155 ...
Page 248: ...248 Exceptions None ...
Page 251: ...Revision 1 0 251 Exceptions None ...
Page 254: ...254 Exceptions None ...
Page 257: ...Revision 1 0 257 Exceptions None ...
Page 293: ...Revision 1 0 293 Exceptions None ...
Page 316: ...316 Exceptions None ...