DSP stands for Digital Signal Processing and DSP instructions are pretty powerful.

DSP can be enabled by writing 1 to bit 12 of SR (status register). If you don't do this, you'll get an "Illegal Code Err" message. X/Y memory is located at addresses 0xE5007000..0xE5008FFF (X) and 0xE5017000..0xE5018FFF (Y).

Yet, DSP support is not very useful at the moment:
- the GCC compiler doesn't generate any SH DSP instructions
- the IDA disassembler does not recognize them
- the Casio calculator OS is not using them
- the Casio SDKs do not provide a DSP library

Renesas' assemblers support it, but without any decent library functions, this is not very useful.

What does DSP assembly code look like?

Code:

.DATA.W h'82FF      ; setrc   #h'FF
.DATA.W h'0052      ; stc     mod, r0
.DATA.W h'016A      ; sts     dsr, r1
.DATA.W h'416A      ; lds     r1, dsr
.DATA.L h'F800B107  ; padd    x0, y0, a0
.DATA.L h'F800F90C  ; pcopy   y0, m0
.DATA.L h'F8008D0A  ; pclr    y0
.DATA.L h'F800ED07  ; plds    a0, mach

These instructions don't do anything useful here but as you can see: There are 32-bit instructions and some of them take three arguments!
What sorts of instructions are included in the SuperH DSP instruction set? A quick Google didn't turn up anything particularly informative.
What are the main advantages of this please? I wonder if it could be of use for console emulators like snes?
The SH-3/SH-3E/SH3-DSP software manual contains a lot of DSP information:
http://documentation.renesas.com/doc/products/mpumcu/rej09b0317_sh_3sm.pdf

Basically, DSP instructions allow parallel execution of memory intense operations, they support looping for repetitive tasks and provide a lot of bit twiddling functionality as they are normally used to filter signals (video, audio, ...).

It's like CISC instructions: They are complex, but very fast.
Wow this is extremely exciting for me. I now plan to enhance some of my programs to use these instructions. This could help with frame rate.
Thanks, ProgrammerNerd, for continuing to care about Prizm. Hopefully the above helps with your text editor work, or are you planning to enhance something already released by you?
Turns out that Casio's SH-3 CPUs do not have a working DSP unit.

We could not find any writable X/Y memory and the DSP registers (x0/x1, y0/y1, a0/a1) cannot be written to and will always return zero.

So although the DSP enable bit can be set and DSP instructions are recognized and partly processed (like pointer post increments), they don't have any real effect. A very strange behavior - especially since the ClassPad OS always sets the DSP enable bit.

We believe, however, that the reason for this might be a result of the customization process of the CPU. There have probably been a few processor designs along the way.

In fact, there is a hint in the file named DLSim32A.dll which is part of the PV-S1600 emulator:
"T:\CASIO\PVSH\Prog\CPU06R1\Debug\CPU06R1.dll"

We know that the PVSH unit got an SH7291 CPU (like the ClassPad), so this must be some development processor and maybe it fully supported DSP.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement