Revision 1.0
DMEM Organization and Usage
It can be convenient to reserve a VU register to hold an entire vector of
constants, available for use in vector computational instructions.
Labels in DMEM
Labels can be used in the data section to later reference offsets for the
purposes of loading or storing things.
Since DMEM is only 4K bytes, any DMEM address can be expressed with the
16 bit offset of a load/store instruction (and using the base register of $0).
Dynamic Data
Data which will be loaded or generated by the program does not need to be
initialized, however it may be useful to allocate space in your global DMEM
map at compile time.
Truncating the .dat file before building the ELF object to a size that
includes the static data, but not the dynamic data (which does not need to be
initialized) will result in a smaller ELF object and therefore less ROM and
DRAM usage.
Diagnostic Information
The assembler provides several useful directives for computing and/or
printing diagnostic information. These are most useful while laying out the
DMEM.
These directives include .bound, .align, .symbol, and .print.
All of these directives are explained in "Assembly Directives" on page 114.
Using temporary assembler symbols to compute sizes, alignment, and hold
diagnostic information is another useful tip.
127