DSP testing
From S1MP3 Wiki
Stuff that has been tested on the DSPs. Unless otherwise specified, everything here has been tested on an ATJ2085.
Running the following instructions (with opcodes matching the adsp 21xx series), with 24 bit values in the memory locations pointed by i0 and i1 produces a 24 bit result in the memory location pointed by i2.
ax0 = dm(i0,m0); ay0 = dm(i1,m1); ar = ax0 + ay0; dm(i2,m2) = ar;
This proves that:
- The dsp is adsp21xx compatible.
- The Data Memory Databus is 24 bits wide.
- The ax and ay registers are 24 bits wide
- The ar register is 24 bit wide.
Results of some more tests:
- The processor by default starts up in fractional mode, but by setting bit4 in mstat, it correctly goes into integer mode.
- Multiplication works with 24 bit operands.
- The MR register is made of mr0, mr1, and mr2 (just like adsp21xx), but mr0, and mr1 are 24 bit wide. mr2 is still 8 bits wide. sign extention occurs just as the 21xx datasheets say it should.
- a 8 bit px register exists, but nothing is written automatically to it when reading data from the program memory.
- when a load register immediate instruction occurs (data) the content of the PX register is copyed into the most significant byte of the destination register. The instruction itself can only contain a 16-bit value. It is also used when writeing an immediate value into ram.
- The missing 256 words of idm actually exist, and Can be accessed by the z80, but not by the dsp.
- if you are writing stuff to the 256 missing words, then it can be read back. There is some sort of memory/registers there definitely in every single address. The values don't get mirrored multiple times, so it is complete addressing.
- By mapping only the lower 8 kilowords of ipm and idm to the dsp and leaving the rest for the z80 will work. If you map only the high 8k words to the dsp, then the dsp will not be able to start up from it. It might be possible to take away the lower 8 kilos of memory while the dsp is already operation, and running code from the higher 8kwords, but that has not been tested yet.
Todo tests
- Test for Biased Rounding mode. It should only work on the ADSP-217xm 218x, and 21msp5x. More details here, page 21.