@Steven Craft: Yes, why not. In order for the compo to produce code that will actually be useful, it would make sense to pick a real-world usecase (e.g. a graphics blitter, the DSP really excels at that, I know for a fact. Most likely, no NEON code will beat it unless for mere copy blits).
@WizardStan: You can PM me and if the problem is not too complex, I can maybe help. Maybe this board should have a small "DSP corner" sub-forum ? People could post their ideas / findings / code / questions there. (
Admins, what do you think?)
Now what I was originally wanting to post:
Hi all,
today I spent a little time with some more performance analysis.
I had already posted some benchmark results, plus the binaries and source-code so you can verify the numbers yourself.
So, this time I wanted to know what the power consumption looks like.
First of all I have to thank
__wb__ for writing the "
System Info" tool, which I used to log the system performance (at 1s intervals).
I ran three tests:
1) GPP only fractal benchmark (
DSP not running, kernel module not loaded)
2) DSP only fractal benchmark
3) Booting the DSP after letting the OS idle for about a minute, then unloading the kernel module and shutting off the IVA2 (DSP) subsystem.
During all of the tests the screen and backlight were active, and WIFI was enabled.
Before each test I rebooted the Pandora, just to be sure.
Test 1: GPP only fractal benchmark
The benchmark finished in
~59.5 seconds. (
note: If I had used M-HT's optimized fixed point version it would have been ~20 seconds.)
As you can see, the ARM Cortex A8 (GPP) is quite power hungry (
well, relatively) and the system consumes an extrapolated
~2.7 Watts/hour. Running this continously would therefore drain the battery (
~15W) in
~5.5 hours.
(EDIT: not sure how the system info tool determines the GPP W/h. The "actual power" should probably used for comparisons. This would be ~1.8 W/h, i.e. battery drained after ~8.3 hours)
Before the benchmark starts at
~26:00, you can see that the system consumes
~0.8 Watts/hour in idle mode (=> battery life
~18.7 hours).
Test 2: DSP only fractal benchmark
I have to say, the result suprises me (
then again, I have never analyzed the power consumption of the DSP before).
The benchmark finished in
~16 seconds.
Once again, I let the system idle around for roughly a minute before booting the DSP at
30:30.
At
~31:40 I started the (DSP only) fractal benchmark -- a small/short power consumption spike can be seen in the graph.
Other than that, the power consumption of the DSP did not change much compared to when it's idle (
and yes, I added an "IDLE" instruction call to the DSP image today so that it goes to sleep until the next interrupt (message) arrives).
During the benchmark, the system consumed
~1.1 W/h.
This is pretty impressive! Not only is the DSP ~50% faster than the GPP although it is running at only 80% of the GPP clockrate (71.6% on CC/Rebirth Pandoras), but it consumes far less power than the GPP!
Running this test continously would drain the battery in approximately
13.6 hours (i.e. using the DSP for tasks like this extends the battery life by factor
~2.48).
(EDIT: assuming 1.8 W/h actual power consumption for the gpponly test, the factor is 1.63. still good, >5 hours more!)
Yay!
Test 3: DSP idle power consumption
This test also produced a surprising result.
First, I let the system idle (w/o DSP) for ~1.5 minutes.
At
52:30 I booted the DSP and let the system idle some more until
~54:00.
The power consumption went up from
~0.8 W/h to
~0.95 W/h.
I.e., having the DSP running, doing nothing except waiting for a message interrupt from the GPP costs
0.15 W/h and therefore reduces the battery life from
~18.7 hours to
~15.7 hours.
At
~54:00 I unloaded the kernel module.
I was expecting the power consumption to drop back to the initial
~0.8 W/h but instead it increased(!) to
~1 W/h.
Seems like the IVA2 shutdown does not work as expected, yet.
A few pages back I said that the DSP idling in the background did not have a noticeabe effect on battery life.
Now these results provide some more detailed figures. I would still say that, from a user point of view, it is barely noticeable.
With the current version of "
c64_tools" it is not recommended to let the DSP run all the time, though. Maybe there are some more "hardware tricks" to further reduce power consumption in idle mode, I will take another look at the manuals. Fixing the powerdown sequence has a higher prio, though.
p.s.: I attached the benchmark binaries (for sources see previous posts), .csv logs and .png plots, in case you want to analyze this yourself
c64_perf_analysis-27Sep2013.tar.gz