Hi there
I just did a simple benchmark of the ARM Cortex-A8 inside the OMAP35. Do you know if the ARM caches are enabled by default?
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344b/BABIGFEH.html
Code Composer v4.2 with rtssrc.zip, debug configuration
Using the following GEL-files: http://processors.wiki.ti.com/index.php/OMAP_and_Sitara_CCS_support
GELs for OMAP3EVM for CCSv4
EBVBeagle Rev C4 | |||
Configuration | Location | loop 10'000'000 | loop 50'000'000 |
Debug | External SDRAM (0x8000 0000) | 6.280s | 31.400s |
Release | External SDRAM (0x8000 0000) | 4.656s | 23.227s |
Debug | On-Chip SRAM Internal (0x4020 0000) | 4.995s | 24.997s |
Release | On-Chip SRAM Internal (0x4020 0000) | 3.728s | 18.639s |
Shouldn't the OMAP35 outperform the OMAP-L137? I guess he is using a much faster memory..
http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/43501/168120.aspx
Benchmark code:
#include <stdio.h>
#include "omap35xx_base_regs.h"
#include "omap35xx_prcm.h"
#include "omap35xx_gptimer.h"
#include "RegisterIoMacros.h"
void setupPerformanceCounter() {
// enable clocks
OMAP_PRCM_PER_CM_REGS* pPowerClockRegs = (OMAP_PRCM_PER_CM_REGS*)OMAP_PRCM_PER_CM_REGS_PA;
// select 32.768kHz
CLRREG32(&pPowerClockRegs->CM_CLKSEL_PER, CLKSEL_GPT4);
// enable functional clock
SETREG32(&pPowerClockRegs->CM_FCLKEN_PER, CM_CLKEN_GPT4);
// enable interface clock
SETREG32(&pPowerClockRegs->CM_ICLKEN_PER, CM_CLKEN_GPT4);
// wait until GPTimer is ready to use
while (INREG32(&pPowerClockRegs->CM_IDLEST_PER) & CM_IDLEST_ST_GPT4) {
;
}
// enable GPTimer4
OMAP_GPTIMER_REGS* pTimerReg = (OMAP_GPTIMER_REGS*)OMAP_GPTIMER4_REGS_PA;
// Soft reset GPTIMER and wait until finished
SETREG32(&pTimerReg->TIOCP, SYSCONFIG_SOFTRESET);
while ((INREG32(&pTimerReg->TISTAT) & GPTIMER_TISTAT_RESETDONE) == 0) {
;
}
// clear interrupts
OUTREG32(&pTimerReg->TISR, 0);
// start count at zero
OUTREG32(&pTimerReg->TLDR, 0);
// Trigger a counter reload by writing to TTGR
OUTREG32(&pTimerReg->TTGR, 0xFFFFFFFF);
// Start the timer, set for auto reload
OUTREG32(&pTimerReg->TCLR, GPTIMER_TCLR_ST|GPTIMER_TCLR_AR);
}
unsigned int ticksToMilliseconds(unsigned int nofTicks) {
return nofTicks * 1000 / 32768;
}
void hdelay(unsigned int count)
{
printf("loop %d..",count);
volatile OMAP_GPTIMER_REGS* pTimerReg = (OMAP_GPTIMER_REGS*)OMAP_GPTIMER4_REGS_PA;
unsigned int startTCRR = INREG32(&pTimerReg->TCRR);
volatile unsigned int i;
for(i=0;i<count;i++) {
;
}
unsigned int endTCRR = INREG32(&pTimerReg->TCRR);
unsigned int duration_ms = ticksToMilliseconds(endTCRR - startTCRR);
printf("..done in %dms\n",duration_ms);
}
int main(void) {
setupPerformanceCounter();
hdelay(10000000);
hdelay(50000000);
return 0;
}