@Linux-SWAT: I'm from germany (so pls excuse my funny english
)
@Exophase: Sure it's still not fast enough for emulating single FPU instructions but it's now fast enough for the DSP to be usable for e.g. transforming a view vertices (instead of ten-thousands). I also did not say I did "scientific testing" in regards to power consumption. I was merely stating, from a user point of view, that having the DSP running in the background (doing nothing except waiting for RPC requests) did not have a noticable impact on battery life. Besides, when the "c64.ko" kernel module is unloaded, it shuts off the entire IVA2 (DSP) subsystem. A system service could probably handle that (in case it's worth the effort) (during my tests the module was loaded all the time, of course).
@notaz: Thanks, I'll take a look at the new kernel and your test module! Would be great if we could get rid of the mandatory 4 MB memory gap. Heh, and regarding your demo suggestion/request: I was indeed planning to write a small demo/effect that showcases a ) the additional processing power gained by using the DSP and b ) the tightly coupled interaction between ARM and C64 that's possible with the c64_tools. You do not have to send me a base app, I was planning on learning the specifics of your optimized Pandora SDL, anyway. Learning-by-doing is usually the best way to do so. Thank's for the offer, anyway!
@milkshake: "So what is the best use scenario for our dsp?" -> In general, high-performance applications like
- emulators (in case they do not already run fast enough on ARM-only (w/o overclocking and on 600 Mhz Pandoras). this heavily depends on the emulator design and the hardware being emulated, though). also what sebt3 said.
- games (depending on the game. if the game is RAM bandwidth-limited, using the DSP will not have an advantage. if, on the other hand, the game uses e.g. a lot of math/physics calculations, the performance can be increased considerably)
- any kind of application/algorithm that can be parallelized effectively (for example, I have a music application in the works where offloading synth and FX processing to the DSP would improve the overall performance). just be creative here.
@_wb_: I cannot say whether the DSP will be faster at JPEG decoding than the ARM. I think TI has some optimized code/libs available for that, you would have to check them out. Although, this type of application sounds like the bottleneck might be the SD access ?!
Generally speaking, the C64 DSP is not some magical thing that will automatically make everything go faster. It shares the RAM with the ARM although TI has put a single-cycle access (i.e. very fast) SRAM into the DSP that can be shared with the ARM. If developers put frequently accessed (shared) data structures in there, there is no need for explicit cache writeback/invalidate calls. The drawback is that it is "just" 48 KBytes. Personally I do think that this is plenty. (there's another 256 KBytes SRAM area (the L2 cache) that I have not tested, yet. It's not single-cycle, though, from what I read).
@Crionic: IMHO, there are several reasons why the DSP has not been used (at all or to its full capabilities):
1) With DspLink/DspBridge, getting into DSP coding is harder than it needs to be. You have to spend a considerable amount of time setting up the dev environment, compiling the libs/modules.
2) On some of the previous pages I mentioned that there seems to be a hardware issue with the Pandora (at least the one I have) that prevents DspLink/Bridge from working in the first place.
3) Developing for it on the Pandora is a lot more difficult than writing ARM-side code because the only way to debug it is to examine a few debug memory locations (a printf() could be added, though)
4) The DSP internals are quite different from the ARM. To get the best out of it, you have to spend time in order to learn about that. However, as I've already said, the DSP "C" compiler is quite good and even if you ignore the DSP specifics, you can get quite a lot of out of it. If you are interested in C64 development, you should check out the (highly-optimized) libraries TI has already available. For example, if, for some reason, you need floating point math, check out TI's "iqmath" library (this DSP does not have an FPU so fixed point math is usually your friend)
5) Developers are lazy (take this with a grain of salt, this includes me, too): Using the DSP means parallelizing your algorithms. This is also more difficult than just using one CPU. This is not a Pandora/DSP specific problem, e.g. on PCs there are many applications that could benefit from multithreading, yet they still use only one core, even if the machine has 8 of them.