This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10191 - AMSSansa Synchronous Clocking
Attached to Project:
Rockbox
Opened by Jack Halpin (FlynDice) - Thursday, 07 May 2009, 07:36 GMT+2
Last edited by Rafaël Carré (funman) - Tuesday, 26 May 2009, 20:45 GMT+2
Opened by Jack Halpin (FlynDice) - Thursday, 07 May 2009, 07:36 GMT+2
Last edited by Rafaël Carré (funman) - Tuesday, 26 May 2009, 20:45 GMT+2
|
DetailsWhile trying to get the mmu working correctly I managed to get a synchronous clocking scheme to work and thought I would post it for comments. This is probably more of a proof of concept type of thing but I figure it can't hurt to test it out and see how it compares to the current asynchronous clocking scheme. I have left the assembler routines embedded in the .c code to simplify things and also enabled round robin caching.
|
This task depends upon
Closed by Rafaël Carré (funman)
Tuesday, 26 May 2009, 20:45 GMT+2
Reason for closing: Duplicate
Additional comments about closing: FS#10245 is more complete, and committed
Tuesday, 26 May 2009, 20:45 GMT+2
Reason for closing: Duplicate
Additional comments about closing:
- playing mp3 needs 40 to 50 MHz less than svn
- the "spacerocks-wheel-bug" (http://forums.rockbox.org/index.php?topic=14064.msg149120#msg149120) is gone
- playback stops when starting pictureflow plugin (in svn pictureflow works with playback)
But if you dynamically change the PCLK frequency (in set_cpu_frequency), don't you also need to dynamically change the divisors for the clocks that are derived from PCLK (I2C for example)?
Well I figured it out.. Seems I've performed a bit of cold fusion here! I was adjusting the wrong divider for FCLK. Instead of dividing by it by 2 I was multiplying by 7/8. Hence the nice performance. Here's a patch with the correct dividers or you can just change CGU_PROC |= (1<< 2); to CGU_PROC |= (1<< 4);
It just crashes when I adjust PCLK_DIV1_SEL. Trying to work out why.
I also used FlynDice's synchronous_clocking_3.patch, and his very useful HW info patch from the forum AMS thread. I tested against SVN:20931.
I made some measurements of MP3 decode performance (boosted), and LCD update rates (unboosted). I'm interested in the latter because my e260v2 UI performance is a bit laggy, and I was interested in the least bad option.
Sync clocking seems to give ~5% increase in MP3 decode performance.
Sync clocking also seems to give ~25% better unboosted LCD update rates than fastbus, although the comparison might not be fair, since the sync option uses an FCLK/PCLK of 62/31MHz, but fastbus effectively uses the same 31Mhz for both. In anycase, it is worth changing the DBOP_CLK divisor for the unboosted state, as it gives a significant improvement to UI usability. Vanilla 20931 also gives similar UI performance, but the unboosted clock config seems to be illegal (i.e. async awith PCLK > FCLK).
My original scheme to have FCLK=MPMC_CLK=61MHz, PCLK=31MHz fails to boot. I need to read some more about the MPMC to understand why.
I have attached detailed results.
It seems that the OF uses a 65MHz limit for mpmc_clk, but I'm not 100% sure since there is a lot of code related to pclk that I didn't understand.
The battery bench comparison can be found at http://forums.rockbox.org/index.php?topic=14064.msg150619#msg150619
Do you have objections for it going to SVN ?
- playing mp3 needs much less MHz (average about 75 MHz on my 128 kBit/s files and average about 115 MHz on my 320 kBit/s files)
- ui-responding is perfect