If you compare Cubieboard2 and A20-OLinuXino-MICRO you’ll probably see one big difference in memory configuration.
DRAM is clocked at 480 MHz on the former board and 384 MHz on the latter.
That is a huge 25% difference and you will probably ask why?
Maybe Olimex are using cheaper memory capable of running stable at lower speed only?No.
I’ve seen explanation in linux-sunxi IRC channel that around 20% of the A20 chips cannot run stable with memory clocked higher than 400 MHz.
I decided to raise the speed of DRAM of my board and see what are the gains.
I used a10-meminfo software which shows the current DRAM parameters of board and tinymembench for testing speed and latency of memory.
Installation is done via:
$ git clone https://github.com/maxnet/a10-meminfo
$ cd a10-meminfo/
# ./a10-meminfo-static | grep dram_clk
dram_clk = 384
$ cd ..
$ git clone https://github.com/ssvb/tinymembench
$ cd tinymembench/
# CFLAGS=”-march=armv7-a -mtune=cortex-a7″ make
Then you have to download, modify, compile and reinstall u-boot on your board.
Many of the step are already explained here: https://alarma20.wordpress.com/2013/09/13/howto-build-arch-linux-arm-for-a20-olinuxino-micro/
File that needs to be modified is “board/sunxi/dram_a20_olinuxino_m.c” in u-boot-sunxi directory.
Change line “.clock = 384” to “.clock = 480”, save file and compile u-boot.
Then transfer u-boot-sunxi-with-spl.bin to /boot directory of the SD card (I used SSH).
As a final step reinstall u-boot:
# dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
and reboot …
Verify the change by running a10-meminfo-static and tinymembench.
Below you can find the difference in the memory performance in tinymembench:
1. Memory bandwidth tests (MB/s):
2. Memory latency tests (nanoseconds, lower is better):