embedded - ARM clock speed on raspberry pi -


running bare-metal (no operating system, no linux)

the specs implies arm can/does run 700mhz, sys clock matches manual , appears running @ 250mhz. simple tests on arm imply doing same, example instruction cache on

test:   subs r0,r0,#1   bne test 

and vary number of subs instructions dominate on branch, in ball park of 250mhz long way away 700mhz.

i there phy setting not seeing in datasheet multiplying arm clock?

edit:

maybe assumptions flawed...

.globl armtest0 armtest0:     subs r0,r0,#1     bne armtest0     bx lr  .globl armtest1 armtest1:     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     bne armtest1     bx lr  .globl armtest2 armtest2:     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     subs r0,r0,#1     bne armtest2     bx lr  .globl armtest3 armtest3:     subs r1,r0,#1     subs r2,r1,#1     subs r3,r2,#1     subs r0,r3,#1     subs r1,r0,#1     subs r2,r1,#1     subs r3,r2,#1     subs r0,r3,#1     subs r1,r0,#1     subs r2,r1,#1     subs r3,r2,#1     subs r0,r3,#1     subs r1,r0,#1     subs r2,r1,#1     subs r3,r2,#1     subs r0,r3,#1     bne armtest3     bx lr 

system timer ticks in hex per function (250mhz system timer verified against stopwatch, etc).

02db6df7 armtest0 02db6e1c armtest0 00ab6e2a armtest1 00836e46 armtest2 00836e2a armtest3 

which gives:

armtest0 0x01000000 subs instructions 0x01000000 bne  instructions 0x02000000 instructions 1.43 clocks per instruction.  175mips.  armtest1 0x01000000 sub instructions 0x00200000 bne instructions 0x01200000 instructions 1.68 instructions per clock. 420mips  armtest2 0x01000000 sub instructions 0x00100000 bne instructions 0x01100000 instructions 2.07 instructions per clock. 517mips  armtest3 0x01000000 sub instructions 0x00100000 bne instructions 0x01100000 instructions 2.07 instructions per clock. 517mips 

the arm11 super-scalar more 1 instruction per clock not unexpected. expect more though. using register 0 might mess pipe have wait 1 result of 1 instruction before executing next. expecting see difference between test 2 , 3, perhaps bad assumption. maybe 500mhz not 700? there 1 line in linux sources mentions 500000000 clock.

static struct clk osc_clk = { #ifdef config_arch_bcm2708_chipit     .rate = 27000000, #else     .rate = 500000000,  /* arm clock set videocore booter */ #endif };  /* warning - usb needs clock > 34mhz */  #ifdef config_mmc_bcm2708 static struct clk sdhost_clk = { #ifdef config_arch_bcm2708_chipit     .rate = 4000000,    /* 4mhz */ #else     .rate = 250000000,  /* 250mhz */ #endif }; #endif 

maybe think have measured 250mhz 270 , arm @ 500mhz?

edit2...doh

that wasnt great pipeline improvement it, better:

.globl armtest3 armtest3:     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     subs r0,r0,#1     nop     nop     nop     nop     nop     nop     nop     nop     bne armtest3     bx lr       armtest3     0x01000000 sub instructions     0x08000000 nop instructions     0x00100000 bne instructions     0x09100000 instructions     037000d7 system clocks     2.64 instructions per clock. 659mips 

i failed config.txt work @ first, re-build linux sd card, booted find /boot/ directory in fact fat partition contains gpu boot files , kernel.img arm boot file. not in boot/ dir in same dir .bin's , .elf , .img file create config.txt , put arm_freq=something, gpu bootloader makes modification pll multiplier when arm starts @ speed. still expect more 700 million instructions per second , not seeing that, need keep trying guess.

might worth looking @ boot loader provided arch linux reference distribution raspberry pi organisation's download pages. have no idea whether it's working option, config.txt includes line

#arm_freq=800 

there reports of people having overclocked pi - information initialising clock out there, somewhere.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -